Shopify MCP Server
Provides AI assistants with real-time access to Shopify store analytics, sales data, and inventory through ShopifyQL and the Admin GraphQL API. It enables users to query store performance, customer metrics, and marketing insights using natural language.
README
Shopify MCP Server
An MCP server that gives AI assistants real-time access to your Shopify store analytics through ShopifyQL and the Admin GraphQL API.
What It Does
Connect any MCP-compatible AI assistant (Claude, GPT, Cursor, etc.) to your Shopify store. Ask questions in plain English — the server translates them into ShopifyQL queries and GraphQL calls, then returns real data from your store. Sales, orders, inventory, traffic, marketing — all queryable through conversation.
Tools
| Tool | Description |
|---|---|
shopify_sales_summary |
Total sales, net sales, orders, AOV, returns, and discounts for any date range |
shopify_sales_by_product |
Revenue breakdown by product with sorting and limits |
shopify_sales_by_channel |
Sales split across channels (Online Store, POS, etc.) |
shopify_sales_over_time |
Time series sales trends by day, week, month, quarter, or year |
shopify_orders |
Recent orders with line items, customer info, and fulfillment status |
shopify_customer_metrics |
Customer acquisition and behavior — new vs. returning over time |
shopify_traffic |
Sessions, visitors, and conversion rate — optionally grouped by source, device, or country |
shopify_sales_by_geography |
Sales breakdown by billing country |
shopify_ad_spend |
Marketing event data from Shopify campaigns |
shopify_shop_campaign_insights |
Shop campaign performance — ad spend vs. sales with period comparisons |
shopify_inventory |
Inventory levels by variant with SKU search and low-stock filtering |
shopify_sales_by_discount |
Sales breakdown by discount code |
shopify_custom_query |
Run raw ShopifyQL for anything the pre-built tools don't cover |
Setup
Prerequisites
- Node.js 18+
- A Shopify store with a custom app
1. Create a Shopify Custom App
- In your Shopify admin, go to Settings > Apps and sales channels > Develop apps
- Click Create an app and give it a name
- Under Configuration, click Configure Admin API scopes and enable these scopes:
| Scope | Purpose |
|---|---|
read_reports |
ShopifyQL queries (sales, traffic, campaigns) |
read_orders |
Order details and history |
read_analytics |
Session and traffic data |
read_products |
Product and inventory data |
read_customers |
Customer metrics |
- Click Save and then Install app
2. Get Your Access Token
The included get-token.js script handles the OAuth flow:
node get-token.js <shop.myshopify.com> <client_id> <client_secret>
This starts a local server, opens your browser to authorize the app, and prints the access token to your terminal. Copy it — you'll need it next.
3. Build the Server
npm install
npm run build
4. Configure Your MCP Client
Add the server to your .mcp.json (or equivalent config for your AI tool):
{
"mcpServers": {
"shopify": {
"command": "node",
"args": ["/path/to/shopify-mcp-server/dist/index.js"],
"env": {
"SHOPIFY_DOMAIN": "your-store.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "shpat_xxxxx",
"SHOPIFY_API_VERSION": "2025-10"
}
}
}
}
Replace /path/to/shopify-mcp-server with the actual path to this project on your machine.
Environment Variables
| Variable | Required | Description |
|---|---|---|
SHOPIFY_DOMAIN |
Yes | Your .myshopify.com domain |
SHOPIFY_ACCESS_TOKEN |
Yes | Admin API access token from step 2 |
SHOPIFY_API_VERSION |
No | Defaults to 2025-10 |
Usage Examples
Once configured, ask your AI assistant things like:
- "How are sales this month compared to last month?" — triggers
shopify_sales_summarywith comparison - "What are my top 10 products by revenue this quarter?" — triggers
shopify_sales_by_product - "What's my conversion rate this week, broken down by traffic source?" — triggers
shopify_trafficgrouped by referrer - "Show me any products with fewer than 5 units in stock" — triggers
shopify_inventorywith low-stock filter - "How much am I spending on Shop campaigns and what's the return?" — triggers
shopify_shop_campaign_insights
The AI picks the right tool automatically based on your question.
License
MIT
Built By
Hamza Shahbaz — Senior web developer, 13+ years building for the web.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。