Back to Work
Developer Tooling2026

Shopify Docs

MCPClaude CodeCLIShopify DocumentationDeveloper Tooling

Zero-dependency CLI and MCP server that reduces Shopify documentation lookups from 30,000-50,000+ tokens to ~1,500-3,000 tokens — a 10-20x reduction in context consumption for AI-assisted development.

The Challenge

The official Shopify MCP server dumps 30,000-50,000+ tokens of system prompts and schema per documentation lookup. For AI-assisted development with Claude Code, this wastes context window on irrelevant content, increasing cost and reducing the quality of responses by drowning relevant code context in documentation noise.

The Solution

3 files. 537 lines. Zero npm dependencies. Routes natural-language queries to the right Shopify docs source via 14 pre-mapped library indexes and returns approximately 1,500-3,000 tokens of relevant snippets. Smart keyword-length scoring, pre-resolved library IDs eliminating network round-trips, and graceful fallback to the general Shopify Developer Docs index. Works as a CLI, an MCP server (raw JSON-RPC 2.0 over JSONL stdio), or a Claude Code slash command.

Design
Code
Result
src/router.tstypescript
  1const LIBRARY_MAP: Record<string, LibraryIndex> = {  2  'admin-api':      { id: '/shopify/shopify-api-js',        weight: 3 },  3  'storefront-api': { id: '/shopify/hydrogen',              weight: 3 },  4  'polaris':        { id: '/shopify/polaris',                weight: 2 },  5  'theme':          { id: '/shopify/dawn',                   weight: 2 },  6  'checkout-ui':    { id: '/shopify/ui-extensions',          weight: 3 },  7  'functions':      { id: '/shopify/shopify-functions',      weight: 2 },  8  // ... 8 more pre-mapped indexes  9} 10 11function routeQuery(query: string): LibraryIndex { 12  const scores = Object.entries(LIBRARY_MAP).map(([key, lib]) => ({ 13    lib, 14    score: calculateKeywordScore(query, key) * lib.weight, 15  })) 16 17  return scores.sort((a, b) => b.score - a.score)[0]?.lib 18    ?? LIBRARY_MAP['developer-docs'] // fallback 19} 20
Scroll to explore
Tech Stack
Node.js 18+ESMJSON-RPC 2.0Context7 API

Interested in similar work?

Let's discuss how I can help bring your Shopify project to life.