MCPInstall
shopify-admin-mcp logo

shopify-admin-mcp

by QuentinCody 2 stars QuentinCody/shopify-admin-mcp

MCP server for accessing Shopify's GraphQL Admin API via AI agents.

READMEmain

Shopify Admin API MCP Server

This MCP (Model Context Protocol) server provides access to Shopify's GraphQL Admin API through a standardized interface that AI agents can interact with.

Setup Instructions

  1. Clone this repository
  2. Install the dependencies:
pip install -r requirements.txt
  1. Copy the .env.example file to .env and fill in your credentials:
cp .env.example .env
  1. Edit the .env file with your Shopify Admin API credentials.

Authentication

The Shopify GraphQL Admin API requires authentication via an access token. There are two main ways to obtain this token:

For Public and Custom Apps (OAuth)

  1. Create a Shopify app in the Shopify Partner Dashboard
  2. Set up OAuth by registering a redirect URL
  3. Request the necessary API scopes during the OAuth process
  4. After a successful OAuth flow, you'll receive an access token
  5. Store this token in your .env file

For Custom Apps (Admin)

  1. Go to your Shopify admin panel
  2. Navigate to Apps > Develop apps
  3. Create a custom app
  4. Add the required Admin API access scopes
  5. Generate an access token
  6. Store this token in your .env file

Configuration for Client

To use this MCP server with your AI agent, add the following configuration to your client config JSON file:

{
  "mcp": {
    "servers": {
      "shopify": {
        "command": ["python", "path/to/shopify_mcp_server.py"],
        "tools": ["shopify_execute_graphql"]
      }
    }
  }
}

Usage Examples

Here are some example GraphQL queries you can run using the shopify_execute_graphql tool:

List Products

query {
  products(first: 5) {
    edges {
      node {
        id
        title
        description
      }
    }
  }
}

Create Product

mutation {
  productCreate(input: {
    title: "New Product",
    productType: "Accessories",
    vendor: "My Store"
  }) {
    product {
      id
      title
    }
    userErrors {
      field
      message
    }
  }
}

Rate Limiting Considerations

Shopify's GraphQL API uses a calculated cost system for rate limiting. Each query has a cost based on the complexity and number of fields requested. Your API request will return the cost information, which you should monitor to avoid hitting rate limits.

More Information

More E-commerce Solutions MCP servers

Similar servers from the same category.

Alipay's official MCP Server, allowing you to easily integrate transaction creation, query, refund, and other capabilities offered by the Alipay Open Platform into your LLM applications.

FormQuery+5

Bridges WordPress websites and WooCommerce data with local clients through REST API calls, enabling content access without direct streaming connections.

ConnectDirect

Dodo Payments

dodopayments

Provides a bridge to the Dodo Payments API for processing payments, managing subscriptions, and handling licensing through over 40 specialized tools for customer and product management.

payment

Integrates with Adfin's financial management platform to enable credit control checks, invoice creation, and document uploads through dynamically generated API tools and specialized file system capabilities.

filesystempayment