OrignaGTA MCP Server

AI-Powered E-Commerce Platform for Agent-Driven Purchases

Production Ready 14 Tools Stripe Integration Canada-First

What is OrignaGTA MCP Server?

A production-ready Model Context Protocol (MCP) server that enables AI agents to autonomously:

Key Capability: The create_checkout tool enables agents to create Stripe Checkout Sessions with embedded checkout, automatic tax calculation, real-time shipping rates, and multiple payment methods (Card, Link, Cash App, Afterpay).

Core Features

14 Production Tools

Search, cart, discounts, checkout, orders, reviews, analytics — all ready to integrate with AI agents.

Stripe Integration

Embedded checkout with automatic tax (HST/GST/PST), real-time shipping, and multiple payment methods.

Security First

JWT authentication, role-based access, PII redaction, rate limiting, input validation.

Canada-Optimized

Postal code validation, provincial tax calculation, E.164 phone format, CAD pricing.

Integer Money

All prices in cents (no floats) — prevents rounding errors and ensures accuracy.

Webhook Security

Stripe webhook signature verification, idempotent requests, safe retries.

Quick Start

1. Clone & Install

cd /Users/yuniorrodriguezosorio/Documents/GitHub/origna_gta/mcp-server npm install npm run build

2. Get JWT Token

curl -X POST https://api.dev.orignagta.ca/auth/login \ -H "Content-Type: application/json" \ -d '{ "email": "e2e-admin@test.origna.ca", "password": "TestPass123!" }'

3. Set Environment

export ORIGNABASE_URL="https://api.dev.orignagta.ca" export ORIGNABASE_JWT_TOKEN="eyJhbGc..."

4. Start Server

npm start

5. Integrate with Claude

Add to ~/.claude_desktop_config.json:

{ "mcpServers": { "orignagta": { "command": "node", "args": ["/path/to/mcp-server/dist/index.js"], "env": { "ORIGNABASE_URL": "https://api.dev.orignagta.ca", "ORIGNABASE_JWT_TOKEN": "your-token-here" } } } }

Restart Claude Desktop and the server is ready!

14 Production Tools

Search & Browse (3 tools)

search_products(query, filters...)

Full-text search with category, price, and sorting filters

Browse
get_product(id)

Detailed product info, images, reviews, stock levels

Browse
check_inventory(product_id, quantity)

Real-time stock status for inventory-aware agents

Browse

Shopping Cart (3 tools)

add_to_cart(product_id, quantity)

Add items to cart with quantity validation

Cart
remove_from_cart(product_id, quantity)

Remove items from cart

Cart
get_cart()

Retrieve current cart with totals and tax estimates

Cart

Discounts (1 tool)

apply_coupon(code)

Apply discount codes with validation

Discount

Checkout & Payments (1 tool — THE KEY CAPABILITY)

create_checkout(shipping_address, coupon?)

Create Stripe Checkout Session with embedded checkout, automatic tax, shipping rates, and multiple payment methods. Returns checkout URL for payment.

Checkout

Orders (3 tools)

list_orders(status?, limit, offset)

View order history with filtering

Orders
get_order(id)

Order details with items, totals, tracking

Orders
request_return(order_id, reason, description)

Initiate returns/refunds workflow

Orders

Reviews (1 tool)

submit_review(product_id, rating, comment)

Submit 1-5 star product reviews

Review

Analytics (1 tool — Admin Only)

get_analytics(period?, date_range?)

Sales data, top products, revenue by period (admin role required)

Analytics

Example: Agent Purchase Flow

Scenario: "Find a laptop under $2000 and purchase it for delivery to Toronto"

Claude Agent Execution:
1. search_products( query="laptop", max_price=200000 ) → Returns 5 products matching criteria 2. get_product(id="products:xyz789") → Reviews price=$1299, stock=25 units 3. add_to_cart( product_id="products:xyz789", quantity=1 ) → Cart subtotal=$1299, tax=$169, total=$1468 4. apply_coupon(code="WELCOME20") → Discount=$260, new total=$1208 5. create_checkout( shipping_address={ street: "123 Yonge St", city: "Toronto", province: "ON", postalCode: "M4Y 1Z5", country: "CA", phone: "+14165551234" }, coupon: "WELCOME20" ) → Returns Stripe Checkout Session URL 6. Agent presents checkout URL to user User completes payment on Stripe 7. Stripe webhook confirms → Order created in OrignaBase 8. Agent calls list_orders(status="confirmed") → Verifies order was created successfully

Result: Order placed, payment processed, tracking email sent! ✓

Authentication & Security

JWT Token Flow

All requests require a valid JWT token issued by OrignaBase.

Step 1: Login

curl -X POST https://api.dev.orignagta.ca/auth/login \ -H "Content-Type: application/json" \ -d '{"email":"user@example.com","password":"password123"}' Response: { "token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "userId": "users:abc123", "role": "buyer" }

Step 2: Include in Requests

Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...

Roles & Permissions

Role Capabilities
buyer Search, cart, checkout, order history, reviews
seller Manage products, view sales, analytics for own products
admin All operations, platform-wide analytics

Test Accounts (Dev/Staging)

Role Email Password
Admin e2e-admin@test.origna.ca TestPass123!
Seller e2e-seller@test.origna.ca TestPass123!
Buyer e2e-buyer@test.origna.ca TestPass123!

Data Formats & Conventions

Money & Pricing

All monetary values are integer cents (no floats):

2999 cents = $29.99 CAD 129900 cents = $1,299.00 CAD Display: (cents / 100).toFixed(2) = "$29.99"

Canadian Postal Code

Format: [A-Z]\d[A-Z] \d[A-Z]\d

Valid: M5V 3A8, V6B 4Z1, T2P 1M1 Invalid: m5v 3a8 (must be uppercase) Invalid: M5V3A8 (missing space)

Phone Number (E.164)

Format: +1XXXXXXXXXX

Valid: +14165551234 Invalid: 416-555-1234 (wrong format) Invalid: 14165551234 (missing +1)

Product IDs & References

SurrealDB format: collection:record_id

products:abc123xyz users:buyer456def orders:order789ghi

Timestamps

Unix timestamps (seconds since epoch):

1710763200 = March 18, 2026, 14:00:00 UTC

Environments

Environment API URL Web URL Use
Development https://api.dev.orignagta.ca https://dev.orignagta.ca Testing, integration
Staging https://api.staging.orignagta.ca https://staging.orignagta.ca Pre-production validation
Production https://api.orignagta.ca https://orignagta.ca Live marketplace

Documentation

AI Documentation (llms.txt)

Machine-readable documentation in llms.txt standard format for AI agents to discover and use the MCP server.

View llms.txt

Discovery Manifest

JSON manifest at /.well-known/mcp.json with server metadata, tools, and integration instructions.

View Manifest

Full API Reference

Complete tool schemas, examples, error codes, rate limits, and best practices.

View API Docs

GitHub Repository

Source code, architecture diagrams, and contribution guidelines.

GitHub

Architecture Guide

System design, data flows, security model, and deployment architecture.

View Architecture

Getting Started

5-minute setup guide with installation, configuration, and first agent test.

Get Started

Support & Status

Issues & Questions

Report bugs and request features on GitHub Issues.

GitHub Issues

Email Support

Technical support and general inquiries.

support@orignagta.ca

API Status

Check API health and uptime status.

Health Check