mcp-shopify-admin 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.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/a1-x-tech/mcp-shopify-admin/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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01840 $0.01840
Sonnet 5 $0.00736 $0.00736
Haiku 4.5 $0.00368 $0.00368

Measured 5d ago against content hash 325e3f5a2d25, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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: orderCancelorderCancelUserErrors) 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/*.tsshop, products, orders, customers, inventory, discounts, raw; each exports one register*Tools(server, client). tools/util.tsok/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. 5d 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 6d ago), licensed MIT. It adds 3,680 tokens to every session, about $0.0184 per session on Opus 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

Other instructions, from other repositories

mcp-supermercados-cl CLAUDE.md

Instructions for NLACE-COM/mcp-supermercados-cl, covering claude.md — mcp-supermercados-cl, documentos fuente, estado (actualizar al avanzar), convenciones and comandos.

NLACE-COM/mcp-supermercados-cl · 6,113 tokens

vendure CLAUDE.md

Claude Code instructions for vendurehq/vendure, a project described as: Open-source headless commerce platform built with TypeScript, NestJS, React, and GraphQL.

vendurehq/vendure · 3 tokens

mcp-server-amazon CLAUDE.md

Instructions for rigwild/mcp-server-amazon, covering claude.md, development commands, install dependencies (use -d flag for puppeteer), build typescript to javascript and clean mock html files.

rigwild/mcp-server-amazon · 628 tokens

vendure AGENTS.md

AGENTS.md instructions for vendurehq/vendure, covering vendure, development workflow, testing, dashboard e2e tests and commits & branches.

vendurehq/vendure · 590 tokens

mcp-recipe-shopping-list AGENTS.md

AGENTS.md instructions for KrivchenkoEgor/mcp-recipe-shopping-list, covering ⛔ критические запреты (читать первым), 1. 🚫 картинки в чате запрещены, 2. 🚫 оба сайта — spa (javascript-heavy), 3. 🚫 не формируем корзину — только список покупок and 4. 🚫 уважение к серверам.

KrivchenkoEgor/mcp-recipe-shopping-list · 7,026 tokens

parcel-shipping-rates-mcp GEMINI.md

Gemini CLI instructions for smklog/parcel-shipping-rates-mcp: Five tools on one remote server, no credentials.

smklog/parcel-shipping-rates-mcp · 241 tokens