Shopify Mcp

io.github.miller-joe由 GitHub 帳號 miller-joe 發布v0.1.2更新於 Oct 24, 2026

MCP server for Shopify Admin API with a ComfyUI bridge for AI product image generation.

概覽

AI 產生的概覽

讓助理透過 Admin GraphQL API 管理 Shopify 商店,涵蓋商品、訂單、庫存,並可選擇透過 ComfyUI 產生 AI 商品圖片。

可以做什麼
把 Shopify Admin GraphQL API 包裝成工具,涵蓋商品、款式、集合、中繼欄位、中繼物件、草稿訂單、出貨、Webhook、客戶以及 ShopifyQL 分析。寫入類工具會建立、更新與刪除商店資料,出貨工具可將訂單標記為已出貨並通知客戶。設定 ComfyUI 位址後,橋接工具可產生商品圖片,並在一次呼叫中建立或更新帶圖商品。
適用情境
適合讓助理直接讀取或修改 Shopify 商店的情境,例如批次編輯商品、更新庫存、處理草稿訂單、出貨,或執行 ShopifyQL 報表。只有在你同時執行 ComfyUI 並希望自動附加生成圖片時,才需要啟用橋接工具。
執行需求
以 npm 套件形式在本機執行(Node 20+),支援 stdio 或 streamable HTTP。需要 SHOPIFY_STORE 與密鑰 SHOPIFY_ACCESS_TOKEN(shpat_ 開頭的 Admin API 權杖,需具備對應權限);SHOPIFY_API_VERSION 為選用。ComfyUI 橋接工具需要 COMFYUI_URL,可選 COMFYUI_PUBLIC_URL 與 COMFYUI_DEFAULT_CKPT。需要連線至 Shopify,橋接另需連線至 ComfyUI。
安裝前請注意
此 Admin API 權杖可寫入商店資料:工具會建立、更新與刪除商品、款式、集合、中繼欄位、中繼物件、草稿訂單與 Webhook,並可完成草稿訂單、建立會通知客戶的出貨。請妥善保管 SHOPIFY_ACCESS_TOKEN 並只授予必要權限。Webhook 工具會註冊外部回呼網址。橋接工具會把提示詞與圖片傳送到所設定的 ComfyUI 執行個體,Shopify 會從公開網址抓取產生的圖片。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Shopify Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

shopify-mcp

MCP server for Shopify. Full Admin GraphQL API tooling plus an AI-driven product creation bridge via ComfyUI image generation.

[shopify-mcp MCP server]

[GitHub Sponsors] [Ko-fi]

The pitch

Every other Shopify MCP is a plain Admin API wrapper. This one pairs with @miller-joe/comfyui-mcp so you can say things like:

"Create a product called 'Nebula Dreamer'. Generate a cosmic abstract image for it, description matching the vibe, tagged astrology, status draft."

Claude then runs ComfyUI, gets an image back, creates the Shopify product, and attaches the image, all in one call.

Install

bash
# npx, no installnpx @miller-joe/shopify-mcp \  --shopify-store your-store.myshopify.com \  --shopify-access-token shpat_xxx
# Dockerdocker run -p 9110:9110 \  -e SHOPIFY_STORE=your-store.myshopify.com \  -e SHOPIFY_ACCESS_TOKEN=shpat_xxx \  -e COMFYUI_URL=http://comfyui:8188 \  ghcr.io/miller-joe/shopify-mcp:latest

Connect an MCP client

bash
claude mcp add --transport http shopify http://localhost:9110/mcp

Or point your MCP gateway at the Streamable HTTP endpoint.

Configuration

CLI flagEnv varDefaultNotes
--shopify-storeSHOPIFY_STORE(required)my-store or my-store.myshopify.com
--shopify-access-tokenSHOPIFY_ACCESS_TOKEN(required)Admin API token (shpat_…)
--shopify-api-versionSHOPIFY_API_VERSION2026-04GraphQL Admin API version
--hostMCP_HOST0.0.0.0Bind host (HTTP mode only)
--portMCP_PORT9110Bind port (HTTP mode only)
--stdioMCP_TRANSPORT=stdio(unset)Speak MCP over stdio instead of HTTP. Use when launched as a subprocess by a stdio-first MCP client (Claude Desktop, mcp-inspector).
--comfyui-urlCOMFYUI_URL(optional)Enables bridge tools when set
--comfyui-public-urlCOMFYUI_PUBLIC_URLsame as --comfyui-urlExternal URL used for image references passed to Shopify
(no flag)COMFYUI_DEFAULT_CKPTsd_xl_base_1.0.safetensorsDefault checkpoint for bridge tools

