@hydrogen-forge/mcp-shopify
v0.1.0
Published
Enhanced Shopify MCP server for Claude Code - executeGraphQL, product operations, inventory management
Maintainers
Readme
@hydrogen-forge/mcp-shopify
Enhanced Shopify MCP server for Claude Code. Execute GraphQL queries, manage products, and control inventory directly from your AI assistant.
Features
- executeGraphQL - Run any Shopify Admin API query or mutation
- Product Operations - Create, read, list, and delete products
- Inventory Management - Update quantities, adjust stock, view levels across locations
Installation
npm install @hydrogen-forge/mcp-shopifyConfiguration
Set the following environment variables:
SHOPIFY_SHOP_DOMAIN=your-store.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxx
SHOPIFY_API_VERSION=2024-10 # optional, defaults to 2024-10Getting an Access Token
- Go to your Shopify admin:
https://your-store.myshopify.com/admin - Navigate to Settings > Apps and sales channels > Develop apps
- Create a new app with Admin API access
- Select the scopes you need:
read_products,write_products- for product operationsread_inventory,write_inventory- for inventory operationsread_locations- for location queries
- Install the app and copy the Admin API access token
Claude Code Setup
Add to your .claude.json or MCP settings:
{
"mcpServers": {
"shopify": {
"command": "npx",
"args": ["@hydrogen-forge/mcp-shopify"],
"env": {
"SHOPIFY_SHOP_DOMAIN": "your-store.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "shpat_xxxxxxxxxxxxx"
}
}
}
}Available Tools
executeGraphQL
Execute any GraphQL query or mutation. Includes common pre-built queries.
Arguments:
- query: string - The GraphQL query/mutation
- variables: object - Variables for the operation
- commonQuery: string - Use a pre-built query (shopInfo, listProducts, getProduct, inventoryLevels, locations)createProduct
Create a new product with variants and images.
Arguments:
- title: string (required)
- descriptionHtml: string
- vendor: string
- productType: string
- tags: string[]
- status: 'ACTIVE' | 'DRAFT' | 'ARCHIVED'
- variants: { price, sku, options }[]
- images: { src, altText }[]updateProduct
Update an existing product.
Arguments:
- id: string (required) - Product GID
- title: string
- descriptionHtml: string
- vendor: string
- productType: string
- tags: string[]
- status: 'ACTIVE' | 'DRAFT' | 'ARCHIVED'getProduct
Get a single product by ID or handle.
Arguments:
- id: string - Product GID
- handle: string - Product handle/sluglistProducts
List products with filtering and sorting.
Arguments:
- first: number - Count (default: 10)
- query: string - Search filter
- sortKey: 'TITLE' | 'VENDOR' | 'CREATED_AT' | etc.
- reverse: booleandeleteProduct
Delete a product by ID.
Arguments:
- productId: string (required)updateInventory
Set absolute inventory quantity at a location.
Arguments:
- inventoryItemId: string (required)
- locationId: string (required)
- quantity: number (required)
- reason: 'correction' | 'cycle_count_available' | 'received' | 'other'adjustInventory
Adjust inventory by delta (add or remove).
Arguments:
- inventoryItemId: string (required)
- locationId: string (required)
- delta: number (required) - Positive to add, negative to remove
- reason: stringgetInventoryLevels
Get inventory levels for an item across all locations.
Arguments:
- inventoryItemId: string (required)listLocations
List all inventory locations for the shop.
Arguments: nonegetProductInventory
Get inventory details for all variants of a product.
Arguments:
- productId: string (required)Example Usage
Once configured, you can ask Claude:
- "List all products in my Shopify store"
- "Create a new product called 'Summer T-Shirt' with price $29.99"
- "What's the inventory level for product gid://shopify/Product/123?"
- "Add 50 units of inventory for SKU 'SHIRT-001' at my main warehouse"
- "Run a custom GraphQL query to get my shop info"
Development
# Install dependencies
npm install
# Build
npm run build
# Run in development mode
npm run dev
# Start the server
npm startLicense
MIT
