home / mcp / shopify mcp server
MCP Server for Shopify API
Configuration
View docs{
"mcpServers": {
"amir-bengherbi-shopify-mcp-server": {
"command": "npx",
"args": [
"-y",
"shopify-mcp-server"
],
"env": {
"MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>"
}
}
}
}This MCP server lets you interact with a Shopify store through a GraphQL API, enabling you to manage products, customers, orders, and more from your preferred MCP client. It provides structured endpoints to query data, apply filters, and perform common store operations in a consistent, programmatic way.
You connect to the Shopify MCP Server from an MCP client by configuring a local or remote MCP connection. Once connected, you can call the available tools to fetch products, load customers, manage orders, and perform store-wide actions like creating discounts or drafting orders. Use the tools to build integrations that read data, apply business rules, or automate workflows against your Shopify store.
Practical usage patterns include: searching products by title, retrieving products from collections, loading customer pages with pagination, tagging customers, querying orders with filters and sorts, and creating or completing draft orders. Each tool returns structured data or status messages that you can use to drive downstream processes in your application.
Prerequisites: you need Node.js and npm installed on your machine. You will also configure authentication to access your Shopify store.
1) Ensure Node.js and npm are installed. If you don’t have them, download and install from the official Node.js website.
2) Create a configuration file for your MCP client and point it to the Shopify MCP Server using the provided command and environment variables.
3) Start the server using the exact command and arguments shown in the MCP configuration example.
4) Verify the server is running by checking the MCP client’s status or logs for successful connections and authentication.
Environment variables control access to your Shopify store. You’ll supply the access token and your store domain in the configuration so the MCP server can authenticate with Shopify and perform GraphQL requests.
To configure the MCP server for local development using Claude Desktop, add the following to your claude_desktop_config.json under mcpServers. The key is shopify and the settings run the server locally via npx.
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": ["-y", "shopify-mcp-server"],
"env": {
"SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>",
"MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com"
}
}
}
}The server depends on the MCP protocol implementation and a GraphQL client to interact with Shopify’s Admin API. Typical development tasks include installing dependencies, building, and running tests.
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm testFetch all products or search by title. Supports filtering by title and limiting results, returning details like title, description, handle, and variants.
Retrieve products from a specific collection by its collectionId with an optional limit (default 10). Returns formatted product details from the collection.
Retrieve products by a list of product IDs. Returns formatted product details for the specified products.
Fetch product variants by their IDs and return detailed variant information including related product details.
Get Shopify customers with pagination support, including limit and next page cursor for navigating pages.
Add tags to a specific customer by their ID and return success or failure status.
Query orders with advanced filtering and sorting options, including limit, cursor, search query, sort key, and reverse order.
Retrieve a single order by its ID and return detailed order information.
Create a basic discount code with a title, code, value type, value, and validity window.
Create a draft order with line items, customer email, shipping address, and optional note.
Complete a draft order by providing the draftOrderId and a variantId to finalize the order.
Get all collections with optional limit and name filtering, returning collection details.
Retrieve basic shop details.
Retrieve extended shop details including shipping countries.
Manage webhooks by subscribing, finding, or unsubscribing for a specific topic and callback URL.