MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This server provides tools for managing products, customers, orders, and more.
- 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
-
get-products
- Get products from your Shopify store
- Inputs:
-
searchTitle
(optional string): Filter products by title -
limit
(number): Maximum number of products to return
-
- Returns: Formatted product details including:
- Title, description, handle
- Variants with prices, SKUs, and inventory policies
-
get-customers
- Retrieve customer information
- Inputs:
-
limit
(optional number): Maximum number of customers to return -
next
(optional string): Pagination cursor for next page
-
- Returns: Customer data in JSON format
-
tag-customer
- Add tags to a customer
- Inputs:
-
customerId
(string): ID of the customer to tag -
tags
(array of strings): Tags to add to the customer
-
- Returns: Success or failure message
-
get-orders
- Fetch and filter orders
- Inputs:
-
first
(optional number): Number of orders to return -
after
(optional string): Pagination cursor -
query
(optional string): Filter query -
sortKey
(optional enum): Sort field ('PROCESSED_AT', 'TOTAL_PRICE', 'ID', 'CREATED_AT', 'UPDATED_AT', 'ORDER_NUMBER') -
reverse
(optional boolean): Reverse sort order
-
- Returns: Formatted order details including:
- Order ID and status
- Financial information
- Customer details
- Shipping information
- Line items with variants
To use this MCP server, you'll need to create a custom app in your Shopify store:
- From your Shopify admin, go to Settings > Apps and sales channels
- Click Develop apps (you may need to enable developer preview first)
- Click Create an app
- Set a name for your app (e.g., "Shopify MCP Server")
- Click Configure Admin API scopes
- Select the following scopes:
-
read_products
,write_products
-
read_customers
,write_customers
-
read_orders
,write_orders
-
- Click Save
- Click Install app
- Click Install to give the app access to your store data
- After installation, you'll see your Admin API access token
- Copy this token - you'll need it for configuration
Note: Store your access token securely. It provides access to your store data and should never be shared or committed to version control. More details on how to create a Shopify app can be found here.
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": ["-y", "shopify-mcp-server"],
"env": {
"SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>",
"MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com"
}
}
}
}
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file:
SHOPIFY_ACCESS_TOKEN=your_access_token
MYSHOPIFY_DOMAIN=your-store.myshopify.com
- Build the project:
npm run build
- Run tests:
npm test
- @modelcontextprotocol/sdk - MCP protocol implementation
- graphql-request - GraphQL client for Shopify API
- zod - Runtime type validation
Contributions are welcome! Please read our Contributing Guidelines first.
MIT
Built with ❤️ using the Model Context Protocol