shopify mcp server
Enables interaction with Shopify store data using the GraphQL API, supporting product, customer, and order management with comprehensive error handling.
Enables interaction with Shopify store data using the GraphQL API, supporting product, customer, and order management with comprehensive error handling.
MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This server provides tools for managing products, customers, orders, and more.
get-products
searchTitle
(optional string): Filter products by titlelimit
(number): Maximum number of products to returnReturns: Formatted product details including title, description, handle, and variants
get-products-by-collection
collectionId
(string): ID of the collection to get products fromlimit
(optional number, default: 10): Maximum number of products to returnReturns: Formatted product details from the specified collection
get-products-by-ids
productIds
(array of strings): Array of product IDs to retrieveReturns: Formatted product details for the specified products
get-variants-by-ids
variantIds
(array of strings): Array of variant IDs to retrieveReturns: Detailed variant information including product details
get-customers
limit
(optional number): Maximum number of customers to returnnext
(optional string): Next page cursorReturns: Customer data in JSON format
tag-customer
customerId
(string): Customer ID to tagtags
(array of strings): Tags to add to the customerReturns: Success or failure message
get-orders
first
(optional number): Limit of orders to returnafter
(optional string): Next page cursorquery
(optional string): Filter orders using query syntaxsortKey
(optional enum): Field to sort by ('PROCESSED_AT', 'TOTAL_PRICE', 'ID', 'CREATED_AT', 'UPDATED_AT', 'ORDER_NUMBER')reverse
(optional boolean): Reverse sort orderReturns: Formatted order details
get-order
orderId
(string): ID of the order to retrieveReturns: Detailed order information
create-discount
title
(string): Title of the discountcode
(string): Discount code that customers will entervalueType
(enum): Type of discount ('percentage' or 'fixed_amount')value
(number): Discount value (percentage as decimal or fixed amount)startsAt
(string): Start date in ISO formatendsAt
(optional string): Optional end date in ISO formatappliesOncePerCustomer
(boolean): Whether discount can be used only once per customerReturns: Created discount details
create-draft-order
lineItems
(array): Array of items with variantId and quantityemail
(string): Customer emailshippingAddress
(object): Shipping address detailsnote
(optional string): Optional note for the ordercomplete-draft-order
draftOrderId
(string): ID of the draft order to completevariantId
(string): ID of the variant in the draft orderget-collections
limit
(optional number, default: 10): Maximum number of collections to returnname
(optional string): Filter collections by nameget-shop
get-shop-details
manage-webhook
action
(enum): Action to perform ('subscribe', 'find', 'unsubscribe')callbackUrl
(string): Webhook callback URLtopic
(enum): Webhook topic to subscribe towebhookId
(optional string): Webhook ID (required for unsubscribe)To use this MCP server, you'll need to create a custom app in your Shopify store:
read_products
, write_products
read_customers
, write_customers
read_orders
, write_orders
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"
}
}
}
}
npm install
.env
file:
SHOPIFY_ACCESS_TOKEN=your_access_token
MYSHOPIFY_DOMAIN=your-store.myshopify.com
npm run build
npm test
Contributions are welcome! Please read our Contributing Guidelines first.
MIT
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"
}
]