← Back to Home

Getting Started with OrignaGTA MCP Server

5-minute setup guide to enable AI agents to purchase products

Prerequisites

Installation Steps

1 Navigate to MCP Server Directory

cd /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server

2 Install Dependencies

npm install

This installs all required Node.js packages (122 dependencies, 0 vulnerabilities).

3 Get JWT Authentication Token

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.

Test Accounts:
  • Admin: e2e-admin@test.origna.ca / TestPass123!
  • Seller: e2e-seller@test.origna.ca / TestPass123!
  • Buyer: e2e-buyer@test.origna.ca / TestPass123!

4 Set Environment Variables

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.

⚠️ Environment Variable Security: Never commit JWT tokens to version control. Use a secrets manager in production.

5 Build the Server

npm run build

Compiles TypeScript source to JavaScript in the dist/ directory.

6 Start the Server

npm start

Server is now ready on stdio. Keep this terminal open for local testing.

Integration with Claude Desktop

Step 1: Get Full Path to dist/index.js

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.js

Step 2: Edit Claude Desktop Config

Open ~/.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.

Step 3: Restart Claude Desktop

Quit and relaunch Claude Desktop application. The MCP server should now be available.

Step 4: Test in Claude

Ask Claude an e-commerce question:

Example prompt:
"Search for a laptop under $2000, add it to my cart, apply the WELCOME20 coupon, and create a checkout session for delivery to Toronto, ON M5V 3A8."

Claude will use the MCP tools to:

  1. Search products matching your criteria
  2. Retrieve product details
  3. Add to shopping cart
  4. Apply discount code
  5. Create Stripe Checkout Session
  6. Return payment URL for user

Environment URLs

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)
Pro Tip: Keep separate JWT tokens for each environment. Update ORIGNABASE_URL and ORIGNABASE_JWT_TOKEN when switching environments.

Available Commands

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

Troubleshooting

JWT Token Expired

Symptom: "AUTH_ERROR: Invalid token" when calling tools

Solution: Get a new token by repeating step 3, then update ORIGNABASE_JWT_TOKEN in config.

Connection Refused

Symptom: "Connection refused" or "ECONNREFUSED"

Solution: Verify ORIGNABASE_URL is correct and OrignaBase API is running. Check network connectivity.

TypeScript Compilation Error

Symptom: "error TS..." during npm run build

Solution: Clean and rebuild:

npm run clean npm install npm run build

MCP Server Not Available in Claude

Symptom: MCP server not showing in Claude Desktop

Solution:

  1. Verify ~/.claude_desktop_config.json syntax is valid JSON
  2. Verify paths exist: ls /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server/dist/index.js
  3. Restart Claude Desktop completely (quit from menu, relaunch)
  4. Check Claude console for error messages (Cmd+Option+I)

Next Steps

  1. Read the API Reference: Learn all 14 available tools and their parameters.
  2. Try Example Workflows: Test common e-commerce flows (search, cart, checkout, orders).
  3. Review Security: Understand JWT authentication, rate limiting, and error handling.
  4. Integrate in Production: Switch to production environment with real JWT tokens.
  5. Monitor & Debug: Check server logs for errors and performance metrics.
View Documentation Home Full API Reference