BS

benwmerritt/shopify-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

6 stars 6 forks 品質 83 トレンド 28MIT

MCP server for Shopify with full OAuth flow, 30+ tools for products, collections, inventory, draft orders, metafields, and bulk operations.

概要

A Model Context Protocol (MCP) server that connects agents to the Shopify Admin GraphQL API. Use it to browse, edit, and clean up store data via a curated set of tools. This project started from Ge Li's shopify-mcp. The unscoped shopify-mcp package on npm is theirs and does not include the changes in this repository. - CRUD for products, collections, orders, and customers - Draft orders for quotes, manual orders, and B2B pricing - Inventory and location lookups for stock workflows - Metafields for custom data - Metaobject entry creation and lookup for existing definitions - URL redirects management - OAuth login flow with local token caching - Bulk product cleanup utilities - Fail-closed read-only mode for audit and QA agents - Node.js 20+ - A Shopify custom app (OAuth or Admin API token) Use this when you want to run the MCP server from this local checkout instead of a remote deployment. Set at least: - MYSHOPIFY_DOMAIN=your-store.myshopify.com - Either: - SHOPIFY_CLIENT_ID=...

README

以下は原文 README の抜粋です。原文を見る。

███████╗██╗  ██╗ ██████╗ ██████╗ ██╗███████╗██╗   ██╗    ███╗   ███╗ ██████╗██████╗ 
██╔════╝██║  ██║██╔═══██╗██╔══██╗██║██╔════╝╚██╗ ██╔╝    ████╗ ████║██╔════╝██╔══██╗
███████╗███████║██║   ██║██████╔╝██║█████╗   ╚████╔╝     ██╔████╔██║██║     ██████╔╝
╚════██║██╔══██║██║   ██║██╔═══╝ ██║██╔══╝    ╚██╔╝      ██║╚██╔╝██║██║     ██╔═══╝ 
███████║██║  ██║╚██████╔╝██║     ██║██║        ██║       ██║ ╚═╝ ██║╚██████╗██║     
╚══════╝╚═╝  ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚═╝        ╚═╝       ╚═╝     ╚═╝ ╚═════╝╚═╝     

Shopify MCP

A Model Context Protocol (MCP) server that connects agents to the Shopify Admin GraphQL API. Use it to browse, edit, and clean up store data via a curated set of tools.

npm: @benwmerritt/shopify-mcp
binary: shopify-mcp

This project started from Ge Li’s shopify-mcp. The unscoped shopify-mcp package on npm is theirs and does not include the changes in this repository.

Highlights

  • CRUD for products, collections, orders, and customers
  • Draft orders for quotes, manual orders, and B2B pricing
  • Inventory and location lookups for stock workflows
  • Metafields for custom data
  • Metaobject entry creation and lookup for existing definitions
  • URL redirects management
  • OAuth login flow with local token caching
  • Bulk product cleanup utilities
  • Fail-closed read-only mode for audit and QA agents

Prerequisites

  • Node.js 20+
  • A Shopify custom app (OAuth or Admin API token)

Local setup (this repo)

Use this when you want to run the MCP server from this local checkout instead of a remote deployment.

  1. Install dependencies and build:
npm install
npm run build
  1. Create local env config:
cp .env.example .env

Set at least:

  • MYSHOPIFY_DOMAIN=your-store.myshopify.com
  • Either:
    • SHOPIFY_CLIENT_ID=... and SHOPIFY_CLIENT_SECRET=... for a Dev Dashboard app owned by the store’s organization; or
    • SHOPIFY_ACCESS_TOKEN=shpat_xxx for a static/manual token
  • REMOTE_MCP=false
  1. Start local MCP (stdio):
npm run start:local

start:local uses stdio mode. Remote mode is only enabled with --remote or REMOTE_MCP=true.

Read-only mode

Start a capability-restricted server for QA, audit, and reporting agents:

shopify-mcp --read-only --domain=.myshopify.com
# or
SHOPIFY_MCP_READ_ONLY=true npm run start:local

Read-only mode exposes only a reviewed allowlist of lookup and reporting tools. All mutating, mixed read/write, file-upload, and unknown future tools are hidden. The allowlist is fail-closed, so a newly added tool does not appear in a read-only instance until it is explicitly reviewed. get-status reports the effective access mode, whether the boundary is enforced, and whether write tools are exposed.

Use a least-privilege Shopify token as well when one is available. The server boundary is designed to remain useful when a deployment must temporarily share

GitHub で README 全文を見る

インストール

npx @benwmerritt/shopify-mcp --accessToken <YOUR_ACCESS_TOKEN> --domain <YOUR_SHOP>.myshopify.com
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "shopify-local": { "command": "node", "args": [ "/absolute/path/to/shopify-mcp/dist/index.js", "--domain", "your-store.myshopify.com" ], "env": { "SHOPIFY_ACCESS_TOKEN": "shpat_xxx", "REMOTE_MCP": "false" } } } }