Shopify Dev MCP server
Connect your AI assistant to Shopify's development resources. The Shopify Dev Model Context Protocol (MCP) server enables your AI assistant to search Shopify docs, explore API schemas, build Functions, and get up-to-date answers about Shopify APIs.
Anchor to How it worksHow it works
Your AI assistant uses the MCP server to read and interact with Shopify's development resources:
- Ask your AI assistant to build something or help with Shopify development tasks.
- The assistant searches Shopify documentation and API schemas based on your prompt.
- The MCP server gives your AI assistant access to Shopify's development resources, so it can provide accurate code, solutions, and guidance based on current APIs and best practices.
Anchor to RequirementsRequirements
Before you set up the Dev MCP server, make sure you have:
- Node.js 18 or higher installed on your system.
- An AI development tool that supports MCP, such as Cursor or Gemini CLI.
Anchor to What you can ask your AI assistantWhat you can ask your AI assistant
After you set up the MCP server, you can ask your AI assistant questions like:
- "How do I create a product using the Admin API?"
- "What fields are available on the Order object?"
- "Show me an example of a webhook subscription"
- "How do I authenticate my Shopify app?"
- "What's the difference between Admin API and Storefront API?"
Your AI assistant will use the MCP server to search Shopify's documentation when providing responses.
Anchor to Supported APIsSupported APIs
The MCP server provides tools to interact with the following Shopify APIs:
- Admin GraphQL API
- Customer Account API
- Functions
- Liquid
- Partner API
- Payment Apps API
- Polaris Web Components
- Storefront API
Anchor to Set up the serverSet up the server
The server runs locally in your development environment and doesn't require authentication.
Anchor to Step 1: Configure your AI development toolStep 1: Configure your AI development tool
Add configuration code that tells your AI tool how to connect to and use the Dev MCP server. This configuration enables your AI assistant to automatically access Shopify documentation, API schemas, and development guidance when you ask questions.
-
Open Cursor and go to Cursor > Settings > Cursor Settings > Tools and integrations > New MCP server.
-
Add this configuration to your MCP servers (or use this link to add it automatically):
Cursor configuration
{"mcpServers": {"shopify-dev-mcp": {"command": "npx","args": ["-y", "@shopify/dev-mcp@latest"]}}}If you see connection errors on Windows, try this alternative configuration:
Alternative configuration for Windows
{"mcpServers": {"shopify-dev-mcp": {"command": "cmd","args": ["/k", "npx", "-y", "@shopify/dev-mcp@latest"]}}}NoteFor more information, see the Cursor MCP documentation.
-
Save your configuration and restart Cursor.
Anchor to Step 2: (Optional) Configure advanced optionsStep 2: (Optional) Configure advanced options
The Dev MCP server supports several advanced configuration options:
Anchor to Disable instrumentationDisable instrumentation
This package makes instrumentation calls to better understand how to improve the MCP server. To disable them, set the OPT_OUT_INSTRUMENTATION environment variable in Cursor or Claude Desktop:
Disable instrumentation
Anchor to Liquid and Theme validation supportLiquid and Theme validation support
You can control the validation mode by setting LIQUID_VALIDATION_MODE in the environment:
full(default, recommended): Enables thevalidate_themetool for validating entire theme directories.partial(not recommended): Enables thevalidate_theme_codeblockstool for validating individual codeblocks. Only use this for self-contained Liquid files that don't require theme context.
Configure the validation mode
Anchor to Available toolsAvailable tools
The Dev MCP server provides the following tools:
Anchor to [object Object]learn_shopify_api
learn_shopify_apiTeaches 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.
Always call this tool first when working with Shopify APIs. It provides essential context about supported APIs and generates a conversation ID for tracking usage across tool calls.
Anchor to [object Object]search_docs_chunks
search_docs_chunksSearch across all shopify.dev documentation to find relevant chunks matching your query.
Best for broad research across multiple topics or when you're not sure where to look. Returns quick results from many sections, though individual snippets might lack full context.
Anchor to [object Object]fetch_full_docs
fetch_full_docsRetrieve complete documentation for specific paths from shopify.dev. Provides full context without chunking loss, but requires knowing the exact path. Paths are provided via learn_shopify_api.
Anchor to [object Object]introspect_graphql_schema
introspect_graphql_schemaExplore and search Shopify GraphQL schemas to find specific types, queries, and mutations.
Essential for GraphQL development - discover what fields, queries, and mutations are available before writing your operations, along with the necessary access scopes.
Anchor to [object Object]validate_graphql_codeblocks
validate_graphql_codeblocksValidate GraphQL code blocks against a specific GraphQL schema to ensure they don't contain hallucinated fields or operations.
Use when generating or modifying GraphQL code to ensure it doesn't contain fields or operations that don't exist in Shopify's API.
Anchor to [object Object]validate_component_codeblocks
validate_component_codeblocksValidates JavaScript and TypeScript code blocks containing Shopify components against the schema to ensure they don't contain hallucinated components, props, or prop values.
Use when generating or modifying component code to ensure it uses only valid components and properties that exist in Shopify's component libraries.
Anchor to [object Object]validate_theme_codeblocks
validate_theme_codeblocksValidates individual Liquid codeblocks and supporting theme files (JSON, CSS, JS, SVG) to ensure correct syntax and references.
This tool only works for self-contained Liquid files generated by the LLM. If the generated files require any context from an existing theme, this isn't the right choice. Use validate_theme instead for comprehensive theme validation.
Requires LIQUID_VALIDATION_MODE=partial in your MCP server configuration.
Anchor to [object Object]validate_theme
validate_themeValidates entire theme directories using Shopify's Theme Check to detect errors in Liquid syntax, missing references, and other theme issues.
Run this on complete themes to catch cross-file issues and ensure consistency. Applies all Theme Check rules for comprehensive validation.
This tool is enabled by default when LIQUID_VALIDATION_MODE=full.