🔧 This is a fork of the original shopify-mcp-server by Amir Bengherbi.
MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This fork includes additional tools for product and collection management.
This fork adds:
- Additional tools for product/collection management (see New Tools section below)
- Uses Shopify GraphQL Admin API version 2025-04
- Includes automatic GID formatting for IDs
- 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 all products or search by title
- Inputs:
searchTitle(optional string): Filter products by titlelimit(number): Maximum number of products to return
- Returns: Formatted product details including title, description, handle, and variants
-
get-products-by-collection- Get products from a specific collection
- Inputs:
collectionId(string): ID of the collection to get products fromlimit(optional number, default: 10): Maximum number of products to return
- Returns: Formatted product details from the specified collection
-
get-products-by-ids- Get products by their IDs
- Inputs:
productIds(array of strings): Array of product IDs to retrieve
- Returns: Formatted product details for the specified products
-
get-variants-by-ids- Get product variants by their IDs
- Inputs:
variantIds(array of strings): Array of variant IDs to retrieve
- Returns: Detailed variant information including product details
-
get-customers- Get shopify customers with pagination support
- Inputs:
limit(optional number): Maximum number of customers to returnnext(optional string): Next page cursor
- Returns: Customer data in JSON format
-
tag-customer- Add tags to a customer
- Inputs:
customerId(string): Customer ID to tagtags(array of strings): Tags to add to the customer
- Returns: Success or failure message
-
get-orders- Get orders with advanced filtering and sorting
- Inputs:
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 order
- Returns: Formatted order details
-
get-order- Get a single order by ID
- Inputs:
orderId(string): ID of the order to retrieve
- Returns: Detailed order information
-
create-discount- Create a basic discount code
- Inputs:
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 customer
- Returns: Created discount details
-
create-draft-order- Create a draft order
- Inputs:
lineItems(array): Array of items with variantId and quantityemail(string): Customer emailshippingAddress(object): Shipping address detailsnote(optional string): Optional note for the order
- Returns: Created draft order details
-
complete-draft-order- Complete a draft order
- Inputs:
draftOrderId(string): ID of the draft order to completevariantId(string): ID of the variant in the draft order
- Returns: Completed order details
-
get-collections- Get all collections
- Inputs:
limit(optional number, default: 10): Maximum number of collections to returnname(optional string): Filter collections by name
- Returns: Collection details
-
get-shop- Get shop details
- Inputs: None
- Returns: Basic shop information
-
get-shop-details- Get extended shop details including shipping countries
- Inputs: None
- Returns: Extended shop information including shipping countries
-
manage-webhook- Subscribe, find, or unsubscribe webhooks
- Inputs:
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)
- Returns: Webhook details or success message
-
create-product- Create a new product with variants and options
- Inputs:
title(string): Product titledescriptionHtml(optional string): Product description in HTMLvendor(optional string): Product vendorproductType(optional string): Product typehandle(optional string): Product handle/slugstatus(optional enum): Product status (ACTIVE, ARCHIVED, DRAFT)tags(optional array): Product tagsproductOptions(optional array): Product options (e.g., Size, Color)metafields(optional array): Product metafields
- Returns: Created product details
-
update-product- Update an existing product
- Inputs:
id(string): Product ID to update- All other fields from create-product (optional)
- Returns: Updated product details
-
create-product-variants-bulk- Create multiple variants for a product
- Inputs:
productId(string): Product ID to add variants tovariants(array): Array of variant objects with optionValues, price, barcode, etc.
- Returns: Created variants details
-
update-product-variants-bulk- Update multiple variants for a product
- Inputs:
productId(string): Product IDvariants(array): Array of variant objects with id and fields to update
- Returns: Updated variants details
-
delete-product-variants-bulk- Delete multiple variants from a product
- Inputs:
productId(string): Product IDvariantIds(array): Array of variant IDs to delete
- Returns: Deletion confirmation
-
create-staged-uploads- Stage media files for upload to Shopify
- Inputs:
uploads(array): Array of upload requests with filename, mimeType, resource type
- Returns: Staged upload URLs and parameters
-
create-product-media- Add media files to a product
- Inputs:
productId(string): Product ID to add media tomedia(array): Array of media objects with originalSource URLs
- Returns: Created media details
-
set-metafields- Set metafields for products, variants, or other resources
- Inputs:
metafields(array): Array of metafield objects with key, namespace, ownerId, type, value
- Returns: Created/updated metafield details
-
create-collection- Create a new collection
- Inputs:
title(string): Collection titledescriptionHtml(optional string): Collection descriptionhandle(optional string): Collection handleproducts(optional array): Product IDs to includeruleSet(optional object): Smart collection rulesmetafields(optional array): Collection metafields
- Returns: Created collection details
-
update-collection- Update an existing collection
- Inputs:
id(string): Collection ID to update- All other fields from create-collection (optional)
- Returns: Updated collection details
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_productsread_customers,write_customersread_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.
Since this is a fork, you'll need to run it locally. First clone and build this repository (see Development section below).
Add to your claude_desktop_config.json:
{
"mcpServers": {
"shopify": {
"command": "node",
"args": ["/path/to/your/shopify-mcp-server/build/index.js"],
"env": {
"SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>",
"MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com"
}
}
}
}Note: Replace
/path/to/your/shopify-mcp-serverwith the actual path where you cloned this repository.
- Clone the repository
- Install dependencies:
npm install- Create a
.envfile:
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
This server uses Shopify GraphQL Admin API version 2025-04.
Contributions are welcome!
- Original author: Amir Bengherbi
- Extended by: Ryan Boyle with Claude (Opus 4)
- Built with the Model Context Protocol
MIT - See LICENSE file for details.