Skip to main content
Glama

shopify-mcp — Shopify Admin MCP server

A Model Context Protocol server that gives Claude, Cursor, Claude Code and any other MCP client access to one Shopify store: its products, orders and analytics, and any other read query of the Admin GraphQL API. It is read-only by default and can be allowed to make chosen changes.

  • Read-only unless you switch writing on. Every query is parsed before it is sent, and anything that is not a pure query is refused. Writing is one extra tool that exists only when SHOPIFY_WRITE_TOOLS is set, limited to an allowlist of mutations (see Writing). On top of that, the store decides what the app may touch through its access scopes.

  • One store, one credential. The server is bound to a single store and uses that store's own app. It never holds a user's login.

  • Streamable HTTP as well as stdio. It can run centrally. This is how Walma serves it to whole organisations through its AI gateway.

  • Three runtime dependencies. It calls the Admin GraphQL API directly.

Built and used by Walma AI.

Tools

Tool

What it does

get_shop

The store, its currency and time zone, and the access scopes the app was granted

list_products

Products with status, vendor, type, tags, total inventory and price range; search filter, sorting, paging

list_orders

Orders with dates, payment and fulfilment status, totals and line items; search filter, sorting, paging

run_analytics_query

A ShopifyQL query (FROM sales SHOW total_sales GROUP BY month SINCE -12m)

graphql_introspect

One type of the Admin schema: fields, arguments, enum values

graphql_query

Any single read query, for what the other tools do not cover

list_orders returns no customer, address or e-mail fields. A caller who needs them can ask through graphql_query, and gets them only if the store granted the app the customer scopes.

Related MCP server: Shopify MCP

Writing

Set SHOPIFY_WRITE_TOOLS=1 and the server gains a seventh tool, graphql_mutation, which runs one mutation. It changes the live store at once: Shopify has no dry run and no undo, so have your MCP client ask before each call.

A mutation is sent only if it passes all of this, checked in the server whatever the model is asked to do:

  1. It is on the allowlist. By default: pages, blog posts, redirects, discounts, metaobjects and metafields, files, menus and marketing activities, which is what campaign work needs. Not products, prices, inventory, orders or customers.

  2. A delete is allowed only by its exact name. page* lets pageCreate and pageUpdate through, never pageDelete.

  3. It is not on the hard-deny list. Refunds, payments, gift cards, cancelling or creating orders, staff, access tokens, webhooks, customer deletion and data erasure, bulk mutations, and publishing or deleting a theme are refused whatever the allowlist says.

Change the allowlist with SHOPIFY_ALLOWED_MUTATIONS, a comma-separated list of mutation names or prefixes ending in *. It replaces the default:

SHOPIFY_ALLOWED_MUTATIONS="page*,discountCode*,productUpdate,pageDelete"

The app also needs the matching write_ scopes (write_content or write_online_store_pages for pages, write_discounts for discounts, and so on). Grant only those.

Shopify reports a refused mutation as userErrors in an otherwise successful answer. The tool returns that as an error, so a change that did not happen is not read as done.

Every caller writes as the same app, so the store's activity log shows the app, not the person.

Setup

1. Create the app

Shopify has two kinds of app that fit. Use the first unless the store already has the second.

An app in the Dev Dashboard (current). In the Dev Dashboard of the organisation that owns the store: create an app, give it the access scopes below, release a version and install it on the store. Copy its Client ID and Client secret. The server trades them for an access token that lasts 24 hours and renews it by itself. This works only when the app and the store are in the same Shopify organisation.

A custom app created in the store admin (legacy). Settings → Apps and sales channels → Develop apps → the app → API credentials. Its Admin API access token (shpat_…) does not expire.

2. Access scopes

Grant only what you want the model to be able to read:

Scope

Needed for

read_products

list_products, product and collection queries

read_orders

list_orders (the last 60 days)

read_all_orders

orders older than 60 days

read_reports

run_analytics_query

read_inventory, read_locations

inventory per location

read_customers

customer queries. Leave it out to keep personal data out of reach

Grant a write_ scope only for what you have switched on under Writing. The scopes are the second lock.

3. Add it to your MCP client

Claude Code:

claude mcp add shopify --scope user \
  -e SHOPIFY_STORE_DOMAIN=example.myshopify.com \
  -e SHOPIFY_CLIENT_ID=your-client-id \
  -e SHOPIFY_CLIENT_SECRET=your-client-secret \
  -- npx -y github:Walma-Labs/shopify-mcp

