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 Claude Desktop.
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
- Functions
- Polaris Web Components (optional)
- Liquid (optional)
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.
Anchor to CursorCursor
-
Open Cursor and go to Cursor > Settings > Cursor Settings > Tools and integrations > New MCP server.
-
Add this configuration to your MCP servers:
Cursor configuration
{"mcpServers": {"shopify-dev-mcp": {"command": "npx","args": ["-y", "@shopify/dev-mcp@latest"]}}}NoteFor more information, see the Cursor MCP documentation.
-
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.
Anchor to Claude DesktopClaude Desktop
-
Open Claude Desktop and access your configuration file through settings.
-
Add this configuration to your MCP servers section:
Claude Desktop configuration
{"mcpServers": {"shopify-dev-mcp": {"command": "npx","args": ["-y", "@shopify/dev-mcp@latest"]}}}NoteFor more information, read the Claude Desktop MCP guide.
-
Save your configuration and restart your AI development tool.
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 Enable Polaris supportEnable Polaris support
To show Polaris Web Components documentation in Cursor or Claude Desktop, add an env
block with the POLARIS_UNIFIED
flag to your MCP server configuration:
Enable Polaris support
This is a developer preview of Polaris Web Components. This documentation will be updated as we release new features.
Anchor to Enable Liquid supportEnable Liquid support
To access Liquid documentation and validation tools in Cursor or Claude Desktop, add an env
block with the LIQUID
flag to your MCP server configuration:
Enable Liquid support
You can also control the validation mode by setting LIQUID_VALIDATION_MODE
:
"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
This is a developer preview of Liquid support. This documentation will be updated as we release new features.
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. Useful for getting content from many different documentation categories, but may have incomplete context due to chunking.
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 may 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
.
Choose this when you need comprehensive details about a specific resource and have the exact documentation path.
Anchor to [object Object]introspect_graphql_schema
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.
Essential for GraphQL development - discover what fields, queries, and mutations are available before writing your operations.
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_theme_codeblocks
validate_theme_codeblocks
Validates individual Liquid codeblocks and supporting theme files (JSON, CSS, JS, SVG) to ensure correct syntax and references.
Ideal for incremental theme development - validates individual templates and catches syntax errors, undefined objects, and broken file references.
Requires LIQUID=true
and LIQUID_VALIDATION_MODE=partial
in your MCP server configuration. See Enable Liquid support for setup instructions.
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.
Requires LIQUID=true
and LIQUID_VALIDATION_MODE=full
in your MCP server configuration. See Enable Liquid support for setup instructions.
Anchor to Available promptsAvailable prompts
This MCP server provides the following prompts:
Prompt Name | Description |
---|---|
shopify_admin_graphql | Create Admin API GraphQL operations |
Command-line tool for building Shopify apps and themes.
Connect AI assistants to real-time commerce data for customer-facing shopping experiences.