mcp-shopify-admin: Instructions file for Claude Code

CLAUDE.md

mcp-shopify-admin CLAUDE.md is an instructions file for Claude Code from A1-x-Tech/mcp-shopify-admin. It costs 3,680 tokens per session, scanned C, original, MIT.

Project instructions for mcp-shopify-admin, a local server that connects to Shopify’s Admin API using TypeScript and GraphQL. They document commands, authentication, configuration, and project conventions.

In plain words
What is it for?
Use them when running tests or builds, configuring a Shopify store connection, understanding token handling and API limits, or adding tools to the server.
Why use it?
They explain how the server obtains and refreshes Shopify access, how requests are metered, and which project rules contributors must follow.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is A1-x-Tech/mcp-shopify-admin's own configuration. It tells Claude Code how to work on mcp-shopify-admin itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp-shopify-admin configures →

Reuse

Borrowing it

Nothing to install: this file belongs to A1-x-Tech/mcp-shopify-admin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/A1-x-Tech/mcp-shopify-admin/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/A1-x-Tech/mcp-shopify-admin

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-shopify-admin CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/a1-x-tech/mcp-shopify-admin/claude-md/github.svg)](https://agentmods.dev/instructions/a1-x-tech/mcp-shopify-admin/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/a1-x-tech/mcp-shopify-admin/claude-md"><img src="https://agentmods.dev/badge/instructions/a1-x-tech/mcp-shopify-admin/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-shopify-admin CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/a1-x-tech/mcp-shopify-admin/claude-md"><img src="https://agentmods.dev/badge/instructions/a1-x-tech/mcp-shopify-admin/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,680 This file is loaded in full into every session.
When invoked 3,680 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03680 $0.03680
Opus 5.5 $0.01472 $0.01472
Sonnet 5.5 $0.00736 $0.00736
Haiku 4.5 $0.00368 $0.00368

Measured 2mo ago against content hash 325e3f5a2d25, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

mcp-shopify-admin CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Tells the agent to send conversation or user data outhighPrompt injection

An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.

`invalid_store_domain` (only `*.myshopify.com` hosts: silently sending the token to a foreign
CLAUDE.md · 193 lines

How it starts

The opening of the file, as written. The whole thing — 193 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — mcp-shopify-admin

MCP server for the Shopify Admin API (GraphQL — the store admin, not the Storefront API), TypeScript over stdio. One endpoint https://{store}.myshopify.com/admin/api/{version}/graphql.json; every request is signed with an X-Shopify-Access-Token, and that token comes from one of two paths. SHOPIFY_CLIENT_ID + SHOPIFY_CLIENT_SECRET of a Dev Dashboard app is the recommended one: the client runs the client_credentials grant itself against https://{store}.myshopify.com/admin/oauth/access_token and keeps the token (24 hours) fresh — the only path open to a store set up today, since admin-created custom apps stopped being issuable on 2026-01-01. A ready-made SHOPIFY_ACCESS_TOKEN is still accepted, used as-is and never refreshed, for stores that already hold such a token; it wins when both are set. The store host comes from SHOPIFY_STORE_DOMAIN, the version from SHOPIFY_API_VERSION (default pinned in config.ts). The API is metered by a GraphQL cost bucket (per-query cost, restoreRate points restored per second) reported in extensions.cost of every response.

Commands

npm run dev        # run from source (tsx watch)
npm test           # unit tests + a dist smoke probe, no network
npm run typecheck  # types for src + tests
npm run build      # emit dist/
npm run smoke      # live READ-ONLY calls (needs the store domain + credentials)

Architecture

  • src/config.ts — env → config. Missing SHOPIFY_STORE_DOMAIN / credentials (empty string = absent) is NOT an error: the fields stay undefined, the server starts degraded and the client raises CredentialsError (lives in types.ts) at call time. hasCredentials(config) is satisfied by either auth path — a ready-made SHOPIFY_ACCESS_TOKEN or the SHOPIFY_CLIENT_ID + SHOPIFY_CLIENT_SECRET pair the client can mint one with — and authMode(config) names which one is in play (token / client_credentials / none) for the startup line and telemetry, since the two behave differently when a token goes stale. ConfigError (with a reason code) is reserved for malformed values — invalid_store_domain (only *.myshopify.com hosts: silently sending the token to a foreign host is how tokens leak; a bare handle or pasted URL normalizes cleanly), invalid_api_version and invalid_api_base (must parse as an http/https URL) — and is caught by loadConfigOrDegraded in index.ts, which keeps the message as configProblem on the degraded config. describeTarget(config) is the only shape of the target that may be printed: the store domain, else the endpoint reduced to origin + path, so nothing a URL may carry (a user:password@, a token in the path) reaches stderr. Optional SHOPIFY_API_VERSION, SHOPIFY_TIMEOUT_MS, SHOPIFY_MAX_RETRIES, SHOPIFY_TOKEN_LEEWAY_SECONDS (how early a minted token is replaced, default 300), SHOPIFY_API_BASE (full endpoint override; also satisfies hasCredentials without a domain, for mocks).
  • src/types.ts — config, CostInfo (flattened extensions.cost), ApiResponse<T> = {data, cost}, ConnectionPage<T> ({count, items, hasNextPage, endCursor}), the enum tuples (PRODUCT_STATUSES, ORDER_CANCEL_REASONS, INVENTORY_REASONS, GID_TYPES) the tools build zod enums from, ShopifyAdminError, MutationError, ValidationError, CredentialsError.
  • src/client.ts — the GraphQL documents (compact selections: the consumer is an LLM) and one transport. The --- Auth --- section owns the token: authToken() returns a ready-made SHOPIFY_ACCESS_TOKEN untouched, otherwise the cached minted one while it is still more than the leeway away from expiry, otherwise the in-flight mint — the promise is stored, so a burst of parallel tool calls shares one exchange and a failed mint is never cached. fetchToken() posts the client_credentials grant to /admin/oauth/access_token (derived from the endpoint's origin, which keeps a mock self-consistent) and caches {value, expiresAt} in memory only, never on disk; it never retries, because its characteristic failure — shop_not_permitted, the app and the store sitting in different Shopify organizations — is not transient (tools/util.ts turns it into exactly that hint). forgetToken() drops the cache so the next attempt mints afresh; send() fetches the token per attempt, since a long retry ladder can outlive one. send() first rejects a missing credential with CredentialsError (before retries and fetch — the message is the product: it names the variables and the needed restart, or, when configProblem is set, the malformed variable instead of the credentials), then POSTs with an AbortController timeout that also covers reading the body, retries with backoff, lifts extensions.cost into the envelope and turns GraphQL errors — and a 200 that carries no data object — into ShopifyAdminError. request() also forwards an optional operationName. mutate() additionally turns a non-empty userErrors into MutationError (with errorsKey for renames: orderCancel → orderCancelUserErrors) and drops the empty field from clean results. Also holds the pre-flight validators: toGid (builds gids, refuses cross-type ones), isMutationDocument (retry safety for graphql_request, over firstOperationKind — a walk that skips comments, strings and (…) to find the first executable operation past any fragment definitions; unparseable counts as a mutation), throttleWaitSeconds (bucket math), normalizePageSize (clamp into 1..250).
  • src/tools/*.ts — shop, products, orders, customers, inventory, discounts, raw; each exports one register*Tools(server, client). tools/util.ts — ok/fail, the annotation presets and the shared zod schema factories. tools/harness.ts — the fake server/client pair the tool tests share (excluded from the build in tsconfig.json).
  • src/index.ts — wires every register* into the McpServer. loadConfigOrDegraded() catches ConfigError, pings startup_failed (fire-and-forget) and degrades the config to "no credentials" with no endpoint at all; an unconfigured start prepends UNCONFIGURED_PREFIX — plus Проблема конфигурации: <message> when a ConfigError was caught — to the initialize instructions, and oninitialized sends server_start for a configured install or unconfigured_start (with the reason) otherwise.
  • src/telemetry.ts — anonymous usage pings (ids/names/versions only, never data or arguments; fire-and-forget, must never block or throw; opt-out ASKADS_TELEMETRY=0). Reasons are a closed vocabulary (missing_store_domain, missing_credentials, invalid_store_domain, invalid_api_version, invalid_api_base) — never a variable's name or value.

Read the full file on GitHub · 193 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 193 lines · 3,680 tokens per session scan C 325e3f5a2d25

Subscribe to this mod's changes

mcp-shopify-admin CLAUDE.md is an instructions file published in the GitHub repository A1-x-Tech/mcp-shopify-admin (0 stars, last pushed 16d ago), licensed MIT. It adds 3,680 tokens to every session, about $0.0147 per session on Opus 5.5. A static security scan graded it C with 1 finding (tells the agent to send conversation or user data out). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

mcp-shopify-admin CLAUDE.md compared with instructions from other repositories

mcp-shopify-admin CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp-shopify-admin CLAUDE.mdA1-x-Tech/mcp-shopify-adminInstructions file016d agoMITC3,680Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file283ktodayMITA4,342Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot