loading…
Search for a command to run...
loading…
Enables AI agents to autonomously browse inventory, negotiate terms, manage carts, and execute secure payments on Shopify stores using standardized protocols. I
Enables AI agents to autonomously browse inventory, negotiate terms, manage carts, and execute secure payments on Shopify stores using standardized protocols. It provides a bridge for LLMs to handle the entire commerce lifecycle from discovery to order tracking through a verifiable mandate chain.
The first tri-protocol commerce gateway for autonomous AI agents on Shopify.
Let AI agents browse, negotiate, cart, pay, and track orders -- fully autonomously.
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 /.well-known/ucp, negotiate capabilities, and interact via a standard shopping service API |
| 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 |
scout_inventory, manage_cart, negotiate_terms, execute_checkout, track_order/.well-known/ucp endpoint with capability negotiation and transport advertisementincomplete -> requires_escalation -> ready_for_complete) with auto-detectiongit clone https://github.com/kuro-tomo/shopify-agentic-mcp.git
cd shopify-agentic-mcp
npm install
cp .env.example .env
Edit .env with your Shopify credentials:
SHOPIFY_STORE_DOMAIN=your-store.myshopify.com
SHOPIFY_STOREFRONT_TOKEN=your_storefront_token
SHOPIFY_ACCESS_TOKEN=your_access_token
SHOPIFY_API_KEY=your_api_key
SHOPIFY_API_SECRET=your_api_secret
npm run build
npm start
The MCP server starts in stdio mode, ready for Claude Desktop or any MCP client.
Add this to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"shopify-agentic": {
"command": "node",
"args": ["/absolute/path/to/shopify-agentic-mcp/dist/index.js"],
"env": {
"SHOPIFY_STORE_DOMAIN": "your-store.myshopify.com",
"SHOPIFY_STOREFRONT_TOKEN": "your_token"
}
}
}
}
Now ask Claude: "Search for wireless headphones under $50 and add the best one to my cart."
+------------------+
| AI Agent |
| (Claude / GPT) |
+--------+---------+
|
MCP (stdio / HTTP)
|
+--------v---------+
| MCP Server |
| 5 Tool Handlers |
+--------+---------+
|
+--------------------+--------------------+
| | |
+--------v-------+ +--------v--------+ +---------v--------+
| UCP Layer | | AP2 Layer | | Middleware |
| - Profile | | - Signer | | - Guardrail |
| - Negotiate | | - Verifier | | - Fee Collector |
| - Checkout SM | | - Mandate Store | | - Rate Limiter |
| - Discovery | | | | - Auth |
+--------+--------+ +-----------------+ +------------------+
|
+--------v--------+
| Shopify APIs |
| - Storefront GQL |
| - Admin REST |
+------------------+
| Tool | Description | Key Parameters |
|---|---|---|
scout_inventory |
Search the Shopify catalog for products | query (string), category?, price_min?, price_max?, limit? |
manage_cart |
Create, modify, or retrieve a shopping cart | action (create/add/remove/get), cart_id?, variant_id?, quantity? |
negotiate_terms |
Negotiate capabilities, discounts, and shipping between agent and merchant | cart_id (string), agent_profile_url (string), discount_code? |
execute_checkout |
Complete a purchase with AP2 mandate chain verification | checkout_id, intent_mandate, cart_mandate, payment_mandate |
track_order |
Retrieve order status and fulfillment tracking | order_id (string) |
All prices are in minor units (cents). A $29.99 product has price: 2999.
| Variable | Required | Description |
|---|---|---|
SHOPIFY_STORE_DOMAIN |
Yes | Your Shopify store domain (e.g., store.myshopify.com) |
SHOPIFY_STOREFRONT_TOKEN |
Yes | Storefront API access token |
SHOPIFY_ACCESS_TOKEN |
Yes | Admin API access token |
SHOPIFY_API_KEY |
Yes | Shopify app API key |
SHOPIFY_API_SECRET |
Yes | Shopify app API secret |
AP2_SIGNING_PRIVATE_KEY |
Yes | ES256 private key in JWK format for mandate signing |
AP2_VERIFICATION_PUBLIC_KEY |
No | ES256 public key in JWK format (defaults to deriving from private key) |
GATEWAY_BASE_URL |
No | Public gateway URL (default: http://localhost:3000) |
FEE_RATE |
No | Platform fee rate as decimal (default: 0.005 = 0.5%) |
FEE_WALLET_ADDRESS |
No | Wallet address for fee collection |
LOG_LEVEL |
No | Logging level (default: info) |
npm run build
npm run deploy
This deploys via the Serverless Framework with:
/.well-known/ucp (GET), /ucp/v1/* (ANY), /mcp (POST), /a2a (POST)See docs/deployment.md for the full deployment guide.
| Document | Description |
|---|---|
| Architecture | System architecture, component responsibilities, data flow |
| UCP Integration | Profile discovery, capability negotiation, checkout state machine |
| AP2 Mandates | Mandate types, signature chain, verification process |
| Deployment Guide | AWS Lambda setup, CloudFront, monitoring |
| Developer Kit | Pricing, support, what's included |
MIT License. See LICENSE for details.
Built for the agentic commerce era.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"shopify-agentic-mcp-gateway": {
"command": "npx",
"args": []
}
}
}