trackmcp
Back to directory
GeLi2001

shopify-mcp

View on GitHub

MCP server for Shopify api, usable on mcp hosts such as Claude and Cursor TypeScript-based implementation.

98 stars TypeScriptAI & Machine Learning Updated Nov 4, 2025
mcpmcp-servershopifytypescript

Documentation

Shopify MCP Server

(please leave a star if you like!)

MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This server provides tools for managing products, customers, orders, and more.

๐Ÿ“ฆ Package Name: `shopify-mcp`

๐Ÿš€ Command: `shopify-mcp` (NOT `shopify-mcp-server`)

Features

  • Product Management: Full CRUD for products, variants, and options (8 tools)
  • Customer Management: Full CRUD, merge, and address management (8 tools)
  • Order Management: Smart lookup, cancel, close/open, mark as paid, fulfillment, refunds (10 tools)
  • Metafield Management: Get, set, and delete metafields on any resource (3 tools)
  • Inventory Management: Set absolute inventory quantities at locations (1 tool)
  • Tag Management: Add/remove tags on any taggable resource (1 tool)
  • Pagination & Sorting: Cursor-based pagination and sort keys on all list queries
  • Advanced Filtering: Pass-through Shopify query syntax for all list endpoints
  • GraphQL Integration: Direct integration with Shopify's GraphQL Admin API (2026-01)
  • Comprehensive Error Handling: Clear error messages for API and authentication issues

Prerequisites

1. Node.js (version 18 or higher)

2. A Shopify store with a custom app (see setup instructions below)

Setup

Authentication

This server supports two authentication methods:

Option 1: Client Credentials (Dev Dashboard apps, January 2026+)

As of January 1, 2026, new Shopify apps are created in the Dev Dashboard and use OAuth client credentials instead of static access tokens.

1. From your Shopify admin, go to Settings > Apps and sales channels

2. Click Develop apps > Build app in dev dashboard

