Shopify Docs
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 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.
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.
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 indexes9}1011function routeQuery(query: string): LibraryIndex {12 const scores = Object.entries(LIBRARY_MAP).map(([key, lib]) => ({13 lib,14 score: calculateKeywordScore(query, key) * lib.weight,15 }))1617 return scores.sort((a, b) => b.score - a.score)[0]?.lib18 ?? LIBRARY_MAP['developer-docs'] // fallback19}20
Interested in similar work?
Let's discuss how I can help bring your Shopify project to life.