shopify mcp server main
Enables interaction with Shopify store data via GraphQL API, providing tools for managing products, customers, orders, discounts, and more with robust error handling.
Enables interaction with Shopify store data via GraphQL API, providing tools for managing products, customers, orders, discounts, and more with robust error handling.
Shopify MCP Server provides a powerful bridge between your applications and the Shopify ecosystem through the Model Context Protocol. Easily manage products, customers, orders, and more with simple API calls to Shopify's Admin API.
Choose your preferred installation method:
Method | Instructions |
---|---|
Smithery | |
Glama.ai | |
NPM | npm install shopify-mcp-server |
Tool | Description | Key Parameters |
---|---|---|
get-products |
Find products by title | searchTitle , limit |
get-products-by-collection |
Get collection products | collectionId , limit |
get-products-by-ids |
Retrieve specific products | productIds |
get-variants-by-ids |
Get variant details | variantIds |
Tool | Description | Key Parameters |
---|---|---|
get-customers |
Retrieve customer data | limit , next |
tag-customer |
Add tags to customers | customerId , tags |
Tool | Description | Key Parameters |
---|---|---|
get-orders |
Filter and sort orders | first , after , query , sortKey |
get-order |
Get single order details | orderId |
Tool | Description | Key Parameters |
---|---|---|
get-collections |
Retrieve shop collections | limit , name |
get-shop |
Get basic shop details | None |
get-shop-details |
Get extended shop info | None |
Tool | Description | Key Parameters |
---|---|---|
create-discount |
Create discount codes | title , code , valueType , value |
Install the package
npm install shopify-mcp-server
Set up environment variables
SHOPIFY_ACCESS_TOKEN=your_token
MYSHOPIFY_DOMAIN=your-store.myshopify.com
Initialize the server
require('shopify-mcp-server').start();
Make your first API call
const products = await shopifyMcpServer.tools.getProducts({ limit: 10 });
console.log(products);
read_products
, write_products
read_customers
, write_customers
read_orders
, write_orders
Security Note: Store your access token securely. Never commit it to version control.
Add to your claude_desktop_config.json
:
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": ["-y", "shopify-mcp-server"],
"env": {
"SHOPIFY_ACCESS_TOKEN": "<TOKEN>",
"MYSHOPIFY_DOMAIN": "<SHOP>.myshopify.com"
}
}
}
}
# Clone the repository
git clone https://github.com/your-username/shopify-mcp-server.git
# Install dependencies
cd shopify-mcp-server
npm install
# Set up environment variables
# Create a .env file with your Shopify credentials
# Build and test
npm run build
npm test
Resource | Link |
---|---|
GitHub Discussions | Join the conversation |
Issue Tracker | Report bugs |
@rezajafar | |
Discord | Join our server |
Built with ❤️ using the Model Context Protocol
[
{
"description": "Get all products or search by title",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"limit": {
"description": "Maximum number of products to return",
"type": "number"
},
"searchTitle": {
"description": "Search title, if missing, will return all products",
"type": "string"
}
},
"required": [
"limit"
],
"type": "object"
},
"name": "get-products"
},
{
"description": "Get products from a specific collection",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"collectionId": {
"description": "ID of the collection to get products from",
"type": "string"
},
"limit": {
"default": 10,
"description": "Maximum number of products to return",
"type": "number"
}
},
"required": [
"collectionId"
],
"type": "object"
},
"name": "get-products-by-collection"
},
{
"description": "Get products by their IDs",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"productIds": {
"description": "Array of product IDs to retrieve",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"productIds"
],
"type": "object"
},
"name": "get-products-by-ids"
},
{
"description": "Get product variants by their IDs",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"variantIds": {
"description": "Array of variant IDs to retrieve",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"variantIds"
],
"type": "object"
},
"name": "get-variants-by-ids"
},
{
"description": "Get shopify customers with pagination support",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"limit": {
"description": "Limit of customers to return",
"type": "number"
},
"next": {
"description": "Next page cursor",
"type": "string"
}
},
"type": "object"
},
"name": "get-customers"
},
{
"description": "Add tags to a customer",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"customerId": {
"description": "Customer ID to tag",
"type": "string"
},
"tags": {
"description": "Tags to add to the customer",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"customerId",
"tags"
],
"type": "object"
},
"name": "tag-customer"
},
{
"description": "Get shopify orders with advanced filtering and sorting",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"after": {
"description": "Next page cursor",
"type": "string"
},
"first": {
"description": "Limit of orders to return",
"type": "number"
},
"query": {
"description": "Filter orders using query syntax",
"type": "string"
},
"reverse": {
"description": "Reverse sort order",
"type": "boolean"
},
"sortKey": {
"description": "Field to sort by",
"enum": [
"PROCESSED_AT",
"TOTAL_PRICE",
"ID",
"CREATED_AT",
"UPDATED_AT",
"ORDER_NUMBER"
],
"type": "string"
}
},
"type": "object"
},
"name": "get-orders"
},
{
"description": "Get a single order by ID",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"orderId": {
"description": "ID of the order to retrieve",
"type": "string"
}
},
"required": [
"orderId"
],
"type": "object"
},
"name": "get-order"
},
{
"description": "Create a basic discount code",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"appliesOncePerCustomer": {
"description": "Whether discount can be used only once per customer",
"type": "boolean"
},
"code": {
"description": "Discount code that customers will enter",
"type": "string"
},
"endsAt": {
"description": "Optional end date in ISO format",
"type": "string"
},
"startsAt": {
"description": "Start date in ISO format",
"type": "string"
},
"title": {
"description": "Title of the discount",
"type": "string"
},
"value": {
"description": "Discount value (percentage as decimal or fixed amount)",
"type": "number"
},
"valueType": {
"description": "Type of discount",
"enum": [
"percentage",
"fixed_amount"
],
"type": "string"
}
},
"required": [
"title",
"code",
"valueType",
"value",
"startsAt",
"appliesOncePerCustomer"
],
"type": "object"
},
"name": "create-discount"
},
{
"description": "Create a draft order",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"email": {
"description": "Customer email",
"format": "email",
"type": "string"
},
"lineItems": {
"description": "Line items to add to the order",
"items": {
"additionalProperties": false,
"properties": {
"quantity": {
"type": "number"
},
"variantId": {
"type": "string"
}
},
"required": [
"variantId",
"quantity"
],
"type": "object"
},
"type": "array"
},
"note": {
"description": "Optional note for the order",
"type": "string"
},
"shippingAddress": {
"additionalProperties": false,
"description": "Shipping address details",
"properties": {
"address1": {
"type": "string"
},
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"countryCode": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"province": {
"type": "string"
},
"zip": {
"type": "string"
}
},
"required": [
"address1",
"city",
"province",
"country",
"zip",
"firstName",
"lastName",
"countryCode"
],
"type": "object"
}
},
"required": [
"lineItems",
"email",
"shippingAddress"
],
"type": "object"
},
"name": "create-draft-order"
},
{
"description": "Complete a draft order",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"draftOrderId": {
"description": "ID of the draft order to complete",
"type": "string"
},
"variantId": {
"description": "ID of the variant in the draft order",
"type": "string"
}
},
"required": [
"draftOrderId",
"variantId"
],
"type": "object"
},
"name": "complete-draft-order"
},
{
"description": "Get all collections",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"limit": {
"default": 10,
"description": "Maximum number of collections to return",
"type": "number"
},
"name": {
"description": "Filter collections by name",
"type": "string"
}
},
"type": "object"
},
"name": "get-collections"
},
{
"description": "Get shop details",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "get-shop"
},
{
"description": "Get extended shop details including shipping countries",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {},
"type": "object"
},
"name": "get-shop-details"
},
{
"description": "Subscribe, find, or unsubscribe webhooks",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"action": {
"description": "Action to perform with webhook",
"enum": [
"subscribe",
"find",
"unsubscribe"
],
"type": "string"
},
"callbackUrl": {
"description": "Webhook callback URL",
"format": "uri",
"type": "string"
},
"topic": {
"description": "Webhook topic to subscribe to",
"enum": [
"orders/updated"
],
"type": "string"
},
"webhookId": {
"description": "Webhook ID (required for unsubscribe)",
"type": "string"
}
},
"required": [
"action",
"callbackUrl",
"topic"
],
"type": "object"
},
"name": "manage-webhook"
}
]