Skip to main content
Glama
kuro-tomo

Shopify Agentic MCP Gateway

by kuro-tomo

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.

UCP 2026-01 AP2 Mandates MCP 1.12+ TypeScript License: MIT


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


Related MCP server: ACP Commerce MCP Server

Features

  • 5 MCP Tools -- scout_inventory, manage_cart, negotiate_terms, execute_checkout, track_order

  • UCP Profile Discovery -- /.well-known/ucp endpoint with capability negotiation and transport advertisement

  • AP2 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-detection

  • Dual 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

git clone https://github.com/kuro-tomo/shopify-agentic-mcp.git
cd shopify-agentic-mcp
npm install

2. Configure

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

3. Build and Run

npm run build
npm start

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):

{
  "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."


Architecture

                          +------------------+
                          |   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 Reference

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.


Environment Variables

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)


Deployment

AWS Lambda (Serverless)

npm run build
npm run deploy

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

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


Examples


License

MIT License. See LICENSE for details.


Built for the agentic commerce era.

Documentation | Examples | Issues

Available Tools

5 tools
execute_checkoutA

Execute a full checkout with AP2 mandate chain verification (intent, cart, payment mandates).

ParametersJSON Schema
NameRequiredDescriptionDefault
checkout_idYesCheckout session ID to complete
cart_mandateYesJWS compact token for the cart mandate
intent_mandateYesJWS compact token for the intent mandate
payment_mandateYesJWS compact token for the payment mandate

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions 'mandate chain verification' but does not disclose side effects, success/failure outcomes, or required permissions for this mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that is front-loaded with the action and key verification aspect. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a checkout with 4 required params and no output schema or annotations, the description lacks details on return values, success indicators, and workflow prerequisites. It is adequate but incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with basic descriptions. The description adds value by explaining the mandate chain verification context (intent, cart, payment) beyond the schema's 'JWS compact token' labels.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'execute' and resource 'checkout' and explains the AP2 mandate chain verification, clearly distinguishing this tool from siblings like manage_cart, negotiate_terms, scout_inventory, and track_order.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is used after gathering mandates (intent, cart, payment) but does not explicitly state when to use it versus alternatives or mention prerequisites. A more explicit guideline would improve clarity.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

manage_cartC

Create, modify, or retrieve a Shopify cart (create, add, remove, get).

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesCart operation to perform
cart_idNoExisting cart ID (required for add/remove/get)
quantityNoQuantity to add or set (default 1)
variant_idNoProduct variant ID (required for add/remove)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description only implies read/write behavior. It does not disclose side effects, authorization needs, or other operational traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that front-loads the purpose. It is concise and efficient, though it could benefit from slightly more detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given four parameters, no output schema, and no annotations, the description is too minimal. It does not explain return values, usage patterns, or how to chain actions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already describes all four parameters. The description adds no extra meaning beyond the enum values for action.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool manages a Shopify cart with actions (create, add, remove, get). It is distinct from sibling tools like execute_checkout or scout_inventory, but it lacks explicit differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus siblings. It lists actions but does not explain when to perform each action or provide context about cart prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

negotiate_termsB

Negotiate capabilities, discounts, and shipping options between an agent and the merchant.

ParametersJSON Schema
NameRequiredDescriptionDefault
cart_idYesCart or checkout session ID
discount_codeNoDiscount code to apply
agent_profile_urlYesURL to the agent UCP profile

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description lacks behavioral details such as whether the operation is synchronous, modifies state, or requires specific permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, concise and front-loaded, but could be more structured with separate clauses for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a negotiation tool with no output schema or annotations, the description is too brief. It does not explain return values, success criteria, or how the negotiation process works.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for each parameter. The description adds high-level context (capabilities, discounts, shipping options) but does not significantly enhance parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb (Negotiate) and resource (capabilities, discounts, shipping options) between agent and merchant, distinguishing it from siblings like execute_checkout or manage_cart.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose, but no explicit when-to-use or when-not-to-use guidance is given, nor are alternatives mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scout_inventoryB

Search the Shopify catalog for products matching query, category, and price filters.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
queryYesSearch query for product discovery
categoryNoProduct category filter
price_maxNoMaximum price in minor units (cents)
price_minNoMinimum price in minor units (cents)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states it searches with filters, but does not disclose read-only nature, pagination, rate limits, or any side effects. Minimal behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that is concise and to the point. It effectively conveys the core functionality without unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the description does not explain what the tool returns (e.g., list of products, count). With 5 parameters and no annotations, the description lacks completeness about behavior and outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so schema already documents parameters. The description lists 'query, category, and price filters' but does not add meaning beyond schema (e.g., that price_min/price_max are in cents). Baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches the Shopify catalog for products using query, category, and price filters. It uses a specific verb and resource, and is distinct from sibling tools like execute_checkout or manage_cart, which handle different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for product search but provides no explicit guidance on when to use vs alternatives or when not to use. No exclusions or context about prerequisites are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

track_orderA

Retrieve order status and fulfillment tracking information.

ParametersJSON Schema
NameRequiredDescriptionDefault
order_idYesShopify order ID to track

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states the retrieval purpose without disclosing behavioral traits like error handling, authorization needs, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, focused sentence of 8 words efficiently conveys the tool's purpose without any extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description adequately conveys the core function. However, adding behavior details would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single parameter 'order_id' is clearly described in the schema. The tool description adds no extra meaning beyond the schema, meeting baseline expectation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves order status and fulfillment tracking information. It distinguishes from sibling tools like execute_checkout (creates orders) and manage_cart (modifies cart).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when order tracking is needed, but does not explicitly state when to use or avoid this tool versus alternatives. No usage conditions or exclusions are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv0.1.0
    • First observedexecute_checkout
    • First observedmanage_cart
    • First observednegotiate_terms
    • First observedscout_inventory
    • First observedtrack_order

TDQS

A3.6/5.0
Disambiguation5/5

Each tool targets a distinct operation: checkout, cart management, negotiation, inventory search, and order tracking. No two tools overlap in purpose, making agent selection unambiguous.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (execute_, manage_, negotiate_, scout_, track_) with imperative verbs. No mixing of conventions.

Tool Count5/5

With 5 tools, the server is well-scoped for a Shopify e-commerce agent. The count is neither too sparse nor overloaded, covering essential workflows without unnecessary complexity.

Completeness4/5

Covers core shopping lifecycle: cart, inventory, checkout, negotiation, and order tracking. Minor gaps like detailed product lookup by ID or order modification exist, but the surface supports primary agent tasks effectively.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to manage Shopify stores via natural language, with tools for products, orders, inventory, customers, and analytics.
    24
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to discover, check stock, and purchase products through your existing store APIs, with spend mandates, discount ceilings, and a full audit trail enforced in code.
    43,227
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kuro-tomo/shopify-agentic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server