
Shopify-Storefront-MCP-Server
3 years
Works with Finder
0
Github Watches
0
Github Forks
0
Github Stars
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.example
to.env
and configure your environment variables - Generate a Storefront API token via Shopify Admin (see below)
- Run the server:
python shopify_storefront_mcp_server.py
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.1
Generating 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_listings
-
unauthenticated_read_product_inventory
-
unauthenticated_read_product_pricing
-
unauthenticated_write_checkouts
-
unauthenticated_read_content
-
- Save and copy the generated Storefront API access token
- Add the token to your
.env
file asSHOPIFY_STOREFRONT_ACCESS_TOKEN
Usage Examples
Running with the MCP server:
python shopify_storefront_mcp_server.py
The server exposes the following MCP tools:
-
storefront_execute_graphql
: Execute GraphQL queries against the Storefront API -
get_storefront_token_status
: Check the status of your configured tokens
Troubleshooting
If you encounter authentication errors:
- Verify token format: Storefront API tokens should start with
shpsa_
(newer) orshpat_
(older) - Check store name: Ensure SHOPIFY_STORE_NAME is correct (without .myshopify.com)
- Check API version: Make sure the API version is supported
- Test token: Use cURL to test your token directly:
curl -X POST \ https://your-store.myshopify.com/api/2025-04/graphql.json \ -H "Content-Type: application/json" \ -H "X-Shopify-Storefront-Access-Token: your_token" \ -d '{"query": "query { shop { name } }"}'
- Regenerate token: If issues persist, create a new token with proper scopes
Security Considerations
- Never commit your
.env
file or any files containing API tokens - Use environment variables for all sensitive information
- Consider setting up IP restrictions in your Shopify Admin
- Review the permissions granted to your Storefront API token
相关推荐
🔥 1Panel fournit une interface Web intuitive et un serveur MCP pour gérer des sites Web, des fichiers, des conteneurs, des bases de données et des LLM sur un serveur Linux.
🧑🚀 全世界最好的 LLM 资料总结 (数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Résumé des meilleures ressources LLM du monde.
⛓️RULEGO est un cadre de moteur de règle d'orchestration des composants de nouvelle génération légère, intégrée, intégrée et de nouvelle génération pour GO.
PDF Traduction de papier scientifique avec formats conservés - 基于 AI 完整保留排版的 PDF 文档全文双语翻译 , 支持 Google / Deepl / Olllama / Openai 等服务 , 提供 CLI / GUI / MCP / DOCKER / ZOTERO
Créez facilement des outils et des agents LLM à l'aide de fonctions Plain Bash / JavaScript / Python.
😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信 (企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Dify 、 Claude 、 GEMINI 、 XAI 、 PPIO 、 OLLAMA 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 ChatGlm 、 Sillytraven 、 MCP 等 LLM 的机器人 / Agent | Plateforme de bots de messagerie instantanée basés sur LLM, prend en charge Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack
Reviews

user_FzXIHvRC
As a dedicated user of the shopify-storefront-mcp-server by QuentinCody, I can confidently say this tool is essential for any e-commerce enthusiast. It seamlessly integrates with Shopify, enhancing the storefront capabilities and ensuring smooth server management. A must-have for efficient store operations!