shopify-mcp AGENTS.md

A set of instructions for developing a TypeScript MCP server that connects AI agents to Shopify's Admin API, the interface for managing a Shopify store.

In plain words
What is it for?
It helps with installing, building, testing, running, authenticating, and adding tools to this Shopify MCP server.
Why use it?
It gives developers the project layout, commands, conventions, authentication setup, and tool-registration rules needed to change the server consistently.

Instructions file for CodexOpenCode

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/untitled-developers/shopify-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/untitled-developers/shopify-mcp

Made for: Codex, OpenCode.

Per session 784 This file is loaded in full into every session.
When invoked 784 The same file — it is already loaded in full.
Security scan A 0 findings. 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 $0.00784 $0.00784
Opus 5 $0.00392 $0.00392
Sonnet 5 $0.00157 $0.00157
Haiku 4.5 $0.00078 $0.00078

Measured 2d ago against content hash c73b3c28a4ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

shopify-mcp AGENTS.md scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 45 lines

How it starts

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

Agent Instructions

This is a TypeScript CommonJS MCP server for the Shopify Admin API. Keep changes small, typed, and consistent with the existing tool-registration pattern.

Commands

  • npm install installs dependencies; this repo uses npm and has a committed package-lock.json.
  • npm run build compiles src/ to dist/ with tsc.
  • npm test runs the Vitest suite once.
  • npm run dev starts the MCP server from src/index.ts through ts-node.
  • npm run get-token runs the OAuth helper after a build, using dist/get-token.js.

Project Map

  • README.md has setup, MCP client configuration, environment variables, and the public tool list. Link to it instead of duplicating setup docs.
  • src/index.ts is the stdio MCP entry point and registers every tool group.
  • src/shopify-client.ts is the shared Shopify Admin GraphQL client. Prefer extending it over creating ad hoc fetch logic.
  • src/config.ts loads .env from the MCP host working directory first, then from the package directory. SHOPIFY_API_VERSION defaults to 2026-01.
  • src/auth.ts currently requires SHOPIFY_ACCESS_TOKEN; Partner Dashboard OAuth token acquisition lives in src/get-token.ts.
  • src/tools/ contains one module per tool group, each exporting registerXxxTools(server, client).
  • tests/ contains Vitest tests for config, auth, the Shopify client, and tool registration.

Coding Conventions

  • Use strict TypeScript and keep .js extensions in relative imports, even when importing .ts source files.
  • Tool names are global MCP names in snake_case; check tests/tools.test.ts to avoid collisions.
  • Define tool parameters with Zod schemas and useful .describe() text for MCP clients.
  • Use Admin GraphQL for Shopify API operations. Do not add non-GraphQL Shopify API calls unless Shopify has no GraphQL equivalent and the limitation is documented.
  • Return MCP tool results as { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] } unless the existing tool group uses a clearer plain-text success message.
  • Treat numeric Shopify IDs as strings at tool boundaries. When GraphQL needs GIDs, follow existing tools that accept either a GID or numeric ID and normalize internally.
  • Keep stdout reserved for MCP JSON-RPC. Send diagnostics to stderr with the existing [shopify-mcp] style.

Read the full file on GitHub · 45 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. 2d ago First seen · 45 lines · 784 tokens per session scan A c73b3c28a4ed

Subscribe to this mod's changes

shopify-mcp AGENTS.md is an instructions file published in the GitHub repository untitled-developers/shopify-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 784 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.