MCP Server for Shopify API, enabling interaction with store data through GraphQL API
npm install shopify-mcp(please leave a star if you like!)
MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This server provides tools for managing products, customers, orders, and more.
📦 Package Name: shopify-mcp
🚀 Command: shopify-mcp (NOT shopify-mcp-server)
- Product Management: Search and retrieve product information
- Customer Management: Load customer data and manage customer tags
- Order Management: Advanced order querying and filtering
- GraphQL Integration: Direct integration with Shopify's GraphQL Admin API
- Comprehensive Error Handling: Clear error messages for API and authentication issues
1. Node.js (version 16 or higher)
2. Shopify Custom App Access Token (see setup instructions below)
To use this MCP server, you'll need to create a custom app in your Shopify store:
1. From your Shopify admin, go to Settings > Apps and sales channels
2. Click Develop apps (you may need to enable developer preview first)
3. Click Create an app
4. Set a name for your app (e.g., "Shopify MCP Server")
5. Click Configure Admin API scopes
6. Select the following scopes:
- read_products, write_products
- read_customers, write_customers
- read_orders, write_orders
7. Click Save
8. Click Install app
9. Click Install to give the app access to your store data
10. After installation, you'll see your Admin API access token
11. Copy this token - you'll need it for configuration
Add this to your claude_desktop_config.json:
``json`
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": [
"shopify-mcp",
"--accessToken",
"
"--domain",
"
]
}
}
}
Locations for the Claude Desktop config file:
- MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%/Claude/claude_desktop_config.json
- Windows:
If you prefer to use environment variables instead of command-line arguments:
1. Create a .env file with your Shopify credentials:
``
SHOPIFY_ACCESS_TOKEN=your_access_token
MYSHOPIFY_DOMAIN=your-store.myshopify.com
2. Run the server with npx:
``
npx shopify-mcp
If you want to install the package globally:
``
npm install -g shopify-mcp
Then run it:
``
shopify-mcp --accessToken=
⚠️ Important: If you see errors about "SHOPIFY_ACCESS_TOKEN environment variable is required" when using command-line arguments, you might have a different package installed. Make sure you're using shopify-mcp, not shopify-mcp-server.
1. get-products
- Get all products or search by title
- Inputs:
- searchTitle (optional string): Filter products by titlelimit
- (number): Maximum number of products to return
2. get-product-by-idproductId
- Get a specific product by ID
- Inputs:
- (string): ID of the product to retrieve
1. get-customers
- Get customers or search by name/email
- Inputs:
- searchQuery (optional string): Filter customers by name or emaillimit
- (optional number, default: 10): Maximum number of customers to return
2. update-customer
- Update a customer's information
- Inputs:
- id (string, required): Shopify customer ID (numeric ID only, like "6276879810626")firstName
- (string, optional): Customer's first namelastName
- (string, optional): Customer's last nameemail
- (string, optional): Customer's email addressphone
- (string, optional): Customer's phone numbertags
- (array of strings, optional): Tags to apply to the customernote
- (string, optional): Note about the customertaxExempt
- (boolean, optional): Whether the customer is exempt from taxesmetafields
- (array of objects, optional): Customer metafields for storing additional data
3. get-customer-orderscustomerId
- Get orders for a specific customer
- Inputs:
- (string, required): Shopify customer ID (numeric ID only, like "6276879810626")limit
- (optional number, default: 10): Maximum number of orders to return
1. get-orders
- Get orders with optional filtering
- Inputs:
- status (optional string): Filter by order statuslimit
- (optional number, default: 10): Maximum number of orders to return
2. get-order-by-id
- Get a specific order by ID
- Inputs:
- orderId (string, required): Full Shopify order ID (e.g., "gid://shopify/Order/6090960994370")
3. update-order
- Update an existing order with new information
- Inputs:
- id (string, required): Shopify order IDtags
- (array of strings, optional): New tags for the orderemail
- (string, optional): Update customer emailnote
- (string, optional): Order notescustomAttributes
- (array of objects, optional): Custom attributes for the ordermetafields
- (array of objects, optional): Order metafieldsshippingAddress
- (object, optional): Shipping address information
If you encounter issues, check Claude Desktop's MCP logs:
```
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
MIT