5-minute setup guide to enable AI agents to purchase products
cd /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-servernpm installThis installs all required Node.js packages (122 dependencies, 0 vulnerabilities).
Login to OrignaBase to obtain a JWT token for API authentication:
curl -X POST https://api.dev.orignagta.ca/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "e2e-admin@test.origna.ca",
"password": "TestPass123!"
}'Response:
{
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"userId": "users:abc123",
"role": "admin"
}Copy the token value (starts with "eyJhbGc...") — you'll need it in the next step.
Configure the API URL and JWT token:
export ORIGNABASE_URL="https://api.dev.orignagta.ca"
export ORIGNABASE_JWT_TOKEN="eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."Replace the token with your actual token from step 3.
npm run buildCompiles TypeScript source to JavaScript in the dist/ directory.
npm startServer is now ready on stdio. Keep this terminal open for local testing.
pwd # Current directory
# Should print: /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server
# Full path to dist/index.js: /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server/dist/index.jsOpen ~/.claude_desktop_config.json in a text editor (create if doesn't exist):
{
"mcpServers": {
"orignagta": {
"command": "node",
"args": ["/Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server/dist/index.js"],
"env": {
"ORIGNABASE_URL": "https://api.dev.orignagta.ca",
"ORIGNABASE_JWT_TOKEN": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}
}
}Replace ORIGNABASE_JWT_TOKEN with your actual token from step 3.
Quit and relaunch Claude Desktop application. The MCP server should now be available.
Ask Claude an e-commerce question:
Claude will use the MCP tools to:
| Environment | API URL | Use Case |
|---|---|---|
| Development | https://api.dev.orignagta.ca | Testing, integration (recommended for getting started) |
| Staging | https://api.staging.orignagta.ca | Pre-production validation |
| Production | https://api.orignagta.ca | Live marketplace (use real JWT tokens) |
ORIGNABASE_URL and ORIGNABASE_JWT_TOKEN when switching environments.
| Command | Description |
|---|---|
npm install |
Install dependencies |
npm run build |
Compile TypeScript to JavaScript |
npm run dev |
Development mode with auto-reload on file changes |
npm start |
Production mode (run after build) |
npm run typecheck |
Type check TypeScript without building |
npm run clean |
Remove dist/ directory |
npm audit |
Security audit of dependencies |
Symptom: "AUTH_ERROR: Invalid token" when calling tools
Solution: Get a new token by repeating step 3, then update ORIGNABASE_JWT_TOKEN in config.
Symptom: "Connection refused" or "ECONNREFUSED"
Solution: Verify ORIGNABASE_URL is correct and OrignaBase API is running. Check network connectivity.
Symptom: "error TS..." during npm run build
Solution: Clean and rebuild:
npm run clean
npm install
npm run buildSymptom: MCP server not showing in Claude Desktop
Solution:
~/.claude_desktop_config.json syntax is valid JSONls /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server/dist/index.js