The Shopify Dev MCP Server is a protocol implementation that helps developers interact with various Shopify APIs, including the Admin GraphQL API, Functions, and optionally Polaris Web Components. It serves as a bridge between AI coding assistants and Shopify's development tools.
You can easily run the Shopify MCP server using npx with the following command:
npx -y @shopify/dev-mcp@latest
To use the MCP server with Cursor or Claude Desktop, add the following configuration:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"]
}
}
}
For Windows users, you may need this alternative configuration:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "cmd",
"args": ["/k", "npx", "-y", "@shopify/dev-mcp@latest"]
}
}
}
If you prefer to disable instrumentation calls, you can set the OPT_OUT_INSTRUMENTATION
environment variable:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"OPT_OUT_INSTRUMENTATION": "true"
}
}
}
}
To enable Polaris Web Components documentation in your AI assistant, include the POLARIS_UNIFIED
flag:
{
"mcpServers": {
"shopify-dev-mcp": {
"command": "npx",
"args": ["-y", "@shopify/dev-mcp@latest"],
"env": {
"POLARIS_UNIFIED": "true"
}
}
}
}
The MCP server provides several tools to enhance your Shopify development experience:
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.) |
The MCP server includes the following prompt templates:
Prompt Name | Description |
---|---|
shopify_admin_graphql | Help you write GraphQL operations for the Shopify Admin API |
Once configured, your AI assistant will be able to leverage these tools and prompts to provide more accurate and context-aware assistance for your Shopify development tasks.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.