Shopify MCP server

Integrates with Shopify to provide tools for retrieving product and customer data, enabling e-commerce analytics and automation without API complexities.
Back to servers
Provider
Siddhant Bajaj
Release date
Jan 30, 2025
Language
Python
Stats
3 stars

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.

Prerequisites

  • Python 3.12 or higher
  • A Shopify store with API access
  • Shopify API credentials (API Key, Password, and Access Token)

Installation

  1. Clone the repository:
git clone https://github.com/siddhantbajaj/shopify-mcp-server.git
cd shopify-mcp-server
  1. Create and activate a virtual environment using uv:
uv venv
source .venv/bin/activate  # On Unix/MacOS
# or
.venv\Scripts\activate  # On Windows
  1. Install the package:
uv pip install -e .

Configuration

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.

Running the Server

Start the MCP server with:

python -m shopify_mcp_server.server

Available Tools

The server provides two main tools for interacting with your Shopify store:

get-product-list

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
---

get-customer-list

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
---

Security Notes

  • Never commit your .env file to version control
  • Keep your Shopify API credentials secure
  • Use environment variables for sensitive information when deploying

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later