shopify-python-mcp-server

A-baoYang/shopify-python-mcp-server

3.2

If you are the rightful owner of shopify-python-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This document provides a structured summary of the Shopify MCP Server implemented in Python, which facilitates interaction with Shopify APIs using the Model Context Protocol.

Tools
5
Resources
0
Prompts
0

Shopify MCP Server - Python Implementation

This is a Python implementation of the Shopify MCP Server using FastMCP. It provides the same functionality as the original TypeScript version, helping developers interact with Shopify APIs through the Model Context Protocol.

Inspired by shopify.dev mcp server

Features

  • Admin GraphQL API support with schema introspection and validation
  • Documentation search across shopify.dev
  • GraphQL code validation to prevent hallucinated fields
  • Conversation tracking for usage analytics
  • Schema caching for improved performance

Installation

# Clone the repository
git clone https://github.com/A-baoYang/shopify-python-mcp-server
cd shopify-mcp-server

# Install dependencies using uv
uv pip install -r requirements.txt

# Or install with pip
pip install -r requirements.txt

Usage

Running the server

# Using uv
uv run python main.py

# Or with Python directly
python main.py

Configuration for Claude Desktop or Cursor

Add the following to your MCP configuration:

{
  "mcpServers": {
    "shopify-mcp-server": {
      "command": "python",
      "args": ["/path/to/shopify-mcp-server/main.py"]
    }
  }
}

With uv:

{
  "mcpServers": {
    "shopify-mcp-server": {
      "command": "uv",
      "args": ["run", "python", "/path/to/shopify-mcp-server/main.py"]
    }
  }
}

Environment Variables

  • OPT_OUT_INSTRUMENTATION: Set to "true" to disable usage tracking
  • POLARIS_UNIFIED: Set to "true" or "1" to enable Polaris support
  • LIQUID_MCP: Set to "true" or "1" to enable Liquid support (experimental)
  • DEV: Set to "true" to use development Shopify URL

Available Tools

Tool NameDescription
learn_shopify_apiStart here first - Teaches about Shopify APIs and generates required conversationId
search_docs_chunksSearch across shopify.dev documentation
fetch_full_docsRetrieve complete documentation pages
introspect_graphql_schemaExplore GraphQL schemas to find types, queries, and mutations
validate_graphql_codeblocksValidate GraphQL code against schema

Available Prompts

Prompt NameDescription
shopify_admin_graphqlHelp write GraphQL operations for the Shopify Admin API

Development

The project structure:

shopify-mcp-server/
--- main.py              # Main server entry point
--- src/
|   --- settings.py      # Configuration settings
|   --- types.py         # Type definitions
|   --- tools/           # Tool implementations
|   --- validations/     # Validation logic
|   --- utils/           # Utility functions
--- data/                # Schema cache directory