Transports

The server speaks streamable HTTP by default (great for Claude Code, MetaMCP, raw fetch). Pass --stdio (or set MCP_TRANSPORT=stdio) to switch into stdio mode, which is what stdio-first clients like Claude Desktop and the MCP Inspector expect:

json
// claude_desktop_config.json{  "mcpServers": {    "shopify": {      "command": "npx",      "args": ["-y", "@miller-joe/shopify-mcp", "--stdio"],      "env": {        "SHOPIFY_STORE": "my-store.myshopify.com",        "SHOPIFY_ACCESS_TOKEN": "shpat_…"      }    }  }}

Getting a Shopify access token

Easy path, existing dev store: Shopify Admin → Apps → Develop apps → Create custom app → enable relevant Admin API scopes (write_products, read_orders, write_inventory, read_customers) → install → copy the admin API access token (starts with shpat_).

For new apps (post-Jan 2026): legacy custom-app tokens are deprecated for freshly-created apps. Use the Dev Dashboard token-exchange flow once to obtain a working token, then supply it here. Multi-tenant OAuth is on the roadmap.

Tools

Core Admin

ToolDescription
list_productsPaginated product search with Shopify query syntax
get_productFetch one product with variants, images, media
create_productCreate a product (default DRAFT); optionally attach images
update_productUpdate title, description, tags, status, etc.
upload_product_imageAttach a public image URL to an existing product
list_ordersList orders, newest first, with query filters
get_orderFetch one order with line items
set_inventory_quantitySet absolute on-hand inventory at a location
list_locationsList store locations (for inventory ops)
list_customersList customers with query filters

Metafields

ToolDescription
set_metafieldUpsert a metafield on any HasMetafields resource (product, variant, collection, customer, order, shop, etc.)
list_metafieldsList metafields for a resource, optionally filtered by namespace
delete_metafieldDelete a metafield by (ownerId, namespace, key)

Draft orders

ToolDescription
list_draft_ordersList draft orders with Shopify query filters
get_draft_orderFetch one draft order with its line items
create_draft_orderCreate a draft order. Line items can be variant refs or custom (title + price).
update_draft_orderUpdate customer, line items, tags, note, email
complete_draft_orderConvert a draft order to a real order. paymentPending skips capture.
delete_draft_orderDelete a non-completed draft order

Webhooks

ToolDescription
list_webhooksList webhook subscriptions; filter by topic(s)
get_webhookFetch a single subscription
create_webhookSubscribe an HTTPS callback URL to a topic (e.g. ORDERS_CREATE)
update_webhookChange callback URL, format, or field/metafield filters
delete_webhookDelete a subscription

Metaobjects

ToolDescription
list_metaobject_definitionsDiscover metaobject types (schemas) on the store, including field definitions
list_metaobjectsList metaobjects of a given type
get_metaobjectFetch one metaobject with all its fields
create_metaobjectCreate a metaobject (type must already exist as a definition). Supports ACTIVE/DRAFT status.
update_metaobjectUpsert fields, change handle, toggle publishable status
delete_metaobjectDelete a metaobject

Fulfillment

ToolDescription
list_fulfillment_ordersList an order's fulfillment orders (one per shipping location), with remaining quantities per line item
get_fulfillment_orderFetch a single fulfillment order
get_fulfillmentFetch a single fulfillment (shipment record) with tracking info
create_fulfillmentMark fulfillment orders (or specific quantities) as fulfilled. Optionally attach tracking and notify the customer.
update_fulfillment_trackingUpdate carrier/number/url on an existing fulfillment
cancel_fulfillmentCancel a fulfillment by ID

Partial fulfillment is supported. Pass specific fulfillmentOrderLineItems with quantity per line, or omit the array to fulfill everything on the fulfillment order.

Variants and product options

ToolDescription
list_variantsList all variants of a product with selected options, price, SKU, inventory
create_variantsBulk-create variants (up to 100) with option values, price, SKU, compareAtPrice, initial inventory
update_variantsBulk-update variant price, compareAtPrice, SKU, barcode, taxable, inventoryPolicy, option values
delete_variantsBulk-delete variants from a product
reorder_variantsSet 1-indexed positions for variants
add_product_optionsAdd options (Size / Color / etc.) with their possible values. Up to 3 options per product.

For an entirely new product, creating the first real variant requires strategy="REMOVE_STANDALONE_VARIANT" to replace the auto-generated "Default Title" variant.

Collections and tagging

ToolDescription
list_collectionsList collections with query filters
get_collectionFetch one collection with its products
create_collectionCreate a manual collection, optionally seeded with products
update_collectionUpdate title, description, or handle
delete_collectionDelete a collection
add_products_to_collectionAdd products to a manual collection (async job on Shopify's side)
remove_products_from_collectionRemove products from a manual collection
add_tagsAdd tags to any taggable resource (Product, Order, Customer, DraftOrder, Collection)
remove_tagsRemove tags from a taggable resource

Analytics (ShopifyQL)

ToolDescription
run_shopifyql_queryRun a ShopifyQL query and render the result as an ASCII table. Pass raw=true for the raw JSON payload.

Examples:

  • FROM sales SHOW total_sales BY day SINCE -30d TIMESERIES
  • FROM products SHOW product_title, quantity_sold BY product_id SINCE -7d ORDER BY quantity_sold DESC LIMIT 10

ComfyUI bridge (when COMFYUI_URL is configured)

ToolDescription
generate_and_create_productGenerate an image and create a product with it, in one call. Title and description derive from the prompt if not given.
generate_product_imageGenerate an image and attach it to an existing product.
refine_product_imageRun img2img on a product's featured image (or an explicit URL) and attach the refined result. Tune denoise (0–1) for how far the result drifts from the source.
bulk_regenerate_imagesFor all products matching a query, run the generator with a templated prompt and attach fresh images.

Template placeholders for bulk_regenerate_images: {title}, {handle}.

Example: the whole pitch in one call

Claude, use generate_and_create_product:  prompt: "minimalist sunset mountain silhouette, warm gradient, vector style"  title: "Mountain Sunset Poster"  status: DRAFT  tags: ["posters", "nature", "minimalist"]

ComfyUI generates the image, Shopify creates the product with the image attached, and you get the product ID and image URL back. One prompt, one call, real listing.

Architecture

┌────────────────┐     ┌──────────────────┐     ┌─────────────────┐│  MCP client    │────▶│  shopify-mcp     │────▶│  Shopify Admin  ││  (Claude etc.) │◀────│  (this server)   │◀────│  GraphQL API    │└────────────────┘     └────────┬─────────┘     └─────────────────┘                                │                                │ (bridge tools only)                                ▼                       ┌──────────────────┐                       │  ComfyUI         │                       │  (txt2img)       │                       └──────────────────┘

Bridge tools call ComfyUI directly over HTTP, get an image URL, and pass it to Shopify's productCreateMedia mutation. Shopify fetches and hosts the image on its CDN.

Development

bash
git clone https://github.com/miller-joe/shopify-mcpcd shopify-mcpnpm installnpm run dev   # hot reload via tsx watchnpm run buildnpm run typechecknpm test

Requires Node 20+.

Roadmap

Shipped:

  • Core products CRUD plus image attach
  • Orders read, Inventory set + locations, Customers read
  • ComfyUI bridge: generate_and_create_product, generate_product_image, bulk_regenerate_images
  • Metafields: set_metafield, list_metafields, delete_metafield
  • Draft orders: create / update / complete / delete / list / get
  • Collections and tagging: CRUD, product add/remove, add_tags / remove_tags
  • Variants and product options: bulk create / update / delete / reorder plus add_product_options
  • Fulfillment: list/get fulfillment orders, create fulfillment (partial supported), update tracking, cancel
  • Webhooks: list / get / create / update / delete
  • Metaobjects: definitions list plus metaobject CRUD
  • ShopifyQL analytics: run_shopifyql_query with ASCII-table rendering
  • Image refinement bridge: refine_product_image (ComfyUI img2img on product images)

Planned:

  • OAuth token-exchange flow for new-app auth.

License

MIT © Joe Miller

Support

If this saves you time, consider supporting development:

[GitHub Sponsors] [Ko-fi]

來源:README.md,提交 fa2c64c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分