mcp-shopify — Claude Code MCP server: Shopify orders and products
Wires your agent to the Shopify Admin REST API for orders, products, customers, stock and fulfillment. Useful when merchant tooling has to talk to Shopify directly instead of a regional platform.
claude mcp add --env SHOPIFY_SHOP=<SHOPIFY_SHOP> --env SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> --env SHOPIFY_API_VERSION=<SHOPIFY_API_VERSION> --transport stdio shopify -- npx -y @codespar/mcp-shopifyWhat mcp-shopify does
The server exposes 28 tools over the Admin REST API. Orders can be listed, created, edited or cancelled; products come with variants and images; customers get created on the spot. Stock moves through adjust_inventory, which targets one inventory item at one location and takes a delta. Fulfillments carry a tracking number and carrier, refunds hit individual line items, and discounts come in two steps: a price rule first, then the code that hangs off it.
Setup happens on the Shopify side. Make a custom app in admin under Settings → Apps and sales channels → Develop apps, grant Admin API scopes for orders, products, customers, inventory and fulfillments, then install it to get the token. Subdomain and token go into SHOPIFY_SHOP and SHOPIFY_ACCESS_TOKEN. The API version sits at 2024-01 unless SHOPIFY_API_VERSION says otherwise. Miss the token and every call fails at auth.
stdio is the default transport, so npx @codespar/mcp-shopify is enough for Cursor or Claude Desktop. Set MCP_HTTP=true and MCP_PORT=3000 for server-to-server testing. The token carries whatever the app's scopes allow, so keep the scope list tight: this runs against a live store where cancel_order and create_refund do real damage.
What it helps with
- pull orders for a date range with filters
- top up stock for one variant at one location
- ship an order with a tracking number attached
- issue a discount code against an existing price rule
- refund selected line items on an order
Example prompts for the agent
- List last week's orders and flag the ones not shipped yet
- Add a variant with a new SKU to that product and set its price
- Refund two line items and register a webhook for
orders/paid
How to install mcp-shopify
Platform CLI
claude mcp add --env SHOPIFY_SHOP=<SHOPIFY_SHOP> --env SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> --env SHOPIFY_API_VERSION=<SHOPIFY_API_VERSION> --transport stdio shopify -- npx -y @codespar/mcp-shopifyReplace <…> with your own values
Platform CLI
codex mcp add shopify --env SHOPIFY_SHOP=<SHOPIFY_SHOP> --env SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> --env SHOPIFY_API_VERSION=<SHOPIFY_API_VERSION> -- npx -y @codespar/mcp-shopifyReplace <…> with your own values
Config file
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-shopify"
],
"env": {
"SHOPIFY_SHOP": "<SHOPIFY_SHOP>",
"SHOPIFY_ACCESS_TOKEN": "<SHOPIFY_ACCESS_TOKEN>",
"SHOPIFY_API_VERSION": "<SHOPIFY_API_VERSION>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"shopify": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@codespar/mcp-shopify"
],
"env": {
"SHOPIFY_SHOP": "<SHOPIFY_SHOP>",
"SHOPIFY_ACCESS_TOKEN": "<SHOPIFY_ACCESS_TOKEN>",
"SHOPIFY_API_VERSION": "<SHOPIFY_API_VERSION>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SHOPIFY_SHOP=<SHOPIFY_SHOP> -e SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> -e SHOPIFY_API_VERSION=<SHOPIFY_API_VERSION> shopify npx -y @codespar/mcp-shopifyReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-shopify
How do I install mcp-shopify in Claude Code?
Run claude mcp add mcp-shopify -e SHOPIFY_SHOP=<SHOPIFY_SHOP> -e SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> -- npx -y @codespar/mcp-shopify. The longer form pins the API version: `claude mcp add --env SHOPIFY_SHOP=<SHOPIFY_SHOP> --env SHOPIFY_ACCESS_TOKEN=<SHOPIFY_ACCESS_TOKEN> --env SHOPIFY_API_VERSION=<SHOPIFY_API_VERSION> --transport stdio shopify -- npx -y @codespar/mcp-shopify`.
What does mcp-shopify do?
It links an agent to a Shopify store's Admin REST API through 28 tools covering orders, products, variants, customers, inventory, fulfillments, refunds, discounts, metafields and webhooks.
What do I need before running it?
A custom app in Shopify admin with the Admin API scopes you need, installed to produce an access token. Each request sends that token in the X-Shopify-Access-Token header, along with the shop subdomain from SHOPIFY_SHOP.