shopify-theme-mcp
v1.1.1
Published
MCP Server for Shopify API, enabling interaction with store data and theme management through GraphQL API
Maintainers
Readme
Shopify Theme MCP Server
(please leave a star if you like!)
MCP Server for Shopify API, enabling interaction with store data and theme management through GraphQL API. This server provides comprehensive tools for managing products, customers, orders, and themes.
📦 Package Name: shopify-theme-mcp
🚀 Command: shopify-theme-mcp
Features
- Product Management: Search, retrieve, and manage products by ID or handle
- Collection Management: Load collections with products by handle
- Customer Management: Load customer data and manage customer information
- Order Management: Advanced order querying and filtering
- Theme Management: Create, update, delete, and publish themes
- Theme Files: Manage theme files, assets, and templates
- GraphQL Integration: Direct integration with Shopify's GraphQL Admin API
- Comprehensive Error Handling: Clear error messages for API and authentication issues
Prerequisites
- Node.js (version 18 or higher)
- Shopify Custom App Access Token (see setup instructions below)
Setup
Shopify Access Token
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 Theme MCP Server")
- Click Configure Admin API scopes
- Select the following scopes:
read_products,write_productsread_customers,write_customersread_orders,write_ordersread_themes,write_themesread_content,write_content
- 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
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": [
"shopify-theme-mcp",
"--accessToken",
"<YOUR_ACCESS_TOKEN>",
"--domain",
"<YOUR_SHOP>.myshopify.com"
]
}
}
}Locations for the Claude Desktop config file:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
Alternative: Run Locally with Environment Variables
If you prefer to use environment variables instead of command-line arguments:
Create a
.envfile with your Shopify credentials:SHOPIFY_ACCESS_TOKEN=your_access_token MYSHOPIFY_DOMAIN=your-store.myshopify.comRun the server with npx:
npx shopify-theme-mcp
Direct Installation (Optional)
If you want to install the package globally:
npm install -g shopify-theme-mcpThen run it:
shopify-theme-mcp --accessToken=<YOUR_ACCESS_TOKEN> --domain=<YOUR_SHOP>.myshopify.comAvailable Tools
Product Management
get-products- Get all products or search by title
- Inputs:
searchTitle(optional string): Filter products by titlelimit(number): Maximum number of products to return
get-product-by-id- Get a specific product by ID
- Inputs:
productId(string): ID of the product to retrieve
get-product-by-handle- Get a product by its handle with complete data including variants, images, and metafields
- Inputs:
handle(string): The product handle to retrieve
Collection Management
get-collection-by-handle- Get a collection by its handle with complete data including products, rules, and metafields
- Inputs:
handle(string): The collection handle to retrieveincludeProducts(boolean, default: false): Whether to include products in the collectionproductLimit(number, default: 10): Maximum number of products to include (if includeProducts is true)
Customer Management
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
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
get-customer-orders- Get orders for a specific customer
- Inputs:
customerId(string, required): Shopify customer ID (numeric ID only, like "6276879810626")limit(optional number, default: 10): Maximum number of orders to return
Order Management
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
get-order-by-id- Get a specific order by ID
- Inputs:
orderId(string, required): Full Shopify order ID (e.g., "gid://shopify/Order/6090960994370")
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
Theme Management
get-themes- List all themes in the store
- Inputs:
role(optional enum): Filter by theme role (MAIN, UNPUBLISHED, DEMO)limit(optional number, default: 10): Maximum number of themes to return
get-theme-assets- Retrieve theme assets
- Inputs:
themeId(string): The theme ID to get assets fromassetKey(optional string): Specific asset key to retrieve
get-theme-files- Get theme files with optional content retrieval
- Inputs:
themeId(string): The theme ID to get files fromfilename(optional string): Specific filename to retrieve contentdirectory(optional string): Filter files by directory (templates, sections, assets, etc.)
update-theme-file- Create or update theme files
- Inputs:
themeId(string): The theme ID to updatefilename(string): The filename/path to create or updatevalue(optional string): File content for text filessrc(optional string): Source URL for asset filesattachment(optional string): Base64 encoded file content
delete-theme-file- Delete theme files
- Inputs:
themeId(string): The theme ID to delete files fromfilenames(array of strings): List of filenames to delete
create-theme- Create a new theme
- Inputs:
name(string): Theme namesrc(optional string): Source ZIP file URLrole(optional enum): Theme role (MAIN or UNPUBLISHED)
publish-theme- Publish a theme to make it live
- Inputs:
themeId(string): The theme ID to publish
Debugging
If you encounter issues, check Claude Desktop's MCP logs:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.logLicense
MIT
