
cob-shopify-mcp
io.github.callobuzz由 GitHub 帳號 callobuzz 發布v0.12.1更新於 Nov 12, 2026
Run a Shopify store from any MCP client: products, orders, customers, stock and analytics.
概覽
將 AI 助理連接到 Shopify 商店的 Admin API,用來管理商品、訂單、客戶、庫存並進行銷售分析。
- 可以做什麼
- 列出、搜尋、建立與更新商品、款式、集合與標籤
- 列出、搜尋與檢視訂單,新增備註與標籤,建立草稿訂單、標記已付款、取消訂單,並管理出貨與物流追蹤
- 列出、搜尋、建立與更新客戶,查看其訂單、終身價值與標籤
- 依 SKU 或地點查詢庫存項目與庫存水位,產生低庫存報告,調整數量
- 執行 ShopifyQL 分析:銷售彙總、熱銷商品、退款率與回購率、同期群、轉換漏斗、流量與庫存風險
- 以資源形式提供商店資訊、地點、政策與貨幣,並提供健康檢查、銷售報告等預設提示
- 適用情境
- 適合需要助理查詢或操作實際 Shopify 商店的情境:商品與庫存查詢、訂單與出貨支援、客戶歷史以及銷售報表,也包含唯讀使用。
- 執行需求
- 以 npm 套件(Node.js)透過 stdio 在本機執行,或以 HTTP 容器執行。需要 SHOPIFY_STORE_DOMAIN,以及 SHOPIFY_ACCESS_TOKEN 或 SHOPIFY_CLIENT_ID 與 SHOPIFY_CLIENT_SECRET(來自已安裝到商店的 Shopify 應用程式,並授予對應權限範圍)。需要可連線 Shopify API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 cob-shopify-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
cob-shopify-mcp
[npm version] [build] [license] [node] [tools] [TypeScript] [GitHub stars]
The most complete open-source MCP server and CLI for Shopify. 62 built-in tools + 2 custom tool examples across 5 domains — use it as an MCP server for AI agents (Claude, Cursor, Windsurf) or as a standalone CLI to manage Shopify stores directly from your terminal.
Features
- 62 built-in tools + 2 custom tool examples across 5 domains — Products (15), Orders (15), Customers (9), Inventory (7), Analytics (16)
- Standalone CLI — natural domain commands from the terminal without MCP (
cob-shopify products list --limit 5,orders get --id ..., etc.) - MCP server — connect to Claude, Cursor, Windsurf, or any MCP-compatible AI agent
- 4 MCP resources (Shop info, Locations, Policies, Currencies)
- 4 MCP prompts (Health check, Sales report, Inventory risk, Support summary)
- Dual transport — stdio (default) + Streamable HTTP
- 3 auth methods — Static token, OAuth client credentials, OAuth authorization code
- Both Shopify GraphQL APIs — Admin by default, Storefront via
api: storefronton a custom tool, for the objects that exist on one schema only (Shop.brand— the merchant's logo and brand colours — has no Admin equivalent). The Storefront token is minted automatically from your Admin credentials, because a client-credentials app has no token page in the Shopify admin to copy one from - Cost tracking — Every response includes Shopify API cost metadata
- Rate limiting — Respects Shopify's cost-based throttling
- Query caching — Configurable TTL per query type
- 82% less context bloat — Advertise-and-Activate mode: 1 meta-tool instead of 62 schemas, domains loaded on demand
- Config-driven — YAML config, env vars, CLI overrides
- Type-safe — Full TypeScript with Zod validation
Why cob-shopify-mcp
MCP vs CLI — When to Use What
This project gives you two ways to interact with Shopify. Same tools, same engine, same auth — different interfaces.
You don't have to choose — install once, use both:
Advertise-and-Activate
Every MCP server on GitHub dumps all tool schemas into the AI's context on connect. With 62 tools, that's ~19,000 tokens consumed before the user even asks a question. Most conversations use 1-2 tools — 95% of those tokens are wasted.
Advertise-and-Activate fixes this. Instead of loading all 62 tool schemas, the server registers a single activate_tools meta-tool with a lightweight domain summary:
How it works:
- Connect — AI sees 1 tool:
activate_toolswith a description listing all domains and their tool counts - Activate — AI calls
activate_tools("analytics")— server dynamically registers 16 analytics tools - Execute — AI calls
top_productsas normal
Typical conversation: ~2,800 tokens instead of ~19,000. That's an 82% reduction.
No competitor Shopify MCP server has this. It requires clean domain grouping, a dynamic registry, and a meta-tool pattern — all built into this server's architecture.
Enable it:
Or via environment variable:
Custom YAML tools are included automatically — they declare a domain and appear in the corresponding summary.
CLI as Agent Tool (Zero-Config AI Access)
AI agents like Claude Code and Cursor have built-in terminal access. That means they can run CLI commands directly — no MCP server needed, no config required:
Every command outputs clean JSON when piped or when --json is passed. The AI reads the output and uses the data. The --schema flag lets the AI discover what inputs any command accepts:
No MCP connection, no server process, no protocol overhead. Just npm install -g cob-shopify-mcp and the AI can use every tool immediately.
You don't have to choose — install once, use both. Same tools, same engine, same Shopify API.
Use Cases
Integration Patterns
1. Direct MCP (simplest) — Claude, Cursor, or any MCP client connects directly:
2. Agent Orchestration Layer — Your custom agent framework uses MCP as the Shopify bridge:
3. RAG + MCP — Combine retrieval-augmented generation with live Shopify data:
4. Multi-Agent System — Multiple specialized agents share one MCP server:
Quick Start
Binary names:
cob-shopifyfor CLI use,cob-shopify-mcpfor MCP server setup. Same binary, two names.
First: Complete Getting Shopify Credentials below to get your Client ID, Client Secret, and store domain. Then come back here.
Pick one of the three paths below. All get you to the same result — a working MCP server connected to Claude.
Path A: npm install (simplest — no clone, no build)
Install globally and connect in two commands. No .env file needed — credentials go straight into the Claude config.
Connect to Claude CLI:
Done. Claude launches the server automatically when needed. Verify:
Or with npx (no install at all):
Or connect to Claude Desktop — add to claude_desktop_config.json (file location):
Restart Claude Desktop after saving. You'll see the tools icon showing 62 available tools.
Path B: Clone and build (for development / contributing)
Clone the repo and build from source. Claude launches the server via stdio — you don't run it yourself.
B1. Clone and build:
B2. Connect to Claude CLI:
Done. Verify:
Or connect to Claude Desktop — add to claude_desktop_config.json (file location):
Path C: Docker (long-running HTTP server)
Run the server as a container via HTTP transport. Good for always-on setups, VPS deployments, or shared team access.
C1. Clone and configure:
Edit .env with your credentials:
C2. Build and start the container:
Verify it's running:
C3. Connect to Claude CLI:
Or connect to Claude Desktop — add to claude_desktop_config.json (file location):
Windows note: Use
127.0.0.1notlocalhost— Docker on Windows may not bind to IPv6::1whichlocalhostcan resolve to.
Claude Desktop config file location:
Getting Shopify Credentials
Everything happens through the Shopify Developer Dashboard at dev.shopify.com. You need two things: a dev store (free) and an app with the right scopes.
Step 1 — Sign in to the Developer Dashboard
- Go to dev.shopify.com
- Sign in with your Shopify account (or create one — it's free, no credit card needed)
- You'll land on the Developer Dashboard with Apps, Dev stores, and Catalogs in the left sidebar
Step 2 — Create a development store
You need a store to test against. Dev stores are free and never expire.
- Click Dev stores in the left sidebar
- Click Create store
- Fill in the store name (e.g.,
my-dev-store) — this becomesmy-dev-store.myshopify.com - Complete the setup
Note your store domain — you'll need it:
my-dev-store.myshopify.com
Step 3 — Create an app and configure scopes
-
Click Apps in the left sidebar
-
Click Create app (top-right)
-
Enter an app name (e.g.,
Shopify MCP Server) and click Next -
You'll land on the version configuration page
-
Scroll down to the Access section
-
Click Select scopes — this opens a dropdown where you can either:
- Search and check each scope individually, or
- Paste a comma-separated list directly into the field
Full access (recommended — copy-paste this entire block):
Read-only? Use only the read scopes and set
COB_SHOPIFY_READ_ONLY=truein.env:
What each scope enables:
For even more scopes (themes, discounts, metafields, gift cards, marketing, returns, etc.) for custom YAML tools, see the Custom Tools Guide.
- Click Release (top-right) to create the app version with these scopes
Step 4 — Get your Client ID and Client Secret
- Click Settings in the left sidebar
- Under Credentials, copy the Client ID (a 32-character hex string)
- Click the reveal icon next to Secret and copy it (starts with
shpss_)
Step 5 — Install the app on your dev store
- Click Overview in the left sidebar (or your app name at the top)
- Under Installs, click Install app
- Select your development store and approve the permissions
Step 6 — Configure .env
Fill in your credentials:
The server uses client credentials auth — it automatically exchanges your Client ID + Secret for a 24-hour access token, and refreshes it before it expires. No manual token management needed.
Alternative: Static access token. If you already have a
shpat_token (from Shopify CLI, a custom app, or another source), you can use that instead:When
SHOPIFY_ACCESS_TOKENis set, the server uses it directly and ignores Client ID/Secret.
Done. Proceed to Quick Start to run the server.
Configuration
Config File
Create cob-shopify-mcp.config.yaml in your project root:
Environment Variables
Config Precedence
defaults < config file < environment variables < CLI flags
auth.method is inferred as client-credentials when client_id and client_secret are set
and no access_token is — but only when no layer declared a method. The authorization-code
flow needs those same credentials, so set SHOPIFY_AUTH_METHOD=authorization-code (or
auth.method in the config file) to use it; an explicit value is never overridden.
CLI Commands
Tools Reference
Products (15 tools)
Orders (15 built-in + 2 custom examples)
Customers (9 tools)
Inventory (7 tools)
Analytics (16 tools)
All analytics tools use ShopifyQL — single API call per query, no cursor pagination.
Other Editors (Cursor / Windsurf)
Add to .cursor/mcp.json or equivalent:
Development
Running the live tests
Live tests are gated on credentials and skip cleanly without them. Put either auth method in
.env (gitignored) — client credentials are enough, no separate access token required:
The app needs all 13 scopes the tools use — read_reports in particular, or every ShopifyQL
analytics tool fails:
A fresh dev store has no data, so analytics assertions will be vacuous — node scripts/create-test-orders.js
seeds it first.
pnpm testdeliberately does not load.env: the unit suite stays hermetic. That means live tests always skip there, by design. Usepnpm test:integrationto actually exercise a store.
Architecture
[Interactive Architecture Diagram]
Animated, interactive diagram showing how Entry Points, Core Engine, Shopify Shell, and the GraphQL API connect
Project Structure
How It Compares
61 tools ship enabled out of the box (all Tier 1; the 62nd, shopifyql_query, is Tier 2 and opt-in) — but the tool count is unlimited. Developers can add any Shopify GraphQL operation as a custom tool using simple YAML files, no TypeScript required:
Point your config at the directory and they're live:
The 3-tier system gives full control: Tier 1 (enabled by default), Tier 2 (disabled by default, opt-in via config), Tier 3 (custom YAML tools, enabled by default). Plus tools.enable / tools.disable for granular overrides.
See the Custom Tools Guide for the full reference — YAML structure, variable naming rules, response mapping, scopes reference, error handling, and step-by-step examples.
The package ships with 5 ready-to-use custom tools in custom-tools/ — draft order completion, fulfillment orders, create fulfillment with tracking, update tracking, and order cancellation. They're enabled by default in .env.example (COB_SHOPIFY_CUSTOM_TOOLS=./custom-tools). To disable them, remove or comment out that line.
Managing Tools
Custom YAML Tools
Any Shopify GraphQL query or mutation can become a tool without writing TypeScript: drop a .yaml
file in a directory and point custom_paths (or COB_SHOPIFY_CUSTOM_TOOLS) at it. Admin is the
default; since 0.10.0 a tool can declare api: storefront and reach the Storefront API
instead — see Talking to the Storefront API.
Input fields declare a type, and the vocabulary is:
array and object arrived in 0.8.0. They are what let a tool take a list — choosing which
lines go in a fulfillment, for instance:
Two things are worth knowing before you reach for them:
- An omitted optional list is not an empty one. GraphQL drops an argument whose variable was
never provided, so leaving a list out means "the API decides" while
[]means "none". ForfulfillmentCreatethose two readings differ by the whole order — omitted fulfils everything remaining. Usemin: 1when an empty list must be refused rather than interpreted. - Undeclared properties are stripped, silently. A key you do not list under
properties:never reaches Shopify. If a variable appears to be ignored, check that every field of it is declared.
Talking to the Storefront API
Shopify has two GraphQL APIs, and a few things live on only one of them. Shop.brand — the
merchant's uploaded logo, square logo, cover image and brand colours — is Storefront-only and has
no Admin equivalent, so before 0.10.0 no tool in this package could reach it: the query
loaded, the server booted, the connection reported healthy, and the call failed with
Field 'brand' doesn't exist on type 'Shop'.
Declare the API on the tool. admin is the default and what every tool written before 0.10.0 is:
The token is minted for you. An app installed with client credentials has no Storefront token
page anywhere in the Shopify admin — that panel belongs to admin-created custom apps — so there is
usually nothing to paste even if you want to. storefrontAccessTokenCreate is an Admin
mutation, so this package creates the token from the credentials it already has, reusing an
existing one where the store has it. Nothing is requested until a api: storefront tool actually
runs.
To supply your own instead, set auth.storefront_access_token or
SHOPIFY_STOREFRONT_ACCESS_TOKEN.
What a Storefront token may read comes from the app's
unauthenticated_*scopes, which are separate from its Admin ones. An app with fifty Admin scopes and none of these mints a token successfully and then reads nothing. Shop-level content generally wantsunauthenticated_read_content. Add it to the app's release and re-install the app — a client-credentials app picks up new scopes only on re-authorisation.
A broken tool fails to load, rather than running wrongly
0.9.0 turned two mistakes from silent runtime behaviour into a refusal at load time. Both used to produce a tool that registered, reported healthy, and did the wrong thing when called.
A type: the loader does not implement is refused. It used to fall through to string, so
type: integer quietly became a string field — 5 was rejected and "5" was sent to Shopify as
text. The error names the field, including nested ones:
input: and your GraphQL variables must be the same set, in both directions. A YAML tool has
no handler — the engine runs your document with the validated input as its variables and nothing
else — so any difference between the two is a bug you cannot see:
- a variable no
input:declares can never be supplied, and GraphQL reads an absent optional variable as "not specified"; - an
input:no variable uses is validated and then dropped, so the tool advertises a parameter it ignores.
One typo causes both. The complete_draft_order tool shipped with payment_pending in its input
and $paymentPending in its mutation, so asking for a pending payment completed the draft order
as paid — with no error anywhere. It is fixed in 0.9.0, and the loader now refuses that shape.
A $ inside a string literal, a # comment or a """ block is not read as a variable, so
query: "price:>$100" is fine.
Full guide, including the scopes reference → Custom Tools Guide
Ecosystem
This server manages your store via the Admin GraphQL API. Pair it with Shopify's official MCP servers for the complete experience:
Changelog
See the full changelog here → CHANGELOG.md
About
Built by Call O Buzz Services — AI-driven software development, SaaS solutions, and open source tools.
License
MIT
來源:README.md,提交 d53db36
工具
0版本歷史
1- v0.12.1最新Nov 12, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
