Shopify MCP server

Integrates with Shopify's GraphQL API to enable e-commerce management tasks like inventory tracking, customer segmentation, order processing, and promotional campaign creation without switching interfaces.
Back to servers
Setup instructions
Provider
Amir Bengherbi
Release date
May 01, 2025
Stats
2 stars

This MCP server for Shopify provides a powerful interface to interact with your Shopify store data through GraphQL. It enables you to manage products, customers, orders, and more directly from Claude.

Installation

Prerequisites

  • Node.js (v16+)
  • Shopify Custom App Access Token

Setup Steps

git clone https://github.com/pashpashpash/shopify-mcp-server.git
cd shopify-mcp-server
npm install
npm run build

Configuration

Shopify Setup

  1. Create a Custom App in Shopify admin:

    • Go to Settings > Apps and sales channels > Develop apps > Create an app
    • Configure appropriate scopes (read/write permissions for products, customers, orders)
    • Install the app and copy the Admin API access token
  2. Create a .env file in the project root:

    SHOPIFY_ACCESS_TOKEN=your_access_token
    MYSHOPIFY_DOMAIN=your-store.myshopify.com
    

Claude Desktop Configuration

Configure Claude Desktop by editing claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "shopify": {
      "command": "node",
      "args": ["path/to/shopify-mcp-server/dist/index.js"],
      "env": {
        "SHOPIFY_ACCESS_TOKEN": "your_access_token",
        "MYSHOPIFY_DOMAIN": "your-store.myshopify.com"
      }
    }
  }
}

Note: Replace the path with the correct location of your cloned repository and use your actual token and domain.

Tools and Usage

Product Management

Finding Products

findProducts({
  searchTitle: "T-shirt",  // optional
  limit: 10
})

List Products in Collection

listProductsInCollection({
  collectionId: "gid://shopify/Collection/12345",
  limit: 10  // optional, default: 10
})

Get Products by IDs

getProductsByIds({
  productIds: ["gid://shopify/Product/12345", "gid://shopify/Product/67890"]
})

Get Variants by IDs

getVariantsByIds({
  variantIds: ["gid://shopify/ProductVariant/12345", "gid://shopify/ProductVariant/67890"]
})

Customer Management

List Customers

listCustomers({
  limit: 10,  // optional
  next: "cursor_string"  // optional, for pagination
})

Add Tags to Customer

addCustomerTags({
  customerId: "gid://shopify/Customer/12345",
  tags: ["VIP", "Wholesale"]
})

Order Management

Find Orders

findOrders({
  first: 10,  // optional
  after: "cursor_string",  // optional, for pagination
  query: "created_at:>2023-01-01",  // optional
  sortKey: "CREATED_AT",  // optional
  reverse: false  // optional
})

Get Order by ID

getOrderById({
  orderId: "gid://shopify/Order/12345"
})

Create Draft Order

createDraftOrder({
  lineItems: [
    { variantId: "gid://shopify/ProductVariant/12345", quantity: 1 }
  ],
  email: "[email protected]",
  shippingAddress: {
    address1: "123 Main St",
    city: "New York",
    province: "NY",
    zip: "10001",
    country: "US"
  },
  note: "Rush delivery please"  // optional
})

Complete Draft Order

completeDraftOrder({
  draftOrderId: "gid://shopify/DraftOrder/12345"
})

Discount Management

Create Discount Code

createDiscountCode({
  title: "Summer Sale",
  code: "SUMMER20",
  valueType: "percentage",  // or "fixed_amount"
  value: 20,
  startsAt: "2023-06-01T00:00:00Z",
  endsAt: "2023-08-31T23:59:59Z",  // optional
  appliesOncePerCustomer: true
})

Collection Management

List Collections

listCollections({
  limit: 10,  // optional, default: 10
  name: "Summer"  // optional, filter by name
})

Shop Information

Get Basic Shop Details

getShopDetails()

Get Extended Shop Details

getExtendedShopDetails()

Webhook Management

Manage Webhooks

manageWebhooks({
  action: "subscribe",  // or "find", "unsubscribe"
  callbackUrl: "https://example.com/webhook",
  topic: "PRODUCTS_CREATE",
  webhookId: "gid://shopify/WebhookSubscription/12345"  // required for unsubscribe
})

Debugging

To check Claude Desktop MCP logs:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Common Issues

  • Authentication Problems: Verify your access token, domain format, and API scopes
  • API Errors: Check for rate limits, proper input formats, and required fields

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "shopify" '{"command":"node","args":["path/to/shopify-mcp-server/dist/index.js"],"env":{"SHOPIFY_ACCESS_TOKEN":"your_access_token","MYSHOPIFY_DOMAIN":"your-store.myshopify.com"}}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "shopify": {
            "command": "node",
            "args": [
                "path/to/shopify-mcp-server/dist/index.js"
            ],
            "env": {
                "SHOPIFY_ACCESS_TOKEN": "your_access_token",
                "MYSHOPIFY_DOMAIN": "your-store.myshopify.com"
            }
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "shopify": {
            "command": "node",
            "args": [
                "path/to/shopify-mcp-server/dist/index.js"
            ],
            "env": {
                "SHOPIFY_ACCESS_TOKEN": "your_access_token",
                "MYSHOPIFY_DOMAIN": "your-store.myshopify.com"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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