Shopify MCP Server

Shopify MCP servers enable AI models to interact with Shopify stores, providing capabilities for product, customer, and order management through the Shopify GraphQL Admin API.

GitHub starsnpm versionnpm downloads

Overview

The Shopify MCP Server allows AI models to interact with your Shopify store data. It provides a secure and standardized way for AI agents to manage products, customers, and orders using the Shopify GraphQL Admin API.

Created by:

Developed by GeLi2001

Key Features

🛍️

Product Management

Search, retrieve, and create product information

👤

Customer Management

Load customer data, manage tags, and retrieve customer orders

📦

Order Management

Advanced order querying, filtering, and updating

🔗

GraphQL Integration

Direct integration with Shopify's GraphQL Admin API

Available Tools

Quick Reference

ToolPurposeCategory
get-productsGet all products or search by titleProduct
get-product-by-idGet a specific product by IDProduct
createProductCreate new product in storeProduct
get-customersGet customers or search by name/emailCustomer
update-customerUpdate a customer's informationCustomer
get-customer-ordersGet orders for a specific customerCustomer
get-ordersGet orders with optional filteringOrder
get-order-by-idGet a specific order by IDOrder
update-orderUpdate an existing orderOrder

Detailed Usage

get-products

Get all products or search by title.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-products",
  arguments: {
    searchTitle: "T-Shirt",
    limit: 5
  }
});
get-product-by-id

Get a specific product by ID.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-product-by-id",
  arguments: {
    productId: "gid://shopify/Product/123456789"
  }
});
createProduct

Create new product in store.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "createProduct",
  arguments: {
    title: "New Awesome Product",
    descriptionHtml: "<p>This is a new product description.</p>",
    vendor: "My Brand",
    productType: "Apparel",
    tags: "new, awesome",
    status: "ACTIVE"
  }
});
get-customers

Get customers or search by name/email.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-customers",
  arguments: {
    searchQuery: "John Doe",
    limit: 10
  }
});
update-customer

Update a customer's information.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "update-customer",
  arguments: {
    id: "6276879810626",
    email: "[email protected]",
    tags: ["VIP", "Newsletter"]
  }
});
get-customer-orders

Get orders for a specific customer.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-customer-orders",
  arguments: {
    customerId: "6276879810626",
    limit: 5
  }
});
get-orders

Get orders with optional filtering.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-orders",
  arguments: {
    status: "ANY",
    limit: 10
  }
});
get-order-by-id

Get a specific order by ID.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-order-by-id",
  arguments: {
    orderId: "gid://shopify/Order/6090960994370"
  }
});
update-order

Update an existing order with new information.

use_mcp_tool({
  server_name: "shopify",
  tool_name: "update-order",
  arguments: {
    id: "gid://shopify/Order/6090960994370",
    tags: ["fulfilled", "priority"],
    note: "Customer requested expedited shipping."
  }
});

Installation

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": [
        "shopify-mcp",
        "--accessToken",
        "YOUR_SHOPIFY_ACCESS_TOKEN",
        "--domain",
        "YOUR_SHOP.myshopify.com"
      ],
      "env": {
        "SHOPIFY_ACCESS_TOKEN": "YOUR_SHOPIFY_ACCESS_TOKEN",
        "MYSHOPIFY_DOMAIN": "YOUR_SHOP.myshopify.com"
      }
    }
  }
}

Shopify Access Token:

You need to create a custom app in your Shopify store to get an Admin API access token. Ensure you grant the necessary read_products, write_products, read_customers, write_customers, read_orders, write_orders scopes.

Common Use Cases

1. Automate Product Listings

Create new products or update existing ones based on inventory changes or new arrivals.

// Create a new product
use_mcp_tool({
  server_name: "shopify",
  tool_name: "createProduct",
  arguments: {
    title: "Limited Edition Hoodie",
    descriptionHtml: "<p>A comfortable and stylish hoodie.</p>",
    vendor: "Fashion Co.",
    productType: "Apparel",
    tags: "hoodie, limited",
    status: "ACTIVE"
  }
});

2. Customer Relationship Management

Retrieve customer details, update their tags, or view their order history.

// Add a VIP tag to a customer
use_mcp_tool({
  server_name: "shopify",
  tool_name: "update-customer",
  arguments: {
    id: "6276879810626",
    tags: ["VIP"]
  }
});

3. Order Fulfillment and Tracking

Monitor new orders, update their status, or retrieve specific order details.

// Get all pending orders
use_mcp_tool({
  server_name: "shopify",
  tool_name: "get-orders",
  arguments: {
    status: "OPEN",
    limit: 20
  }
});

4. Inventory Management

Integrate with external systems to update product quantities or availability.

// (Example: This would typically involve a custom tool or a combination of existing tools)
// Update product quantity after a sale in an external system
// This would require a tool to update inventory, which is not directly available in the current MCP server.
// A custom tool could be built using the Shopify Admin API to achieve this.

Sources