Package Exports
- mt-mcp
- mt-mcp/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mt-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
mt-mcp
A Model Context Protocol (MCP) server for Shopify that integrates seamlessly with Claude and other AI assistants. Manage your Shopify store programmatically through natural language.
Features
- Get Products Count — Retrieve the total number of products in your Shopify store
- Delete Product by Name — Find and delete products by exact title
- Update Order Address — Modify shipping/billing addresses for orders
- Extensible Design — Easy to add new tools without touching the main server code
Installation
Prerequisites
- Node.js 16+
- A Shopify store with API access
- Claude Desktop or compatible MCP client
Step 1: Get Your Shopify Credentials
- Log in to your Shopify Admin Dashboard
- Go to Settings → Apps and Integrations → Develop Apps
- Create a new app or use an existing one
- Under Configuration, enable these scopes:
read_productsdelete_productsread_orderswrite_orders
- Install the app and copy your Access Token
- Find your Shopify Domain (e.g.,
yourstore.myshopify.com)
Step 2: Configure Claude Desktop
On macOS/Linux:
Edit ~/.config/Claude/claude_desktop_config.json
On Windows:
Edit %APPDATA%\Claude\claude_desktop_config.json
Add this configuration:
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": ["-y", "mt-mcp"],
"env": {
"SHOPIFY_ACCESS_TOKEN": "your_access_token_here",
"MYSHOPIFY_DOMAIN": "yourstore.myshopify.com"
}
}
}
}Replace:
your_access_token_here— Your Shopify API access tokenyourstore.myshopify.com— Your actual Shopify domain
Step 3: Restart Claude Desktop
After updating the config file, fully restart Claude Desktop. You'll see a small "tools" icon in the bottom-right corner of the chat indicating the MCP server is connected.
Usage
Once configured, you can now interact with your Shopify store using natural language in Claude:
Example Queries
Get your product count:
How many products do I have in my store?Delete a product:
Delete the product named "Summer Hat"Update an order's address:
Update order #1001's shipping address to 123 Main St, Springfield, ILAvailable Tools
1. get-products-count
Retrieves the total count of products in your Shopify store.
Input: None required
Response: JSON with product count
2. delete-product-by-name
Finds a product by exact title and deletes it.
Input:
{
"productName": "Product Title"
}Response: Confirmation message with deleted product details
3. update-order-address
Updates shipping and/or billing address for an order.
Input:
{
"orderName": "#1001",
"updates": {
"shippingAddress": {
"firstName": "John",
"lastName": "Doe",
"address1": "123 Main St",
"city": "Springfield",
"province": "IL",
"country": "US",
"zip": "62701"
}
}
}Alternative using order ID (GraphQL GID):
{
"orderId": "gid://shopify/Order/123456",
"updates": {
"shippingAddress": { ... }
}
}Response: Updated order details with new address
Adding New Tools
The tool system is modular and extensible. To add a new tool:
1. Create a new file in src/tools/
Example: src/tools/my-new-tool.js
export const tool = {
name: "my-tool-name",
description: "What this tool does",
inputSchema: {
type: "object",
properties: {
exampleParam: { type: "string", description: "Parameter description" }
},
required: ["exampleParam"]
},
handler: async ({ input, context }) => {
const { fetch, SHOPIFY_GRAPHQL_URL, SHOPIFY_TOKEN } = context;
try {
// Your tool logic here
const result = await fetch(SHOPIFY_GRAPHQL_URL, {
method: "POST",
headers: {
"X-Shopify-Access-Token": SHOPIFY_TOKEN,
"Content-Type": "application/json"
},
body: JSON.stringify({ /* your GraphQL query */ })
});
const data = await result.json();
return {
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
};
} catch (err) {
throw new Error(`Tool error: ${err.message}`);
}
}
};2. The server automatically loads it
Restart Claude Desktop — your new tool will appear immediately. No changes to index.js needed!
Project Structure
mt-mcp/
├── index.js # Main MCP server entry point
├── package.json # Dependencies and metadata
├── src/
│ ├── messages.js # MCP response helpers
│ └── tools/
│ ├── index.js # Tool loader (loads all .js files)
│ ├── get-products-count.js
│ ├── delete-product-by-name.js
│ ├── update-order-address.js
│ └── [add new tools here]
├── README.md # This file
└── .env (optional) # Local env variables for testingEnvironment Variables
When using locally or in CI/CD:
SHOPIFY_ACCESS_TOKEN=your_token_here
MYSHOPIFY_DOMAIN=yourstore.myshopify.comTroubleshooting
Tools not appearing in Claude
- Check: Restart Claude Desktop completely (⌘Q or Ctrl+Q)
- Check: Verify credentials in
claude_desktop_config.jsonare correct - Check: Look for error messages in Claude's developer tools (Ctrl+Shift+I)
"Invalid access token" error
- Verify your access token is correct and hasn't expired
- Check that your Shopify app has the required API scopes enabled
"Unknown tool" error
- Ensure the tool name matches exactly (case-sensitive)
- Check that the tool file is in
src/tools/and exports a validtoolobject
Tool execution fails
- Check that your Shopify domain is correct (e.g.,
yourstore.myshopify.com) - Verify the product/order exists before attempting operations
- Check Shopify API documentation for input format requirements
Development & Testing
Run locally:
node index.jsWith .env file:
cp .env.example .env
# Edit .env with your credentials
node index.jsSecurity Notes
⚠️ Never commit access tokens to version control!
- Use Claude's config file for credentials (Claude handles this securely)
- If using a
.envfile locally, add it to.gitignore - Rotate access tokens if accidentally exposed
- Limit API scopes to only what your tools need
Support & Contributing
For issues or feature requests, see the repository or contact the maintainer.
License: MIT