MCP ExplorerExplorer

Shopify Dev MCP Server

@Shopifyon 13 days ago
338 ISC
FreeCommunity
Dev Tools
#shopify#mcp#model context protocol#graphql#admin api#documentation
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.

Overview

What is Shopify Dev MCP Server

The Shopify Dev MCP Server is an implementation of the Model Context Protocol (MCP) that facilitates interaction with various Shopify APIs, including the Admin GraphQL API and Functions, along with optional support for Polaris Web Components.

Use cases

The server is useful for developers working with Shopify APIs, allowing them to search documentation, introspect the Admin GraphQL schema, and retrieve useful developer resources, thereby simplifying the development process with Shopify.

How to use

To run the Shopify MCP server, use the command ‘npx -y @shopify/dev-mcp@latest’. You can configure it for use with Cursor or Claude Desktop by specifying the server command and arguments in a JSON configuration format, adjusting for different operating systems as needed.

Key features

Key features of the MCP server include tools for searching Shopify documentation, introspecting GraphQL schemas, retrieving documents, and accessing quick-start guides for using Shopify APIs. It also supports experimental features like Polaris Unified.

Where to use

This MCP server is intended for use in development environments where Shopify APIs are utilized, particularly within tools like Cursor and Claude Desktop that can leverage the Model Context Protocol for enhanced API interactions.

Content

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

Setup

To run the Shopify MCP server using npx, use the following command:

npx -y @shopify/dev-mcp@latest

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

Available tools

This MCP server provides the following tools:

Tool Name Description
search_dev_docs Search shopify.dev documentation
introspect_admin_schema Access and search Shopify Admin GraphQL schema
fetch_docs_by_path Retrieve documents from shopify.dev
get_started Get started with Shopify APIs (Admin, Functions, etc.)

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

Tools

introspect_admin_schema
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. It takes two arguments: query and filter. The query argument is the string search term to filter schema elements by name. The filter argument is an array of strings to filter results to show specific sections.
search_dev_docs
This tool will take in the user prompt, search shopify.dev, and return relevant documentation that will help answer the user's question. It takes one argument: prompt, which is the search query for Shopify documentation.

Comments