Shopify Dev MCP Server
Provides tools for exploring and searching Shopify GraphQL schemas and validating GraphQL code blocks against them, helping developers build valid Admin API operations.
Provides tools for Shopify development, including learning supported Shopify APIs, searching and fetching shopify.dev documentation, introspecting Shopify GraphQL schemas, validating GraphQL operations, and optionally validating Liquid/theme files.
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 Dev MCP Server search Shopify docs for how to create a product with Admin GraphQL"
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 Dev MCP Server
This project implements a Model Context Protocol (MCP) server that interacts with Shopify Dev. This protocol supports various tools to interact with different Shopify APIs. At the moment the following APIs are supported:
Admin GraphQL API
Functions
(Optional) Polaris Web Components
(Optional) Liquid/Theme validation
Setup
To run the Shopify MCP server using npx, use the following command:
npx -y @shopify/dev-mcp@latestRelated MCP server: MCP Shopify Admin Server
Usage with Cursor or Claude Desktop
Add the following configuration. For more information, read the Cursor MCP documentation or the Claude Desktop MCP guide.
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"]
}
}
}On Windows, you might need to use this alternative configuration:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "cmd",
"args": ["/k", "npx", "-y", "@shopify/dev-mcp@latest"]
}
}
}Disable instrumentation
In order to better understand how to improve the MCP server, this package makes instrumentation calls. In order to disable them you can set the OPT_OUT_INSTRUMENTATION environment variable. In Cursor or Claude Desktop the configuration would look like this:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"OPT_OUT_INSTRUMENTATION": "true"
}
}
}
}Opt-in Polaris support (experimental)
If you want Cursor or Claude Desktop to surface Polaris Web Components documentation, include an env block with the POLARIS_UNIFIED flag in your MCP server configuration:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"POLARIS_UNIFIED": "true"
}
}
}
}Opt-in Liquid/Theme validation support (experimental)
If you want Cursor or Claude Desktop to validate Liquid code and theme files, include an env block with the LIQUID flag in your MCP server configuration:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"LIQUID": "true"
}
}
}
}You can also control the validation mode by setting LIQUID_VALIDATION_MODE:
"full"(default): Enables thevalidate_themetool for validating entire theme directories"partial": Enables thevalidate_theme_codeblockstool for validating individual codeblocks
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"LIQUID": "true",
"LIQUID_VALIDATION_MODE": "partial"
}
}
}
}Available tools
This MCP server provides the following tools:
Tool Name | Description |
learn_shopify_api | Start here first - Teaches the LLM about supported Shopify APIs and how to use this MCP server's tools to generate valid code blocks for each API. This tool makes a request to shopify.dev to get the most up-to-date instruction for how to best work with the API the user would need to use for their prompt. |
search_docs_chunks | Search across all shopify.dev documentation to find relevant chunks matching your query. Useful for getting content from many different documentation categories, but may have incomplete context due to chunking |
fetch_full_docs | Retrieve complete documentation for specific paths from shopify.dev. Provides full context without chunking loss, but requires knowing the exact path. Paths are provided via |
introspect_graphql_schema | Explore and search Shopify GraphQL schemas to find specific types, queries, and mutations. Returns schema elements filtered by search terms, helping developers discover available fields, operations, and data structures for building GraphQL operations |
validate_graphql_codeblocks | Validate GraphQL code blocks against a specific GraphQL schema to ensure they don't contain hallucinated fields or operations |
validate_theme_codeblocks | (When |
validate_theme | (When |
Tool Usage Guidelines
When to use each documentation tool
learn_shopify_api: Always call this first when working with Shopify APIs. It provides essential context about supported APIs and generates a conversation ID for tracking usage across tool calls.search_docs_chunks: Use when you need to find relevant information across multiple documentation sections or when you don't know the specific path. This tool searches through chunked content which allows for better token matching within smaller content pieces, but may miss some context from individual pages.fetch_full_docs: Use when you need complete documentation for a specific API resource and know the exact path (e.g.,/docs/api/admin-rest/resources/product). This provides full context without any information loss from chunking.
When to use theme validation tools (requires LIQUID=true)
validate_theme_codeblocks: Use when generating or modifying individual Liquid files or codeblocks. This tool validates syntax, checks for undefined objects/filters, and ensures references to other files exist. Perfect for incremental development and quick validation of code snippets.validate_theme: Use when working with complete theme directories to validate all files at once. This comprehensive validation catches cross-file issues, ensures consistency across the theme, and applies all Theme Check rules.
Available prompts
This MCP server provides the following prompts:
Prompt Name | Description |
shopify_admin_graphql | Help you write GraphQL operations for the Shopify Admin API |
Development
The server is built using the MCP SDK and communicates with Shopify Dev.
npm installModify source files
Run
npm run buildto compile ornpm run build:watchto watch for changes and compileRun
npm run testto run testsAdd an MCP server that runs this command:
node <absolute_path_of_project>/dist/index.js
License
ISC
Available Tools
5 toolsfetch_full_docsC
Use this tool to retrieve a list of full documentation pages from shopify.dev.
Inputs: paths (required), conversationId (required).
introspect_graphql_schemaA
This tool introspects and returns the portion of the Shopify Admin API GraphQL schema relevant to the user prompt. Only use this for the Shopify Admin API, and not any other APIs like the Shopify Storefront API or the Shopify Functions API.
Inputs: api (required), query (required), conversationId (required), filter, +1 more.
learn_shopify_apiA
🚨 MANDATORY FIRST STEP: This tool MUST be called before any other Shopify tools.
⚠️ ALL OTHER SHOPIFY TOOLS WILL FAIL without a conversationId from this tool.
This tool generates a conversationId that is REQUIRED for all subsequent tool calls. After calling this tool, you MUST extract the conversationId from the response and pass it to every other Shopify tool call.
🔄 MULTIPLE API SUPPORT: You MUST call this tool multiple times in the same conversation when you need to learn about different Shopify APIs. THIS IS NOT OPTIONAL. Just pass the existing conversationId to maintain conversation continuity while loading the new API context.
For example, a user might ask a question about the Admin API, then switch to the Functions API, then ask a question about polaris UI components. In this case I would expect you to call learn_shopify_api three times with the following arguments:
- learn_shopify_api(api: "admin") -> conversationId: "123"
- learn_shopify_api(api: "functions", conversationId: "123")
- learn_shopify_api(api: "polaris", conversationId: "123")
This is because the conversationId is used to maintain conversation continuity while loading the new API context.
🚨 Valid arguments for `api` are:
🔄 WORKFLOW:
1. Call learn_shopify_api first with the initial API
2. Extract the conversationId from the response
3. Pass that same conversationId to ALL other Shopify tools
4. If you need to know more about a different API at any point in the conversation, call learn_shopify_api again with the new API and the same conversationId
DON'T SEARCH THE WEB WHEN REFERENCING INFORMATION FROM THIS DOCUMENTATION. IT WILL NOT BE ACCURATE.
PREFER THE USE OF THE fetch_full_docs TOOL TO RETRIEVE INFORMATION FROM THE DEVELOPER DOCUMENTATION SITE.
Inputs: api (required), conversationId.
search_docs_chunksB
This tool will take in the user prompt, search shopify.dev, and return relevant documentation and code examples that will help answer the user's question.
Inputs: prompt (required), conversationId (required), max_num_results.
validate_graphql_codeblocksA
This tool validates GraphQL code blocks against the Shopify GraphQL schema to ensure they don't contain hallucinated fields or operations. If a user asks for an LLM to generate a GraphQL operation, this tool should always be used to ensure valid code was generated.
It returns a comprehensive validation result with details for each code block explaining why it was valid or invalid. This detail is provided so LLMs know how to modify code snippets to remove errors.
Inputs: api (required), version (required), codeblocks (required), conversationId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have clearly distinct roles: API context bootstrap, docs search, full-doc fetch, schema introspection, and code validation. The only plausible overlap is search_docs_chunks versus fetch_full_docs, but their descriptions distinguish retrieval of relevant chunks from full pages.
All tools use snake_case and begin with a verb, making the set predictable and readable. There is minor variation in noun specificity, such as learn_shopify_api versus introspect_graphql_schema, but the overall convention is consistent.
Five tools is well-scoped for a developer-assistance MCP server focused on documentation, schema inspection, and validation. Each tool has a clear reason to exist and the surface is not bloated.
The set covers the core workflow: initialize API context, search docs, fetch full documentation pages, introspect Admin GraphQL schema, and validate GraphQL code. Minor gaps remain, such as schema introspection for non-Admin APIs and no tool for executing or testing generated operations.
Maintenance
Related MCP Connectors
Shopify store analysis and product-catalog extraction as agent tools.
Check any Shopify store's readiness for ChatGPT & AI shopping agents. Free, no API key, 8 languages.
Gives AI agents direct access to your Sanity projects and guidance for working with them
Live product search for AI agents across Shopify merchants and major retailers.
Related MCP Servers
- AlicenseDqualityDmaintenanceEnables interaction with Shopify stores through the GraphQL Admin API. Supports product management, customer data, order queries, blog/article management, and store-wide search capabilities through natural language.152MIT
- AlicenseAqualityDmaintenanceExposes Shopify Admin API capabilities to LLMs, enabling product, order, customer, and inventory management via natural language.491MIT
- AlicenseAqualityCmaintenanceEnables AI agents to read and write Shopify store data including products, orders, customers, inventory, and more via the Admin GraphQL API.2858 npmMIT
- AlicenseNot gradedqualityCmaintenanceConnects MCP-compatible clients to a Shopify store's Admin GraphQL API, exposing products, orders, customers, inventory, and sales data as callable tools. It enables natural-language store queries, low-stock and sales summaries, customer support answers, and creation of draft products for review.MIT