Claude Desktop, Cursor and others (mcpServers in the client's config):

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": ["-y", "github:Walma-Labs/shopify-mcp"],
      "env": {
        "SHOPIFY_STORE_DOMAIN": "example.myshopify.com",
        "SHOPIFY_CLIENT_ID": "your-client-id",
        "SHOPIFY_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Configuration

Variable

SHOPIFY_STORE_DOMAIN

Required. example or example.myshopify.com. Only *.myshopify.com is accepted, so the token cannot be sent to another host

SHOPIFY_CLIENT_ID, SHOPIFY_CLIENT_SECRET

A Dev Dashboard app. Wins when the static token is also set

SHOPIFY_ACCESS_TOKEN

A legacy custom app's Admin API token

SHOPIFY_WRITE_TOOLS

Optional: 1 registers graphql_mutation. See Writing

SHOPIFY_ALLOWED_MUTATIONS

Optional: which mutations, replacing the default list

SHOPIFY_API_VERSION

Optional, default 2026-10. Shopify supports a version for at least a year

Running over HTTP

npm run build
PORT=8080 npm run start:http

POST / is the MCP endpoint (streamable HTTP, stateless) and GET /healthz answers ok. There is no authentication in this process: put it behind something that authenticates callers. Everyone who can reach it reads the store with the app's scopes.

Using it as a library

import { createShopifyClient, createShopifyServer } from "@walma-labs/shopify-mcp";

const client = createShopifyClient();          // built once; caches the store's access token
const server = createShopifyServer(client);    // a fresh McpServer per request

Development

npm install
npm test

The tests drive the real MCP wire against a mocked HTTP function, so they need neither network nor a store. The built-in queries are validated against a copy of the parts of the Admin schema they use (test/logic.spec.ts); update both together when Shopify renames a field.

Licence

Apache-2.0.

Available Tools

6 tools
get_shopGet shopA
Read-only

The store this server is connected to: name, domains, currency, time zone, and the access scopes the app was granted. Check the scopes when another tool answers 'access denied'.

Inputs: no named parameters.

graphql_introspectLook up a GraphQL typeA
Read-only

Describes one type of the Admin GraphQL schema: its fields with their types and arguments, or its enum values. Use it before graphql_query so fields are looked up, not guessed.

Start from "QueryRoot" to see every top-level query, then follow the type names, e.g. "Order", "ProductVariant", "InventoryLevel", "OrderSortKeys".

Inputs: type_name (required).

graphql_queryRun a GraphQL queryA
Read-only

Runs one read query against the store's Admin GraphQL API, for anything the other tools do not cover: variants and SKUs, inventory per location, customers, collections, discounts, fulfilments, metafields.

Only queries are accepted: a mutation or subscription is refused before it is sent. What the query may read is limited to the access scopes the store granted the app (see get_shop).

Ask for no more than you need: lists take first: N (keep it at 100 or below) and Shopify bills a query by the items it requests. Page with pageInfo { hasNextPage endCursor } and after.

Inputs: query (required), variables.

list_ordersList ordersA
Read-only

Orders: number, dates, payment and fulfilment status, totals and line items. No customer details.

query uses Shopify's search syntax (https://shopify.dev/docs/api/usage/search-syntax), e.g. "created_at:>=2026-01-01", "financial_status:paid", "fulfillment_status:unfulfilled", "status:open", "sku:ABC123".

Orders older than 60 days are only visible when the app has the read_all_orders scope. For sums over a period (sales per month, top products), run_analytics_query is the better tool: this one lists orders, it does not add them up.

Inputs: after, first, query, reverse, +1 more.

list_productsList productsA
Read-only

Products in the catalogue: title, status, vendor, type, tags, total inventory and price range.

query uses Shopify's search syntax (https://shopify.dev/docs/api/usage/search-syntax), e.g. "status:active", "vendor:Acme", "inventory_total:0", "title:ladder*", "updated_at:>2026-01-01". Without it every product is listed.

For variants, SKUs, per-location inventory or metafields, use graphql_query.

Inputs: after, first, query, reverse, +1 more.

run_analytics_queryRun analytics queryA
Read-only

Runs a ShopifyQL query against the store's analytics, the same data as the reports in the Shopify admin.

A query names a dataset with FROM and what to show with SHOW, and may group, filter, order and limit: FROM sales SHOW total_sales, orders GROUP BY month SINCE -12m ORDER BY month FROM sales SHOW net_sales GROUP BY product_title SINCE -30d ORDER BY net_sales DESC LIMIT 10 FROM sessions SHOW sessions, conversion_rate GROUP BY day SINCE -7d

Reference: https://shopify.dev/docs/api/shopifyql. Needs the read_reports scope. A query that cannot be parsed comes back as an error with Shopify's explanation.

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool targets a distinct layer: shop metadata (get_shop), schema discovery (graphql_introspect), two curated list endpoints (list_products, list_orders), aggregation (run_analytics_query) and a raw escape hatch (graphql_query). The only real overlap is that graphql_query can technically retrieve products and orders, but descriptions explicitly route those cases ('for anything the other tools do not cover') and even contrast listing vs summing.

    Naming Consistency4/5

    Four tools follow a clear verb_noun pattern (get_shop, list_products, list_orders, run_analytics_query) and the two GraphQL tools share a graphql_* namespace that reads consistently as a sub-family. Minor deviation in that graphql_introspect/graphql_query use a resource prefix rather than a verb, but the grouping is intentional and predictable.

    Tool Count5/5

    Six tools is tightly scoped: two common list endpoints, one analytics tool, one raw query tool plus its introspection companion, and one diagnostic tool. Nothing feels redundant, and the escape hatch prevents the surface from ballooning into a per-resource CRUD sprawl.

    Completeness4/5

    The server is deliberately read-only (graphql_query rejects mutations), and within that scope it covers catalog, orders, aggregate analytics and arbitrary schema-backed reads, so there are no real dead ends. Write operations, cursor-following helpers and a dedicated customer/inventory listing are absent, though graphql_query plus graphql_introspect lets an agent work around all of them.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      D
      quality
      D
      maintenance
      Enables interaction with Shopify store data through the GraphQL API, providing tools for managing products, customers, orders, and collections.
      21
      9
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      A read-only MCP server that exposes the full Shopify Admin GraphQL API through 6 universal tools, with multi-store support and mutation rejection at the parser level for safety.
      6
      23 PyPI
      1
      MIT
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables management of Shopify store via GraphQL, including products, orders, inventory, and discounts with security features like preview mode and write protection.
      -