Enables autonomous AI agents to browse product catalogs, manage shopping carts, negotiate commerce terms, execute secure checkouts using AP2 mandate chains, and track order fulfillment on Shopify stores.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shopify Agentic MCP GatewayFind wireless headphones under $50 and add the best one to my cart."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Shopify Agentic MCP Gateway
The first tri-protocol commerce gateway for autonomous AI agents on Shopify.
Let AI agents browse, negotiate, cart, pay, and track orders -- fully autonomously.
Why This Exists
AI agents are learning to shop. But today, there is no standard way for an agent to discover a merchant's capabilities, negotiate terms, build a cart, authorize payment, and complete a purchase -- all without a human clicking buttons.
Shopify Agentic MCP Gateway solves this by implementing three emerging protocols in a single, deployable gateway:
Protocol | Role | What It Does |
UCP (Universal Commerce Protocol) | Discovery + Capabilities | Agents discover your store at |
AP2 (Agent Payment Protocol) | Authorization + Security | Three-mandate signature chain (Intent, Cart, Payment) ensures agents can only spend what the user authorized |
MCP (Model Context Protocol) | Agent Interface | Five tool registrations that Claude, GPT, and other LLM agents call directly via stdio or HTTP transport |
Features
5 MCP Tools --
scout_inventory,manage_cart,negotiate_terms,execute_checkout,track_orderUCP Profile Discovery --
/.well-known/ucpendpoint with capability negotiation and transport advertisementAP2 Mandate Chain -- Cryptographic ES256 signature chain (Intent -> Cart -> Payment) with full verification
Guardrails -- AI hallucination guard validates prices, inventory, mandate amounts, and checkout state transitions
Fee Collection -- Automatic platform fee calculation (configurable rate) with ledger tracking
Checkout State Machine -- Three-state machine (
incomplete->requires_escalation->ready_for_complete) with auto-detectionDual Runtime -- Runs locally as stdio MCP server for Claude Desktop, or deploys to AWS Lambda with API Gateway
DynamoDB-Ready -- In-memory stores with annotated DynamoDB migration paths for mandates, sessions, and ledger
Quick Start
Prerequisites
Node.js >= 22.0.0
A Shopify store with Storefront API access
(Optional) AWS account for Lambda deployment
1. Install
2. Configure
Edit .env with your Shopify credentials:
3. Build and Run
The MCP server starts in stdio mode, ready for Claude Desktop or any MCP client.
4. Connect to Claude Desktop
Add this to your Claude Desktop configuration (claude_desktop_config.json):
Now ask Claude: "Search for wireless headphones under $50 and add the best one to my cart."
Architecture
Tool Reference
Tool | Description | Key Parameters |
| Search the Shopify catalog for products |
|
| Create, modify, or retrieve a shopping cart |
|
| Negotiate capabilities, discounts, and shipping between agent and merchant |
|
| Complete a purchase with AP2 mandate chain verification |
|
| Retrieve order status and fulfillment tracking |
|
All prices are in minor units (cents). A $29.99 product has price: 2999.
Environment Variables
Variable | Required | Description |
| Yes | Your Shopify store domain (e.g., |
| Yes | Storefront API access token |
| Yes | Admin API access token |
| Yes | Shopify app API key |
| Yes | Shopify app API secret |
| Yes | ES256 private key in JWK format for mandate signing |
| No | ES256 public key in JWK format (defaults to deriving from private key) |
| No | Public gateway URL (default: |
| No | Platform fee rate as decimal (default: |
| No | Wallet address for fee collection |
| No | Logging level (default: |
Deployment
AWS Lambda (Serverless)
This deploys via the Serverless Framework with:
Runtime: Node.js 22.x on ARM64 (Graviton2)
Routes:
/.well-known/ucp(GET),/ucp/v1/*(ANY),/mcp(POST),/a2a(POST)DynamoDB: Three tables auto-provisioned (mandates, ledger, sessions) with PAY_PER_REQUEST billing
See docs/deployment.md for the full deployment guide.
Documentation
Document | Description |
System architecture, component responsibilities, data flow | |
Profile discovery, capability negotiation, checkout state machine | |
Mandate types, signature chain, verification process | |
AWS Lambda setup, CloudFront, monitoring | |
Pricing, support, what's included |
Examples
examples/claude-desktop.json-- Claude Desktop MCP configurationexamples/autonomous-purchase.ts-- Full autonomous purchase flowexamples/mandate-flow.ts-- AP2 mandate generation and verification
License
MIT License. See LICENSE for details.
Built for the agentic commerce era.