The Shopify MCP Server provides a Model Context Protocol implementation to connect AI assistants like Claude with your Shopify store data. It offers specialized tools for retrieving product and customer information directly from your Shopify store through a simple interface.
git clone https://github.com/siddhantbajaj/shopify-mcp-server.git
cd shopify-mcp-server
uv
:uv venv
source .venv/bin/activate # On Unix/MacOS
# or
.venv\Scripts\activate # On Windows
uv pip install -e .
Create a .env
file in the root directory with your Shopify credentials:
SHOPIFY_SHOP_URL="your-store.myshopify.com"
SHOPIFY_API_KEY="your_api_key"
SHOPIFY_PASSWORD="your_api_password"
SHOPIFY_ACCESS_TOKEN="your_access_token"
Replace the placeholder values with your actual Shopify API credentials.
Start the MCP server with:
python -m shopify_mcp_server.server
The server provides two main tools for interacting with your Shopify store:
This tool retrieves a list of products from your Shopify store.
Parameters:
limit
(optional): Maximum number of products to return (default: 10)Example response:
Products (showing 3):
Title: Blue T-Shirt
ID: 123456789
Product Type: Clothing
Vendor: Fashion Brand
Status: active
Price: $19.99
---
Title: Running Shoes
ID: 987654321
Product Type: Footwear
Vendor: Sports Co
Status: active
Price: $89.99
---
This tool retrieves a list of customers from your Shopify store.
Parameters:
limit
(optional): Maximum number of customers to return (default: 10)Example response:
Customers (showing 2):
Name: John Doe
ID: 123456789
Email: [email protected]
Orders Count: 5
Total Spent: $345.67
---
Name: Jane Smith
ID: 987654321
Email: [email protected]
Orders Count: 2
Total Spent: $125.45
---
.env
file to version controlThere 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.