MCP ExplorerExplorer

Shopify Admin Mcp

@QuentinCodyon a year ago
1 MIT
FreeCommunity
AI Systems
MCP server for accessing Shopify's GraphQL Admin API via AI agents.

Overview

What is Shopify Admin Mcp

shopify-admin-mcp is an MCP (Model Context Protocol) server that provides a standardized interface for accessing Shopify’s GraphQL Admin API, enabling AI agents to interact with Shopify’s functionalities.

Use cases

Use cases include listing products, creating new products, managing inventory, and automating various tasks within a Shopify store through AI agents.

How to use

To use shopify-admin-mcp, clone the repository, install dependencies, configure your Shopify Admin API credentials in the .env file, and set up your client configuration to connect to the MCP server.

Key features

Key features include standardized access to Shopify’s GraphQL Admin API, support for both public and custom app authentication, and the ability to execute various GraphQL queries and mutations.

Where to use

shopify-admin-mcp can be used in e-commerce applications, AI-driven tools for managing online stores, and any system that requires integration with Shopify’s admin functionalities.

Content

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

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers