Shopify MCP
A read-only MCP server that lets AI assistants answer Shopify store operations questions via tools like get_shop, list_products, get_product, and list_orders.
README
Shopify MCP
A focused, read-only Model Context Protocol server for Shopify. It lets an assistant answer store operations questions without giving the model a general GraphQL console.
The four tools are get_shop, list_products, get_product, and list_orders. Mutations are left
out deliberately: an inventory or price write deserves a separate approval-oriented design.
Two ways to run it
- Local: one store, environment credentials, and stdio transport.
- Hosted: multiple Shopify installations, OAuth, encrypted tokens, bearer-protected Streamable HTTP, cursor pagination, retries, health checks, metrics, and uninstall cleanup.
Local setup
You need Python 3.11+ and a Shopify Admin API token with read_products, read_orders, or both.
python -m venv .venv
source .venv/bin/activate
pip install -e .
cp .env.example .env
Run shopify-mcp after loading SHOPIFY_SHOP and SHOPIFY_ACCESS_TOKEN. An MCP client entry looks
like this:
{
"mcpServers": {
"shopify": {
"command": "/absolute/path/to/.venv/bin/shopify-mcp",
"env": {
"SHOPIFY_SHOP": "your-store.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "shpat_replace_me",
"SHOPIFY_API_VERSION": "2026-07"
}
}
}
}
Hosted setup
The hosted service uses Shopify OAuth. Each installation gets a separate MCP bearer token; the Shopify Admin token is encrypted at rest and never reaches the MCP client.
Generate an encryption key:
python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'
Copy .env.example to .env and set BASE_URL, SHOPIFY_CLIENT_ID,
SHOPIFY_CLIENT_SECRET, TOKEN_ENCRYPTION_KEY, and DATABASE_PATH. Keep secrets in your hosting
platform's secret manager rather than committing .env.
In Shopify, configure:
Callback: https://your-host/auth/callback
Webhook: https://your-host/webhooks/app-uninstalled
Start the container:
docker compose up --build
Install a store by opening:
https://your-host/install?shop=your-store.myshopify.com
The callback displays the MCP URL (https://your-host/mcp) and bearer token once. Reinstalling a
store rotates that credential. Remote requests use Authorization: Bearer smcp_....
The OpenAI Responses API accepts the token through the remote MCP tool's authorization field. A
ChatGPT custom connector may require a full interactive OAuth authorization server depending on
workspace policy; this service is currently an OAuth resource server with provisioned bearer
credentials, not a general-purpose authorization server.
Design
Each tool owns a fixed GraphQL query. List calls are capped at 50 records and return
page_info.endCursor for the next call. The response includes Shopify throttle status.
The client applies timeouts and retries network failures, HTTP 429 responses, and 5xx responses with exponential backoff and jitter. Hosted MCP uses stateless JSON Streamable HTTP for easy horizontal transport scaling.
OAuth state is random, expires after ten minutes, and is consumed once. Callback and webhook HMACs use constant-time comparison. Expiring offline access and refresh tokens are encrypted and rotated before expiry; a per-store lock prevents concurrent use of Shopify's single-use refresh token. MCP tokens are stored only as SHA-256 digests. Uninstall webhooks remove all credentials.
The service emits JSON request logs, Prometheus-text metrics at /metrics, liveness at /healthz,
and database readiness at /readyz. Restrict /metrics at the proxy or private network.
Development
pip install -e '.[dev]'
ruff check .
pytest
Tests use mock HTTP transports and temporary encrypted databases; no Shopify store is required.
Production boundary
This is a deployable single-node production baseline, not a compliance certification. Before serving real merchants:
- Put it behind HTTPS, a WAF, and request-size/rate limits.
- Use a managed secret store and define encryption-key rotation procedures.
- Replace SQLite before running multiple replicas.
- Ship logs and metrics to an observability platform and configure alerts.
- Register all Shopify-required compliance webhooks and complete protected-customer-data review.
- Add an authorization server when a target MCP client cannot supply a bearer token.
- Run dependency, container, and application security scans and commission a security review.
Product variants remain limited to the first 25. See DEPLOYMENT.md for the operations checklist.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。