Skip to main content

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.


Your AI assistant uses the MCP server to read and interact with Shopify's development resources:

  1. Ask your AI assistant to build something or help with Shopify development tasks.

  2. The assistant searches Shopify documentation and API schemas based on your prompt.

  3. 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.


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.


The MCP server provides tools to interact with the following Shopify APIs:


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

npx -y @shopify/dev-mcp@latest

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.

  1. Open Cursor and go to Cursor > Settings > Cursor Settings > Tools and integrations > New MCP server.

  2. Add this configuration to your MCP servers:

    Cursor configuration

    {
    "mcpServers": {
    "shopify-dev-mcp": {
    "command": "npx",
    "args": ["-y", "@shopify/dev-mcp@latest"]
    }
    }
    }

    Add to Cursor

    Note

    For more information, see the Cursor MCP documentation.

  3. 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"]
    }
    }
    }

    Add to Cursor

    Note

    For more information, see the Cursor MCP documentation.

  1. Open Claude Desktop and access your configuration file through settings.

  2. Add this configuration to your MCP servers section:

    Claude Desktop configuration

    {
    "mcpServers": {
    "shopify-dev-mcp": {
    "command": "npx",
    "args": ["-y", "@shopify/dev-mcp@latest"]
    }
    }
    }

    Add to Cursor

    Note

    For more information, read the Claude Desktop MCP guide.

  3. 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

{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"OPT_OUT_INSTRUMENTATION": "true"
}
}
}
}

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

{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"POLARIS_UNIFIED": "true"
}
}
}
}
Beta

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

{
"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 the validate_theme tool for validating entire theme directories
  • "partial": Enables the validate_theme_codeblocks tool for validating individual codeblocks

Enable partial validation mode

{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"LIQUID": "true",
"LIQUID_VALIDATION_MODE": "partial"
}
}
}
}
Beta

This is a developer preview of Liquid support. This documentation will be updated as we release new features.


The Dev MCP server provides the following tools:

Anchor to [object Object]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.

Note

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 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.


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

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 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

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.

Note

Requires LIQUID=true and LIQUID_VALIDATION_MODE=partial in your MCP server configuration. See Enable Liquid support for setup instructions.


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.

Note

Requires LIQUID=true and LIQUID_VALIDATION_MODE=full in your MCP server configuration. See Enable Liquid support for setup instructions.


This MCP server provides the following prompts:

Prompt NameDescription
shopify_admin_graphqlCreate Admin API GraphQL operations


Was this page helpful?