shopify-storefront
MCP server from QuentinCody/shopify-storefront-mcp-server
claude mcp add --transport stdio quentincody-shopify-storefront-mcp-server python -m shopify_storefront_mcp_server \ --env SHOPIFY_BUYER_IP="Allowed buyer IP (optional)" \ --env SHOPIFY_STORE_NAME="Your-store-name (without .myshopify.com)" \ --env SHOPIFY_API_VERSION="2025-04 (optional; defaults to server implementation if omitted)" \ --env SHOPIFY_STOREFRONT_ACCESS_TOKEN="Your Storefront access token (from Shopify API credentials)"
How to use
This MCP server exposes Shopify Storefront capabilities to MCP-compatible AI assistants. The primary tools you can call are: shopify_discover, which detects whether a URL belongs to a Shopify storefront and helps retrieve authentication context; shopify_storefront_graphql, which executes GraphQL queries against the Shopify Storefront API; and customer_data, a unified interface for managing customer-related data stored locally and accessed alongside store data. Use shopify_discover to validate storefront endpoints before issuing GraphQL queries, then leverage shopify_storefront_graphql to fetch products, collections, inventory, or to perform checkout-related mutations. The customer_data tool consolidates create, read, update, and delete operations for customer profiles, addresses, and any custom fields you store, enabling personalized experiences without directly handling raw data in your prompts.
How to install
Prerequisites:
- Python 3.8+ installed on your system
- Access to install Python dependencies (pip)
Step-by-step installation:
-
Clone the repository: git clone https://github.com/your-org/quentincody-shopify-storefront-mcp-server.git cd quentincody-shopify-storefront-mcp-server
-
Create and activate a Python virtual environment (recommended): python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies: pip install -r requirements.txt
-
Copy the example environment file and populate credentials: cp .env.example .env
Edit .env and set:
SHOPIFY_STOREFRONT_ACCESS_TOKEN=your_storefront_token
SHOPIFY_STORE_NAME=your-store-name
(Optional) SHOPIFY_API_VERSION=2025-04
(Optional) SHOPIFY_BUYER_IP=127.0.0.1
-
Run the server: python -m shopify_storefront_mcp_server
Notes:
- Ensure the Storefront API token has the required scopes as described in the README.
- Keep your .env file secure and do not commit it to version control.
Additional notes
Tips and common issues:
- Ensure SHOPIFY_STORE_NAME is the short name (without .myshopify.com).
- Tokens typically start with shpsa_ or shpat_ depending on generation; verify token validity if you encounter authentication errors.
- If you modify environment variables, restart the server to apply changes.
- Customer data is persisted in user_data/customer.json and is not committed to version control. Use the customer_data tool to manage it.
- When integrating with MCP assistants, prefer using shopify_storefront_graphql for dynamic data (products, collections, cart mutations) and shopify_discover to verify storefront context before making requests.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP