Connect Shopify to Claude Code — MCP setup in 10 minutes

Claude Code isn't just for writing software. Connected to your Shopify store, it becomes the closest thing to a technical operations hire you can get for $20/month: bulk product edits in plain English, SEO meta audits across your whole catalog, order queries, inventory checks — all from a terminal.
The connection runs through MCP. This guide covers what that is (one paragraph, promise), the setup with a working config pattern, how to authenticate safely with a custom app token, and six operator workflows with the exact prompts to run. If you're using Claude on desktop or web rather than the terminal, the setup is different — see how to connect Claude to Shopify for that version.
Table of Contents
- What MCP is in one paragraph
- Two ways to connect: Dev MCP vs Admin API
- Step 1: create a custom app and access token
- Step 2: add the MCP server to Claude Code
- Scopes: start read-only
- 6 operator use cases with example prompts
- Frequently Asked Questions
What MCP is in one paragraph
MCP (Model Context Protocol) is an open standard that lets AI tools like Claude Code talk to external systems — databases, APIs, your Shopify store — through a common interface. An MCP server exposes a set of tools ("get product", "update inventory", "run a GraphQL query"), and Claude Code calls them the way it calls its own file tools. You configure the server once; from then on, "show me every product missing a meta description" is a prompt, not a script you have to write. That's the whole concept. Everything else is configuration.
Two ways to connect: Dev MCP vs Admin API
There are two distinct routes, and people conflate them constantly:
| Route | What it gives you | Auth | Best for |
|---|---|---|---|
Shopify Dev MCP (@shopify/dev-mcp) |
Shopify docs search, Admin GraphQL schema exploration, code validation | None (public docs) | Theme devs, learning the API, validating queries |
| Admin API via MCP | Live access to your store: products, orders, inventory, themes | Custom app access token | Operators — the six use cases below |
Shopify's official Dev MCP server is a documentation-and-schema tool: it makes Claude Code dramatically better at writing Shopify API code, but it never touches your store's data. The Admin API route is the one that reads your actual catalog and orders — that's where the operator leverage is, and it's the one that needs real authentication. Most serious setups run both: Dev MCP so Claude writes correct GraphQL, Admin access so it can execute it.
(Shopify also ships a Storefront MCP endpoint at https://{your-store}.myshopify.com/api/mcp aimed at shopping agents — cart and catalog actions for customers. Interesting, but not the operator tool this post is about.)
Step 1: create a custom app and access token
The Admin API route authenticates with a custom app access token. Five minutes in the Shopify admin:
- Settings → Apps and sales channels → Develop apps (you may need to enable custom app development the first time — an owner-level toggle).
- Create an app. Name it something honest like
claude-code-readonly. - Configure Admin API scopes. Start with read-only (next section covers exactly which).
- Install the app to the store.
- Under API credentials, reveal and copy the Admin API access token (starts with
shpat_). Shopify shows it once — store it in a password manager, not a text file.
Treat this token like a store password: it is one. Never commit it to git, never paste it into a shared doc, and revoke it from the same screen the moment you stop using it.
Step 2: add the MCP server to Claude Code
Two config surfaces, same result. The snippets below are the pattern — swap in the actual MCP server package you choose (Shopify's official Dev MCP, or a community Admin MCP server) and your own store domain.
Option A — CLI, one line. For Shopify's official Dev MCP (docs + schema, no auth):
claude mcp add shopify-dev -- npx -y @shopify/dev-mcp@latest
Option B — project .mcp.json. For an Admin API MCP server, checked into your store's ops repo (with the token kept in your environment, never in the file):
{
"mcpServers": {
"shopify-admin": {
"command": "npx",
"args": ["-y", "<your-admin-mcp-server-package>"],
"env": {
"SHOPIFY_STORE_DOMAIN": "your-store.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "${SHOPIFY_ACCESS_TOKEN}"
}
}
}
}
Set the token in your shell profile (SHOPIFY_ACCESS_TOKEN=shpat_...) so the JSON file stays commit-safe. Restart Claude Code, run /mcp, and you should see the server listed with its tools. First prompt to verify the wiring:
"Using the Shopify connection, tell me the store name, plan, and how many active products there are."
If that returns real data, you're live. Two gotchas worth knowing: the .myshopify.com domain is required — vanity domains won't authenticate — and if /mcp shows the server as failed, the usual causes are a mistyped env var name or npx fetching the package for the first time behind a slow connection.
Scopes: start read-only
The single most important setup decision. Custom app scopes are additive — grant the minimum, expand later:
Phase 1 (first two weeks, read-only): read_products, read_orders, read_inventory, read_themes, read_content. Everything in the use-case list below except the bulk edits works read-only. You get audits, queries, reports — with zero risk of an AI-initiated write you didn't intend.
Phase 2 (once you trust the loop): add write_products for meta/SEO edits, write_inventory if you want stock adjustments. Add write scopes one at a time, as a workflow demands them.
Never grant write_orders, customer PII scopes, or anything payment-adjacent to an AI tooling app unless you have a specific, reviewed reason. And even with write scopes granted, adopt the habit: ask Claude to show the proposed changes as a table first, approve, then execute.
6 operator use cases with example prompts
The workflows we actually run for stores. All prompts assume the Admin connection is live.
1. Bulk product edits. The killer app. Renaming, retagging, price updates across dozens of products without CSV exports.
"Find every product tagged 'summer-24', retag them 'summer', and append '— Final Sale' to their titles. Show me the full change list as a table before writing anything."
2. Order queries in plain English. Faster than the admin's filter UI for anything non-trivial.
"Pull unfulfilled orders from the last 14 days over $100. Group by shipping country and flag any order older than 5 days as at-risk. Table, sorted by order value."
3. SEO meta audits. The highest-leverage read-only workflow — audit the entire catalog in one pass.
"Audit all active products: list every product where the meta description is missing, under 70 characters, or duplicated across products. Output as a table with handle, current meta, and a suggested rewrite under 155 characters."
This pairs with a full audit workflow — we've written up how to run Shopify SEO with Claude end to end, and there are GitHub repos that package these SEO workflows if you want a starting point.
4. Inventory checks.
"List every variant with inventory below 10 that sold at least 5 units in the last 30 days. These are my restock priorities — sort by 30-day velocity."
5. Theme file reads. Debug Liquid without opening the code editor.
"Read snippets/meta-tags.liquid from the live theme and tell me whether the og:image falls back correctly when a product has no featured image."
6. Analytics pulls. Roll-your-own reporting from orders data.
"Compute AOV, order count, and revenue by week for the last 8 weeks. Flag any week that deviated more than 20% from the 8-week average and hypothesize why based on discount code usage in those orders."
Each of these goes from prompt to result in under a minute once connected. Chain them and you have a weekly ops review that runs itself: inventory risks, SEO gaps, at-risk orders, revenue anomalies — one conversation. If you're weighing this against the desktop-app route, the Shopify connector in Claude covers the same jobs with a friendlier interface but less automation depth; Claude Code wins once you want scripts, scheduled runs, and git-tracked theme work.
Frequently Asked Questions
Can Claude Code connect directly to a Shopify store?
Yes, via MCP. Shopify's official Dev MCP server (@shopify/dev-mcp) provides docs and API schema access with no auth, and an Admin API MCP server connected with a custom app access token gives Claude Code live read/write access to products, orders, inventory, and theme files on your store.
What is the Shopify MCP server?
Shopify ships two first-party MCP surfaces: the Dev MCP server, which exposes Shopify documentation and Admin GraphQL schema tools for development work, and a Storefront MCP endpoint (/api/mcp on your store domain) built for customer-facing shopping agents. Live store administration from Claude Code runs through the Admin API using a custom app token.
Is it safe to give Claude Code access to my Shopify store?
Yes, if you scope it properly. Create a dedicated custom app, grant read-only scopes (read_products, read_orders, read_inventory) for the first weeks, keep the token in an environment variable rather than a config file, and add write scopes one at a time only when a workflow requires them. The token can be revoked instantly from the Shopify admin.
Do I need to know how to code to use Claude Code with Shopify?
No. After the one-time setup — creating the custom app and adding one config entry — every workflow is a plain-English prompt. The six use cases above (bulk edits, order queries, SEO audits, inventory checks, theme reads, analytics) are all prompts, not scripts.
What's the difference between Claude Code and the Claude Shopify connector?
The Shopify connector in the Claude desktop/web app is the no-setup route — good for ad-hoc questions and one-off tasks. Claude Code is the operator route: it adds scriptability, git-tracked theme work, scheduled runs, and chained multi-step workflows. Many teams use both — connector setup here.
Want these workflows built for you
Branva builds and runs exactly these AI-operated workflows for Shopify brands scaling from $0 to $50k MRR — the store connection, the weekly ops loops, the SEO audits, all of it maintained for you. If you'd rather have the system than the setup guide, book a working session. Free 30 min; we'll map which of the six workflows moves your store first.