Skip to main content
Glama
sahididrishi

Shopify MCP Server

by sahididrishi

Shopify MCP Server

Connect Claude to your Shopify store. This Model Context Protocol server gives Claude Code and Claude Desktop safe, structured access to products, orders, customers, inventory and sales analytics — so you can ask things like:

"Which orders from last week are still unfulfilled?" "Summarize June sales and tell me my top 5 products." "Set the M-size Summit Leggings stock to 40."

It ships with a complete demo store (Aurora Athletics — 30 products, 60 orders, 25 customers), so you can try every tool in under a minute with zero credentials, then point it at a real store when you're ready.

Tools

Tool

Type

What it does

search_products

read

Keyword search across titles, handles, types, vendors, tags and SKUs

get_product

read

Full product detail by id or handle: variants, SKUs, prices, live inventory

list_orders

read

Recent orders with status filter (any/open/closed/cancelled) and date range

get_order

read

One order in full: line items, totals breakdown, payment/fulfillment status, tracking numbers

get_customer

read

Customer profile by email or id, with lifetime stats and recent order history

update_inventory

write

Set a variant's available quantity (absolute); reports previous value so changes are reversible

sales_summary

read

Revenue, refunds, order count, AOV, best day and top products for any date range

top_customers

read

Customers ranked by net spend for any date range, with order counts and last-order dates

Related MCP server: cob-shopify-mcp

Architecture

flowchart LR
    Claude["Claude Code /<br/>Claude Desktop"] <-- "MCP over stdio" --> Server["shopify-mcp-server<br/>(8 tools, zod-validated)"]
    Server --> Iface{{"StoreBackend<br/>interface"}}
    Iface --> Demo["DemoBackend<br/>bundled fixtures,<br/>in-memory writes"]
    Iface --> Live["ShopifyBackend<br/>rate-limit aware<br/>REST client"]
    Live -- "Admin REST API<br/>(HTTPS + access token)" --> Shopify["Shopify"]

Both backends implement one StoreBackend interface, so every tool — including the sales_summary aggregation pipeline — behaves identically against fixtures and against a live store. The live client retries HTTP 429s (honoring Retry-After) and transient 5xx/network errors with exponential backoff, and follows Shopify's cursor pagination for analytics windows.

Quickstart (demo mode, no credentials)

Requires Node.js 20+.

git clone https://github.com/sahididrishi/shopify-mcp-server.git && cd shopify-mcp-server
npm install
npm run build

Add it to Claude Code:

claude mcp add shopify -- node /absolute/path/to/shopify-mcp-server/dist/index.js

Or to Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "shopify": {
      "command": "node",
      "args": ["/absolute/path/to/shopify-mcp-server/dist/index.js"]
    }
  }
}

Then just ask Claude: "Search the store for leggings" or "Give me a sales summary for the last 30 days."

With no Shopify credentials configured, the server automatically serves the fictional Aurora Athletics activewear store. Every tool is fully functional: analytics are computed from 60 realistic orders whose dates are rebased at startup, so the demo store always looks like it traded over the last 90 days. Inventory writes are held in memory and reset on restart — nothing touches the network.

Try it without Claude

npm run try-it

Spawns the built server as a real subprocess, connects an MCP client over stdio, and exercises search_products, get_order, get_customer and sales_summary with pretty-printed output. Exits non-zero on any failure, so it doubles as an integration test.

Connecting a real Shopify store

  1. In your Shopify admin, go to Settings → Apps and sales channels → Develop apps and click Create an app (enable custom app development if prompted).

  2. Under Configuration → Admin API integration, grant scopes:

    • read_products, read_orders, read_customers, read_inventory

    • write_inventory — only if you want the update_inventory tool to work; omit it for a read-only server

  3. Under API credentials, click Install app, then reveal and copy the Admin API access token (starts with shpat_). Shopify shows it once — store it safely.

  4. Configure the server via environment variables (see .env.example):

claude mcp add shopify \
  --env SHOPIFY_STORE_DOMAIN=your-store.myshopify.com \
  --env SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxx \
  -- node /absolute/path/to/shopify-mcp-server/dist/index.js

Variable

Required

Description

SHOPIFY_STORE_DOMAIN

for live mode

The *.myshopify.com domain (not your custom storefront domain)

SHOPIFY_ACCESS_TOKEN

for live mode

Custom app Admin API access token (shpat_...)

SHOPIFY_API_VERSION

no

Admin API version, defaults to 2026-04

If neither of the first two is set, the server runs in demo mode. If only one is set, it exits with a clear error rather than silently serving demo data.

Security notes

  • Your token never leaves your machine. The server runs locally, speaks to Claude over stdio (no listening ports), and sends the token only to https://<your-store>.myshopify.com.

  • Scope to what you need. Grant read-only scopes and the server is physically incapable of modifying your store — update_inventory will return a clear 403 explanation instead.

  • One deliberate write path. update_inventory is the only mutating tool, it is labelled WRITE OPERATION in its description so Claude treats it accordingly, and it echoes the previous quantity so any change can be reversed.

  • Keep .env files out of version control (.gitignore here already does).

Development

npm test                    # vitest: 44 unit + end-to-end tool tests, no network
npm run build               # tsc + fixture copy
npm run try-it              # integration smoke test against the built server
npm run generate-fixtures   # regenerate the demo store (seeded, deterministic)

The test suite drives the real MCP server through an in-memory client/server transport pair and pins the demo backend's reference date, so aggregation math in sales_summary is asserted against exact known-good figures.

Project layout

src/
  index.ts           entry point: backend selection + stdio transport
  server.ts          MCP server: tool registration, schemas, error mapping
  backend.ts         StoreBackend interface shared by both backends
  backends/
    shopify.ts       live Admin REST API client (retry, pagination, mapping)
    demo.ts          fixture-backed store with date rebasing
  analytics.ts       pure sales aggregation (unit tested)
  format.ts          markdown rendering for tool output
  fixtures/          Aurora Athletics demo data (JSON)
scripts/
  try-it.ts          stdio integration demo
  generate-fixtures.ts  deterministic fixture generator
tests/               vitest suites

License

MIT © 2026 Sahid Idrishi

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • A
    license
    -
    quality
    B
    maintenance
    A production-grade MCP server and CLI tool that enables AI agents to manage Shopify stores through 49 built-in tools across products, orders, inventory, and analytics. It supports natural language workflows for tasks like inventory tracking, customer support, and sales reporting.
    Last updated
    37
    17
    MIT
  • A
    license
    -
    quality
    F
    maintenance
    Free, open-source MCP server that connects Claude to the Shopify Partner API. 25 tools for revenue analytics, churn analysis, retention cohorts, merchant health scoring, conversion funnels, revenue forecasting, and growth velocity.
    Last updated
    12
    MIT
  • A
    license
    -
    quality
    F
    maintenance
    A comprehensive MCP server for Shopify Admin API integration, enabling AI assistants to manage products, orders, customers, inventory, analytics, and more through natural language.
    Last updated
    32
    18
    MIT

View all related MCP servers

Related MCP Connectors

  • Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

  • Shopify MCP Pack — wraps the Shopify Admin REST API (2024-01)

View all MCP Connectors

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/sahididrishi/shopify-mcp-server'

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