Shopify Storefront MCP Server
This server provides access to the Shopify Storefront API via MCP, allowing AI assistants to query and interact with your Shopify store data.
Features
- Access to product, collection, and inventory data
- Cart creation and management
- Support for GraphQL queries and mutations
- Automatic token handling and validation
- Easy integration with MCP-compatible AI assistants
Setup Instructions
- Clone this repository
- Install dependencies:
pip install -r requirements.txt - Copy
.env.exampleto.envand configure your environment variables - Generate a Storefront API token via Shopify Admin (see below)
- Run the server:
python -m shopify_storefront_mcp_server
Environment Variables
Create a .env file using the provided .env.example as a template:
# Required
SHOPIFY_STOREFRONT_ACCESS_TOKEN=your_storefront_token
SHOPIFY_STORE_NAME=your-store-name
# Optional
SHOPIFY_API_VERSION=2025-04
SHOPIFY_BUYER_IP=127.0.0.1Generating a Storefront API Token
- Log in to your Shopify admin
- Go to Apps and sales channels > Develop apps > Create an app
- Name your app (e.g., "MCP Storefront")
- Go to API credentials > Configure Storefront API scopes
- Select necessary scopes:
unauthenticated_read_product_listingsunauthenticated_read_product_inventoryunauthenticated_read_product_pricingunauthenticated_write_checkoutsunauthenticated_read_content
- Save and copy the generated Storefront API access token
- Add the token to your
.envfile asSHOPIFY_STOREFRONT_ACCESS_TOKEN