3. Create a new app and configure Admin API scopes:

    4. Install the app on your store

    5. Copy your Client ID and Client Secret from the app's API credentials

    The server will automatically exchange these for an access token and refresh it before it expires (tokens are valid for ~24 hours).

    Option 2: Static Access Token (legacy apps)

    If you have an existing custom app with a static `shpat_` access token, you can still use it directly.

    Usage with Claude Desktop

    Client Credentials (recommended):

    json
    {
      "mcpServers": {
        "shopify": {
          "command": "npx",
          "args": [
            "shopify-mcp",
            "--clientId",
            "",
            "--clientSecret",
            "",
            "--domain",
            ".myshopify.com"
          ]
        }
      }
    }

    Static Access Token (legacy):

    json
    {
      "mcpServers": {
        "shopify": {
          "command": "npx",
          "args": [
            "shopify-mcp",
            "--accessToken",
            "",
            "--domain",
            ".myshopify.com"
          ]
        }
      }
    }

    Locations for the Claude Desktop config file:

    • MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
    • Windows: `%APPDATA%/Claude/claude_desktop_config.json`

    Usage with Claude Code

    Client Credentials:

    bash
    claude mcp add shopify -- npx shopify-mcp \
      --clientId YOUR_CLIENT_ID \
      --clientSecret YOUR_CLIENT_SECRET \
      --domain your-store.myshopify.com

    Static Access Token (legacy):

    bash
    claude mcp add shopify -- npx shopify-mcp \
      --accessToken YOUR_ACCESS_TOKEN \
      --domain your-store.myshopify.com

    Alternative: Run Locally with Environment Variables

    If you prefer to use environment variables instead of command-line arguments:

    1. Create a `.env` file with your Shopify credentials:

    Client Credentials:

    code
    SHOPIFY_CLIENT_ID=your_client_id
       SHOPIFY_CLIENT_SECRET=your_client_secret
       MYSHOPIFY_DOMAIN=your-store.myshopify.com

    Static Access Token (legacy):

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

    2. Run the server with npx:

    code
    npx shopify-mcp

    Direct Installation (Optional)

    If you want to install the package globally:

    code
    npm install -g shopify-mcp

    Then run it:

    code
    shopify-mcp --clientId= --clientSecret= --domain=.myshopify.com

    Additional Options

    • `--apiVersion`: Specify the Shopify API version (default: `2026-01`). Can also be set via `SHOPIFY_API_VERSION` environment variable.

    โš ๏ธ Important: If you see errors about "SHOPIFY_ACCESS_TOKEN environment variable is required" when using command-line arguments, you might have a different package installed. Make sure you're using `shopify-mcp`, not `shopify-mcp-server`.

    Available Tools (31)

    Pagination, Sorting & Filtering

    All list query tools (`get-products`, `get-customers`, `get-orders`, `get-customer-orders`) support:

    • Cursor-based pagination: `after` / `before` (cursor strings), with `pageInfo` in the response (`hasNextPage`, `hasPreviousPage`, `startCursor`, `endCursor`)
    • Sorting: `sortKey` (enum specific to each resource) and `reverse` (boolean)
    • Advanced filtering: `query` or `searchQuery` parameter accepting Shopify query syntax

    Product Management (8 tools)

    1. `get-products`

      2. `get-product-by-id`

        3. `create-product`

          4. `update-product`

            5. `delete-product`

              6. `manage-product-options`

                7. `manage-product-variants`

                  8. `delete-product-variants`

                    Customer Management (8 tools)

                    1. `get-customers`

                      2. `get-customer-by-id`

                        3. `create-customer`

                          4. `update-customer`

                            5. `delete-customer`

                              6. `customer-merge`

                                7. `manage-customer-address`

                                  Order Management (10 tools)

                                  1. `get-orders`

                                    2. `get-order-by-id`

                                      3. `update-order`

                                        4. `get-customer-orders`

                                          5. `order-cancel`

                                            6. `order-close-open`

                                              7. `order-mark-as-paid`

                                                8. `create-fulfillment`

                                                  9. `refund-create`

                                                    10. `create-draft-order`

                                                      Draft Order Management (1 tool)

                                                      1. `complete-draft-order`

                                                        Metafield Management (3 tools)

                                                        1. `get-metafields`

                                                          2. `set-metafields`

                                                            3. `delete-metafields`

                                                              Inventory Management (1 tool)

                                                              1. `inventory-set-quantities`

                                                                Tag Management (1 tool)

                                                                1. `manage-tags`

                                                                  Order Query Filter Reference

                                                                  The `get-orders` tool's `query` parameter supports Shopify search syntax:

                                                                  FilterExample
                                                                  `name``name:#77235`
                                                                  `created_at``created_at:>2024-01-01` or `created_at:2024-01-01..2024-03-31`
                                                                  `updated_at``updated_at:>2024-06-01`
                                                                  `financial_status``financial_status:paid`
                                                                  `fulfillment_status``fulfillment_status:shipped`
                                                                  `status``status:open`
                                                                  `email``email:customer@example.com`
                                                                  `tag` / `tag_not``tag:vip tag_not:wholesale`
                                                                  `discount_code``discount_code:SUMMER20`
                                                                  `sku``sku:PROD-001`
                                                                  `risk_level``risk_level:high`
                                                                  `gateway``gateway:shopify_payments`
                                                                  `test``test:true`

                                                                  Debugging

                                                                  If you encounter issues, check Claude Desktop's MCP logs:

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

                                                                  License

                                                                  MIT

                                                                  Frequently asked questions

                                                                  What is shopify-mcp?

                                                                  shopify-mcp is MCP server for Shopify api, usable on mcp hosts such as Claude and Cursor TypeScript-based implementation.

                                                                  How do I install shopify-mcp?

                                                                  Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

                                                                  Is shopify-mcp open source?

                                                                  Yes โ€” it is hosted on GitHub at https://github.com/GeLi2001/shopify-mcp and has 98 stars.

                                                                  Related MCP tools

                                                                  Run your own MCP server? See who uses it and what to fix.

                                                                  Measure it with TrackMCP