Skip to main content
Glama

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

Related 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"]
    }
  }
}

Install MCP Server

On Windows, you might need to use this alternative configuration:

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

Install MCP Server

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

Install MCP Server

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

Install MCP Server

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

Install MCP Server

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

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

Install MCP Server

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 learn_shopify_api

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 LIQUID=true and LIQUID_VALIDATION_MODE=partial) Validates individual Liquid codeblocks and supporting theme files (JSON, CSS, JS, SVG) to ensure correct syntax and references

validate_theme

(When LIQUID=true and LIQUID_VALIDATION_MODE=full) Validates entire theme directories using Shopify's Theme Check to detect errors in Liquid syntax, missing references, and other theme issues

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.

  1. npm install

  2. Modify source files

  3. Run npm run build to compile or npm run build:watch to watch for changes and compile

  4. Run npm run test to run tests

  5. Add an MCP server that runs this command: node <absolute_path_of_project>/dist/index.js

License

ISC

Available Tools

5 tools
fetch_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

    A3.6/5.0

    Scored across 5 tools

    Disambiguation4/5

    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.

    Naming Consistency4/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to read and write Shopify store data including products, orders, customers, inventory, and more via the Admin GraphQL API.
      28
      58 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Connects 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