Shopify MCP Server
Provides real-time access to Shopify store analytics, including sales summaries, product performance, orders, customer metrics, inventory levels, and traffic data via ShopifyQL and the Admin GraphQL API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Shopify MCP Server What are my top 5 selling products this month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: Shopify Storefront MCP Server
Tools
Tool | Description |
| Total sales, net sales, orders, AOV, returns, and discounts for any date range |
| Revenue breakdown by product with sorting and limits |
| Sales split across channels (Online Store, POS, etc.) |
| Time series sales trends by day, week, month, quarter, or year |
| Recent orders with line items, customer info, and fulfillment status |
| Customer acquisition and behavior — new vs. returning over time |
| Sessions, visitors, and conversion rate — optionally grouped by source, device, or country |
| Sales breakdown by billing country |
| Marketing event data from Shopify campaigns |
| Shop campaign performance — ad spend vs. sales with period comparisons |
| Inventory levels by variant with SKU search and low-stock filtering |
| Sales breakdown by discount code |
| 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 |
| ShopifyQL queries (sales, traffic, campaigns) |
| Order details and history |
| Session and traffic data |
| Product and inventory data |
| 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 build4. 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 |
| Yes | Your |
| Yes | Admin API access token from step 2 |
| No | Defaults to |
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.
Available Tools
13 toolsshopify_ad_spendB
Get ad spend from Shopify marketing events (Shop campaigns, etc.). Shows spend per event for a date range.
Inputs: since, until.
shopify_customer_metricsB
Get customer acquisition and behavior metrics. Shows new vs returning customers over time.
Inputs: since, until, interval.
shopify_custom_queryA
Run a custom ShopifyQL query for advanced analytics. Use this when the pre-built tools don't cover your specific metric needs. Available tables: sales, orders, customers, sessions, shop_campaign_insights.
Inputs: query (required).
shopify_inventoryA
Get inventory levels for products/variants. Shows SKU, product title, variant title, inventory quantity, and location. Supports filtering by SKU or product title search.
Inputs: query, first, low_stock_only.
shopify_ordersB
Get recent orders with details. Useful for checking individual order status and recent activity.
Inputs: first, status, query.
shopify_sales_by_channelB
Get sales breakdown by sales channel (Online Store, POS, etc.).
Inputs: since, until.
shopify_sales_by_discountC
Get sales breakdown by discount code. Shows which discounts are driving the most revenue.
Inputs: since, until, limit.
shopify_sales_by_geographyC
Get sales breakdown by country or region.
Inputs: since, until, limit.
shopify_sales_by_productB
Get sales breakdown by product. Shows revenue, units sold, and orders per product.
Inputs: since, until, limit, order_by.
shopify_sales_over_timeB
Get sales metrics over time as a time series. Useful for trends and comparisons.
Inputs: since, until, interval, compare, +1 more.
shopify_sales_summaryA
Get a summary of sales metrics (total sales, net sales, orders, AOV, returns, discounts) for a date range. Defaults to last 30 days.
Inputs: since, until, compare.
shopify_shop_campaign_insightsB
Get Shop campaign performance metrics (ad spend, sales) from the shop_campaign_insights table. Covers Shop channel campaigns (e.g. Shop Pay campaigns).
Inputs: since, until, interval, group_by, +1 more.
shopify_trafficC
Get online store traffic and session metrics including visitors, sessions, and conversion rate.
Inputs: since, until, interval, group_by.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose targeting specific Shopify data domains like sales breakdowns, inventory, orders, customer metrics, and ad spend. There is no overlap in functionality; for example, shopify_sales_by_product focuses on product-level sales while shopify_sales_by_channel handles channel breakdowns, making tool selection straightforward for an agent.
All tools follow a consistent 'shopify_' prefix with descriptive snake_case names that clearly indicate their function, such as shopify_inventory and shopify_sales_over_time. This uniform pattern enhances readability and predictability, allowing agents to easily understand and navigate the toolset.
With 13 tools, the server is well-scoped for analytics and reporting in Shopify, covering key areas like sales, inventory, customer behavior, and marketing. Each tool serves a specific, non-redundant purpose, making the count appropriate and efficient for the domain without being overwhelming or insufficient.
The toolset provides comprehensive coverage for analytics, including sales, inventory, orders, customer metrics, and ad spend, with a custom query tool for flexibility. Minor gaps exist, such as no direct tools for modifying data (e.g., updating inventory or creating orders), but the custom query can mitigate this, and the focus is clearly on read-only analytics.
Maintenance
Related MCP Connectors
Ask questions across Shopify, Klaviyo, GA4 and 20+ e-commerce sources in plain English.
Run your Shopify store with AI: drafts you approve, what to fix, and how your store is doing.
Connect AI to store orders, products and inventory with scoped access and human approvals.
The AI data platform for commerce: Shopify, Amazon, ads and Klaviyo data with metrics defined once.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and manage Shopify store data including products, orders, inventory, and analytics through the Model Context Protocol. It allows users to query store performance and customer details using natural language.-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to query and interact with Shopify store data via the Storefront API, including products, collections, carts, and customer information.9-
- AlicenseAqualityCmaintenanceEnables AI agents to read and write Shopify store data including products, orders, customers, inventory, and more via the Admin GraphQL API.2858 npmMIT
- AlicenseAqualityDmaintenanceEnables Shopify store owners to get actionable business insights such as sales comparisons, inventory alerts, and recommendations, transforming raw data into meaningful decisions.1012 npmMIT