home / mcp / shopify mcp server

Shopify MCP Server

MCP Server for Shopify API

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "amir-bengherbi-shopify-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "shopify-mcp-server"
      ],
      "env": {
        "MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com",
        "SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>"
      }
    }
  }
}

This MCP server lets you interact with a Shopify store through a GraphQL API, enabling you to manage products, customers, orders, and more from your preferred MCP client. It provides structured endpoints to query data, apply filters, and perform common store operations in a consistent, programmatic way.

How to use

You connect to the Shopify MCP Server from an MCP client by configuring a local or remote MCP connection. Once connected, you can call the available tools to fetch products, load customers, manage orders, and perform store-wide actions like creating discounts or drafting orders. Use the tools to build integrations that read data, apply business rules, or automate workflows against your Shopify store.

Practical usage patterns include: searching products by title, retrieving products from collections, loading customer pages with pagination, tagging customers, querying orders with filters and sorts, and creating or completing draft orders. Each tool returns structured data or status messages that you can use to drive downstream processes in your application.

How to install

Prerequisites: you need Node.js and npm installed on your machine. You will also configure authentication to access your Shopify store.

1) Ensure Node.js and npm are installed. If you don’t have them, download and install from the official Node.js website.

2) Create a configuration file for your MCP client and point it to the Shopify MCP Server using the provided command and environment variables.

3) Start the server using the exact command and arguments shown in the MCP configuration example.

4) Verify the server is running by checking the MCP client’s status or logs for successful connections and authentication.

Additional setup and configuration

Environment variables control access to your Shopify store. You’ll supply the access token and your store domain in the configuration so the MCP server can authenticate with Shopify and perform GraphQL requests.

To configure the MCP server for local development using Claude Desktop, add the following to your claude_desktop_config.json under mcpServers. The key is shopify and the settings run the server locally via npx.

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": ["-y", "shopify-mcp-server"],
      "env": {
        "SHOPIFY_ACCESS_TOKEN": "<YOUR_ACCESS_TOKEN>",
        "MYSHOPIFY_DOMAIN": "<YOUR_SHOP>.myshopify.com"
      }
    }
  }
}

Development notes

The server depends on the MCP protocol implementation and a GraphQL client to interact with Shopify’s Admin API. Typical development tasks include installing dependencies, building, and running tests.

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

Available tools

get-products

Fetch all products or search by title. Supports filtering by title and limiting results, returning details like title, description, handle, and variants.

get-products-by-collection

Retrieve products from a specific collection by its collectionId with an optional limit (default 10). Returns formatted product details from the collection.

get-products-by-ids

Retrieve products by a list of product IDs. Returns formatted product details for the specified products.

get-variants-by-ids

Fetch product variants by their IDs and return detailed variant information including related product details.

get-customers

Get Shopify customers with pagination support, including limit and next page cursor for navigating pages.

tag-customer

Add tags to a specific customer by their ID and return success or failure status.

get-orders

Query orders with advanced filtering and sorting options, including limit, cursor, search query, sort key, and reverse order.

get-order

Retrieve a single order by its ID and return detailed order information.

create-discount

Create a basic discount code with a title, code, value type, value, and validity window.

create-draft-order

Create a draft order with line items, customer email, shipping address, and optional note.

complete-draft-order

Complete a draft order by providing the draftOrderId and a variantId to finalize the order.

get-collections

Get all collections with optional limit and name filtering, returning collection details.

get-shop

Retrieve basic shop details.

get-shop-details

Retrieve extended shop details including shipping countries.

manage-webhook

Manage webhooks by subscribing, finding, or unsubscribing for a specific topic and callback URL.