How pashpashpash/shopify-mcp-server works
Project type and purpose
• This is a TypeScript-based Node.js “MCP Server” that implements the Model Context Protocol (MCP) to expose Shopify Admin GraphQL functionality as a set of command-style tools.
• It’s consumed by an external client (e.g., Claude Desktop) over a stdio-based RPC channel, and in turn calls Shopify’s GraphQL Admin API.
File structure
• Top level:
• package.json / tsconfig.json / jest.config.js – build, test, and dependency metadata
• src/index.ts – entry point, sets up the MCP server
• src/ShopifyClient/ShopifyClient.ts – concrete implementation of the “port” to Shopify
• src/ShopifyClient/ShopifyClientPort.ts – interface/port definition to decouple the MCP server from Shopify calls
• src/__tests__ – Jest tests to validate the ShopifyClient behavior
• Build artifacts (dist/) are produced by npm run build.
• Config: environment variables for SHOPIFY_ACCESS_TOKEN and MYSHOPIFY_DOMAIN.
Key README insights
• The server supports a dozen “tools” (get-products, get-orders, create-discount, etc.)
• Uses @modelcontextprotocol/sdk to handle MCP messages
• Uses graphql-request to call Shopify, and zod for runtime validation.