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: Run the serverStep 1: Run the server
Open a new terminal window and run the following command. Keep this terminal window open while using the server:
Terminal
Anchor to Step 2: Configure your AI development toolStep 2: 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 3: (Optional) Configure advanced optionsStep 3: (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): Enables thevalidate_theme
tool for validating entire theme directories.partial
: Enables thevalidate_theme_codeblocks
tool for validating individual codeblocks.
Enable partial validation mode
Anchor to Available toolsAvailable tools
The Dev MCP server provides the following tools:
Anchor to [object Object]learn_shopify_api
learn_shopify_api
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.
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_chunks
Search 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_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 learn_shopify_api
.
Anchor to [object Object]introspect_graphql_schema
introspect_graphql_schema
Explore 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_codeblocks
Validate 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_codeblocks
Validates 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_codeblocks
Validates individual Liquid codeblocks and supporting theme files (JSON, CSS, JS, SVG) to ensure correct syntax and references.
Use when generating or modifying individual Liquid files or codeblocks. This tool validates syntax, checks for undefined objects and filters, and ensures references to other files exist. Perfect for incremental development and quick validation of code snippets.
Requires LIQUID_VALIDATION_MODE=partial
in your MCP server configuration.
Anchor to [object Object]validate_theme
validate_theme
Validates 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
.
Command-line tool for building Shopify apps and themes.
Connect AI assistants to real-time commerce data for customer-facing shopping experiences.