
MCP server for Shopify with full OAuth flow, 30+ tools for products, collections, inventory, draft orders, metafields, and bulk operations.
概览
A Model Context Protocol (MCP) server that connects agents to the Shopify Admin GraphQL API. Use it to browse, edit, and clean up store data via a curated set of tools. This project started from Ge Li's shopify-mcp. The unscoped shopify-mcp package on npm is theirs and does not include the changes in this repository. - CRUD for products, collections, orders, and customers - Draft orders for quotes, manual orders, and B2B pricing - Inventory and location lookups for stock workflows - Metafields for custom data - Metaobject entry creation and lookup for existing definitions - URL redirects management - OAuth login flow with local token caching - Bulk product cleanup utilities - Fail-closed read-only mode for audit and QA agents - Node.js 20+ - A Shopify custom app (OAuth or Admin API token) Use this when you want to run the MCP server from this local checkout instead of a remote deployment. Set at least: - MYSHOPIFY_DOMAIN=your-store.myshopify.com - Either: - SHOPIFY_CLIENT_ID=...
README
以下为原文 README 节选,完整内容请查看原文。
███████╗██╗ ██╗ ██████╗ ██████╗ ██╗███████╗██╗ ██╗ ███╗ ███╗ ██████╗██████╗
██╔════╝██║ ██║██╔═══██╗██╔══██╗██║██╔════╝╚██╗ ██╔╝ ████╗ ████║██╔════╝██╔══██╗
███████╗███████║██║ ██║██████╔╝██║█████╗ ╚████╔╝ ██╔████╔██║██║ ██████╔╝
╚════██║██╔══██║██║ ██║██╔═══╝ ██║██╔══╝ ╚██╔╝ ██║╚██╔╝██║██║ ██╔═══╝
███████║██║ ██║╚██████╔╝██║ ██║██║ ██║ ██║ ╚═╝ ██║╚██████╗██║
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝
Shopify MCP
A Model Context Protocol (MCP) server that connects agents to the Shopify Admin GraphQL API. Use it to browse, edit, and clean up store data via a curated set of tools.
npm: @benwmerritt/shopify-mcp
binary: shopify-mcp
This project started from Ge Li’s shopify-mcp. The unscoped shopify-mcp package on npm is theirs and does not include the changes in this repository.
Highlights
- CRUD for products, collections, orders, and customers
- Draft orders for quotes, manual orders, and B2B pricing
- Inventory and location lookups for stock workflows
- Metafields for custom data
- Metaobject entry creation and lookup for existing definitions
- URL redirects management
- OAuth login flow with local token caching
- Bulk product cleanup utilities
- Fail-closed read-only mode for audit and QA agents
Prerequisites
- Node.js 20+
- A Shopify custom app (OAuth or Admin API token)
Local setup (this repo)
Use this when you want to run the MCP server from this local checkout instead of a remote deployment.
- Install dependencies and build:
npm install
npm run build
- Create local env config:
cp .env.example .env
Set at least:
MYSHOPIFY_DOMAIN=your-store.myshopify.com- Either:
SHOPIFY_CLIENT_ID=...andSHOPIFY_CLIENT_SECRET=...for a Dev Dashboard app owned by the store’s organization; orSHOPIFY_ACCESS_TOKEN=shpat_xxxfor a static/manual token
REMOTE_MCP=false
- Start local MCP (stdio):
npm run start:local
start:local uses stdio mode. Remote mode is only enabled with --remote or REMOTE_MCP=true.
Read-only mode
Start a capability-restricted server for QA, audit, and reporting agents:
shopify-mcp --read-only --domain=.myshopify.com
# or
SHOPIFY_MCP_READ_ONLY=true npm run start:local
Read-only mode exposes only a reviewed allowlist of lookup and reporting tools.
All mutating, mixed read/write, file-upload, and unknown future tools are hidden.
The allowlist is fail-closed, so a newly added tool does not appear in a
read-only instance until it is explicitly reviewed. get-status reports the
effective access mode, whether the boundary is enforced, and whether write
tools are exposed.
Use a least-privilege Shopify token as well when one is available. The server boundary is designed to remain useful when a deployment must temporarily share
安装
npx @benwmerritt/shopify-mcp --accessToken <YOUR_ACCESS_TOKEN> --domain <YOUR_SHOP>.myshopify.com配置
{
"mcpServers": {
"shopify-local": {
"command": "node",
"args": [
"/absolute/path/to/shopify-mcp/dist/index.js",
"--domain",
"your-store.myshopify.com"
],
"env": {
"SHOPIFY_ACCESS_TOKEN": "shpat_xxx",
"REMOTE_MCP": "false"
}
}
}
}