一键导入
shopify-mcp-server
MCP server connecting AI assistants to Shopify Admin GraphQL API for products, orders, customers, inventory, and metafields management
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
MCP server connecting AI assistants to Shopify Admin GraphQL API for products, orders, customers, inventory, and metafields management
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Policy-centered context budget layer that turns sprawling codebases into compact, high-signal context for AI coding agents using symbol graphs and precision tools
Control and automate Slay the Spire 2 gameplay through REST API or MCP server for AI agents
MCP server for browser automation using natural language through kogiQA, enabling AI agents to interact with web pages without selectors
Professional browser automation for Claude Code, Codex, and MCP clients powered by DrissionPage MCP Server
MCP server for Yuque (语雀) knowledge base - search, create, and manage documents through AI assistants
Amazon product research, competitor analysis, category selection, keyword research, and review analysis using Sorftime MCP for cross-border e-commerce
| name | shopify-mcp-server |
| description | MCP server connecting AI assistants to Shopify Admin GraphQL API for products, orders, customers, inventory, and metafields management |
| triggers | ["connect Claude to my Shopify store","manage Shopify products with MCP","set up Shopify MCP server","query Shopify orders through Claude","configure Shopify MCP authentication","use Shopify Admin API with AI assistant","install shopify-mcp for Claude Desktop","create Shopify metafields with MCP"] |
Skill by ara.so — MCP Skills collection.
A production-ready Model Context Protocol (MCP) server that exposes Shopify Admin GraphQL API to AI assistants like Claude Desktop. Provides 40 typed tools for managing products, customers, orders, inventory, metafields, and store operations through a structured interface.
The server translates MCP tool calls into Shopify Admin GraphQL operations. It supports:
Request flow: MCP Client → Tool Registry → Zod Validation → Shopify GraphQL API → Formatted Response
npx shopify-mcp \
--clientId YOUR_CLIENT_ID \
--clientSecret YOUR_CLIENT_SECRET \
--domain your-store.myshopify.com
git clone https://github.com/Cesarjoquin/shopify-mcp.git
cd shopify-mcp
npm install
npm run build
npm start
Add to claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": [
"shopify-mcp",
"--clientId", "<CLIENT_ID>",
"--clientSecret", "<CLIENT_SECRET>",
"--domain", "<store>.myshopify.com"
]
}
}
}
Create .env from .env.example:
# Store domain (required)
MYSHOPIFY_DOMAIN=your-store.myshopify.com
# Authentication Option A: Static token
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxx
# Authentication Option B: OAuth credentials
SHOPIFY_CLIENT_ID=shp_xxxxxxxxxxxxx
SHOPIFY_CLIENT_SECRET=shpcs_xxxxxxxxxxxxx
# Optional settings
SHOPIFY_API_VERSION=2026-01
LOG_LEVEL=info
# Redis token caching (optional)
REDIS_ENABLED=false
REDIS_URL=redis://127.0.0.1:6379
REDIS_KEY_PREFIX=shopify-mcp:
REDIS_MAX_RETRIES=10
REDIS_CONNECT_TIMEOUT_MS=10000
shopify-mcp \
--domain store.myshopify.com \
--accessToken shpat_xxx \
--apiVersion 2026-01
For full functionality, grant these scopes in your Shopify custom app:
read_products, write_productsread_customers, write_customersread_orders, write_ordersread_inventory, write_inventoryread_metaobjects, write_metaobjectsList Products:
// Tool: list_products
{
"first": 10,
"query": "status:active",
"sortKey": "TITLE"
}
Create Product:
// Tool: create_product
{
"title": "New Product",
"descriptionHtml": "<p>Description</p>",
"productType": "Apparel",
"vendor": "My Brand",
"tags": ["summer", "sale"],
"variants": [
{
"price": "29.99",
"sku": "PROD-001",
"inventoryQuantities": {
"availableQuantity": 100,
"locationId": "gid://shopify/Location/123"
}
}
]
}
Update Product:
// Tool: update_product
{
"id": "gid://shopify/Product/123",
"title": "Updated Title",
"status": "ACTIVE"
}
List Customers:
// Tool: list_customers
{
"first": 25,
"query": "email:*@example.com",
"sortKey": "CREATED_AT",
"reverse": true
}
Create Customer:
// Tool: create_customer
{
"email": "customer@example.com",
"firstName": "John",
"lastName": "Doe",
"phone": "+1234567890",
"acceptsMarketing": true,
"tags": ["vip", "wholesale"]
}
List Orders:
// Tool: list_orders
{
"first": 50,
"query": "fulfillment_status:unfulfilled",
"sortKey": "CREATED_AT"
}
Get Order Details:
// Tool: get_order
{
"id": "gid://shopify/Order/123456"
}
Fulfill Order:
// Tool: fulfill_order
{
"orderId": "gid://shopify/Order/123",
"lineItems": [
{
"id": "gid://shopify/LineItem/456",
"quantity": 2
}
],
"trackingInfo": {
"company": "USPS",
"number": "1Z999AA10123456784"
}
}
Set Metafield:
// Tool: set_metafield
{
"ownerId": "gid://shopify/Product/123",
"namespace": "custom",
"key": "instructions",
"type": "single_line_text_field",
"value": "Handle with care"
}
Get Metafields:
// Tool: get_metafields
{
"ownerId": "gid://shopify/Product/123",
"namespace": "custom"
}
Set Inventory Quantity:
// Tool: set_inventory_quantity
{
"inventoryItemId": "gid://shopify/InventoryItem/789",
"locationId": "gid://shopify/Location/123",
"availableQuantity": 50
}
Get Inventory Levels:
// Tool: get_inventory_levels
{
"inventoryItemId": "gid://shopify/InventoryItem/789"
}
Get Shop Info:
// Tool: get_shop_info
{}
List Locations:
// Tool: list_locations
{
"first": 10
}
All list tools support cursor-based pagination:
// First request
{
"first": 25,
"query": "status:active"
}
// Response includes pageInfo.endCursor
// Next request:
{
"first": 25,
"after": "eyJsYXN0X2lkIjo...",
"query": "status:active"
}
Use Shopify's query syntax for filtering:
// Products by vendor and tag
"query": "vendor:Nike tag:running"
// Orders by status and date
"query": "fulfillment_status:unfulfilled created_at:>2026-01-01"
// Customers by email domain
"query": "email:*@company.com"
Shopify uses GraphQL global IDs:
// Format: gid://shopify/{ResourceType}/{numericId}
"id": "gid://shopify/Product/7891234567890"
"id": "gid://shopify/Customer/1234567890"
"id": "gid://shopify/Order/4567890123456"
Tools return userErrors arrays from Shopify mutations:
// Example error response
{
"isError": true,
"error": "Failed to create product: Title can't be blank"
}
# Install dependencies
npm install
# Type checking
npm run typecheck
# Linting
npm run lint
# Run tests
npm test
# Full validation pipeline
npm run validate
# Build for production
npm run build
# Development mode (hot reload)
npm run dev
Tools use the createTool() factory pattern:
// src/tools/custom_tool.ts
import { z } from 'zod';
import { createTool } from '../lib/tool-factory.js';
const inputSchema = z.object({
myParam: z.string().describe('Parameter description')
});
export const myCustomTool = createTool(
'my_custom_tool',
'Description of what this tool does',
inputSchema,
async (args, shopify) => {
const query = `
query MyQuery($param: String!) {
# GraphQL query here
}
`;
const result = await shopify.graphql(query, { param: args.myParam });
return { success: true, data: result };
}
);
# Validate GraphQL queries against Shopify schema
npm run validate:graphql
Error: Authentication credentials are required
Solution: Ensure you provide either:
SHOPIFY_ACCESS_TOKEN (static token), ORSHOPIFY_CLIENT_ID and SHOPIFY_CLIENT_SECRET (OAuth)Check Claude Desktop logs:
# macOS
tail -f ~/Library/Logs/Claude/mcp*.log
# Windows
# Check %APPDATA%/Claude/logs/
Verify server starts:
SHOPIFY_ACCESS_TOKEN=shpat_xxx \
MYSHOPIFY_DOMAIN=store.myshopify.com \
npm start
Error: Redis connection timeout
Solutions:
docker run -d -p 6379:6379 redis:7-alpine
REDIS_ENABLED=false
Shopify returns field-level validation errors in mutation responses. These are surfaced as:
Failed to create product: field: error message
Check your input data matches Shopify's validation rules (required fields, format constraints, etc.).
If tools fail with "Field not found" errors, check API version compatibility:
# Use a specific API version
SHOPIFY_API_VERSION=2025-01 npm start
For OAuth client-credentials flow, tokens are cached in Redis:
// Token cache structure
{
key: "shopify-mcp:token:store.myshopify.com",
value: {
access_token: "shpat_...",
expires_at: 1234567890
},
ttl: 86400 // 24 hours
}
Auto-refresh: Tokens refresh automatically 5 minutes before expiry.
Manual cache clear:
redis-cli DEL "shopify-mcp:token:your-store.myshopify.com"
# Required
MYSHOPIFY_DOMAIN=store.myshopify.com
SHOPIFY_CLIENT_ID=shp_xxx
SHOPIFY_CLIENT_SECRET=shpcs_xxx
# Recommended
LOG_LEVEL=info
SHOPIFY_API_VERSION=2026-01
REDIS_ENABLED=true
REDIS_URL=redis://redis:6379
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
RUN npm run build
CMD ["node", "dist/index.js"]
The server logs structured JSON to stderr. Monitor for:
"level":"error" entries| Category | Count | Key Tools |
|---|---|---|
| Products | 12 | list, create, update, delete, variants |
| Customers | 8 | list, create, update, delete, merge |
| Orders | 10 | list, get, cancel, fulfill, refund |
| Metafields | 4 | get, set, delete (any resource) |
| Inventory | 4 | set quantity, get levels/items |
| Discovery | 2 | shop info, locations |
All list tools support: first, after, query, sortKey, reverse parameters.