The Shopify Python MCP Server allows you to retrieve and manage Shopify product information directly from Claude Desktop. This server connects to the Shopify API, providing a set of tools to list, get, create, update, and delete products from your Shopify store.
To use this MCP server, you need to set up the following environment variables:
SHOPIFY_SHOP_URL
: Your Shopify store URL (e.g., mystore.myshopify.com)SHOPIFY_API_KEY
: Your Shopify Admin API keySHOPIFY_API_PASSWORD
: Your Shopify Admin API password (Secret)SHOPIFY_API_VERSION
: Shopify API version (default: 2023-10)For Claude Desktop users, add the following configuration to your claude_desktop_config.json
file:
Configuration file location: ~/Library/Application Support/Claude/claude_desktop_config.json
"mcpServers": {
"shopify-py-mcp": {
"command": "uv",
"args": [
"--directory",
"/your_path/shopify-py-mcp",
"run",
"shopify-py-mcp"
],
"env": {
"SHOPIFY_SHOP_URL": "your-store.myshopify.com",
"SHOPIFY_API_KEY": "your-api-key",
"SHOPIFY_API_PASSWORD": "your-api-password",
"SHOPIFY_API_VERSION": "2023-10"
}
}
}
The Shopify Python MCP Server provides several tools to interact with your Shopify store. Here's how to use each function:
To retrieve a list of products, simply ask Claude:
商品一覧を取得してください。
You can specify the number of products to retrieve (up to 250, default is 50) using the limit
parameter.
To get detailed information about a specific product:
商品ID 1234567890の詳細情報を取得してください。
To create a new product, provide the necessary product information:
以下の情報で新しい商品を作成してください:
- 商品名: サンプル商品
- 説明: これはサンプル商品です。
- 価格: 1000円
The server supports the following product attributes:
title
: Product name (required)body_html
: Product description (HTML format)vendor
: Vendor nameproduct_type
: Product typetags
: Tags (comma separated)status
: Status (active/draft/archived)variants
: Product variationsoptions
: Product optionsimages
: Product imagesTo update an existing product:
商品ID 1234567890を以下の情報で更新してください:
- 商品名: 更新後の商品名
- 価格: 2000円
You'll need to provide the product ID and the attributes you want to update.
To delete a product:
商品ID 1234567890を削除してください。
This requires only the product ID of the item you wish to remove.
For debugging purposes, you can use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /your_path/shopify-py-mcp run shopify-py-mcp
This tool helps you troubleshoot issues with the MCP server and ensure it's working correctly with the Shopify API.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.