WooCommerce MCP Server

io.github.AmitGurbani由 GitHub 帳號 AmitGurbani 發布v1.2.0更新於 Oct 24, 2026

101 tools for WooCommerce store management with field filtering and guided prompts.

已驗證STDIO僅桌面資料與分析商業與電商

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 助理提供 101 個工具,用來讀取與管理線上 WooCommerce 商店的商品、訂單、客戶、優惠券、運送、稅務等。

可以做什麼
列出、取得、建立、更新與刪除商品、分類、標籤、品牌、屬性、屬性項目與變體,支援批次更新與變體商品引導流程。管理訂單、退款、訂單備註、客戶、優惠券與商品評論。設定運送區域、區域運送方式、運送類別、稅率與稅別。讀取與更新付款閘道、商店設定與系統狀態,並執行系統維護工具。建立與管理 Webhook,列出或刪除媒體,包括清理孤立媒體。取得銷售報表、熱銷商品以及訂單、商品與客戶統計,並可用 fields 參數精簡回傳內容。
適用情境
當你希望助理直接檢視或操作 WooCommerce 商店時使用,例如檢查庫存、建立優惠券、審閱訂單或產生銷售摘要。適合已擁有 REST API 存取權限、且能先在測試環境驗證的店主與開發者。
執行需求
透過 npx(Node.js)或 Docker 在本機執行,預設使用 stdio。需要 WORDPRESS_SITE_URL、WOOCOMMERCE_CONSUMER_KEY 與 WOOCOMMERCE_CONSUMER_SECRET;媒體工具另需 WORDPRESS_USERNAME 與 WORDPRESS_APP_PASSWORD。選用的 HTTP 模式需要 MCP_AUTH_TOKEN 或 Auth0 設定。需要能連線至商店的網路。
安裝前請注意
它連接的是線上商店,建立、更新與刪除操作會改動真實資料。部分刪除是永久且無法復原的,包括媒體、稅率、稅別、屬性、退款與系統工具執行;刪除屬性或運送區域會連帶影響商品與運送方式。批次工具可在一次呼叫中建立、更新與刪除。消費者金鑰與密鑰可存取商店,應盡量只授予唯讀權限,探索時設定 WOOCOMMERCE_MCP_READ_ONLY=true。使用前請備份,並先在測試環境驗證。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

mcp-server-woocommerce

[CI] [npm] [License: MIT] [Node]

MCP server for managing WooCommerce stores through AI assistants like Claude. Provides 101 tools covering products, orders, customers, coupons, shipping, taxes, webhooks, settings, reports, and more.

Quick Start

1. Get WooCommerce API keys

In your WordPress admin: WooCommerce > Settings > Advanced > REST API > Add key with Read/Write permissions.

2. Add to your AI tool

No install needed — runs directly via npx:

Claude Code

Add to your project's .mcp.json:

json
{  "mcpServers": {    "woocommerce": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "env": {        "WORDPRESS_SITE_URL": "https://store.example.com",        "WOOCOMMERCE_CONSUMER_KEY": "ck_your_key",        "WOOCOMMERCE_CONSUMER_SECRET": "cs_your_secret"      }    }  }}
Claude Desktop

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{  "mcpServers": {    "woocommerce": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "env": {        "WORDPRESS_SITE_URL": "https://store.example.com",        "WOOCOMMERCE_CONSUMER_KEY": "ck_your_key",        "WOOCOMMERCE_CONSUMER_SECRET": "cs_your_secret"      }    }  }}
Cursor

Install in Cursor (one-click) or add to .cursor/mcp.json in your project root:

json
{  "mcpServers": {    "woocommerce": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "env": {        "WORDPRESS_SITE_URL": "https://store.example.com",        "WOOCOMMERCE_CONSUMER_KEY": "ck_your_key",        "WOOCOMMERCE_CONSUMER_SECRET": "cs_your_secret"      }    }  }}

4. Start using it — ask your AI assistant things like:

"List all products that are out of stock" "Create a 10% off coupon for orders over $50" "Show me this week's sales report"

Features

  • Full store management — CRUD operations for products, categories, tags, brands, orders, customers, and coupons
  • Product taxonomy — attributes, attribute terms, and variations with batch support
  • Shipping — zones, zone methods, and shipping classes
  • Taxes — tax rates and tax classes
  • Webhooks — create, manage, and monitor webhook subscriptions
  • Settings — read and update store configuration
  • Reports — sales reports, top sellers, order/product/customer totals
  • Media management — list, delete, and cleanup orphaned media via WordPress REST API
  • Token optimization — all tools support a fields param to return only specific fields, reducing response size by 60-97%
  • MCP resources — schema references for products, orders, coupons, refunds, and payment gateways that agents can read for context
  • Guided prompts — multi-step workflows for variable product setup, order processing, and catalog overview
  • Tool annotations — readOnlyHint, destructiveHint, and idempotentHint on all 101 tools for safe agent behavior
  • Actionable errors — error responses include guidance on how to fix common issues

Safety

This server connects to a LIVE WooCommerce store. Every create, update, and delete operation affects real data. Use caution, especially on production stores.

Before You Start

  • Back up your store before using destructive tools. Use a WordPress backup plugin or your host's backup feature.
  • Test on staging first. Clone your production store to a staging environment and point this server at the staging URL.
  • Use read-only mode when exploring. Set WOOCOMMERCE_MCP_READ_ONLY=true to block all write operations — only list, get, and report tools will work.

Irreversible Operations

Most delete operations move items to trash (recoverable). However, these are permanent and cannot be undone:

ToolWhy it's irreversible
delete_mediaWordPress media deletions bypass trash entirely
delete_tax_rateTax rates have no trash — deleted immediately
delete_tax_classTax classes have no trash — rates become orphaned
delete_attributeRemoves the attribute AND all its terms from every product
delete_refundRemoves refund record (does not reverse payment)
cleanup_orphaned_mediaPermanently deletes all unattached media when delete=true
run_system_toolSystem maintenance actions (cache clears, DB updates) cannot be undone

Cascading Effects

Some operations affect more than the single item being changed:

  • Deleting an attribute removes it from all products — variable products may break
  • Deleting an attribute term removes that option from all products and variations
  • Deleting a shipping zone removes all methods and locations in that zone
  • Batch operations (batch_update_attribute_terms, batch_update_variations) can create, update, AND delete in a single call

API Key Permissions

For maximum safety, create WooCommerce API keys with only the permissions you need:

  • Read-only exploration: Create a key with Read permissions only
  • Full management: Use Read/Write permissions

Available Tools (101)

DomainTools
Productslist, get, create, update, delete
Categorieslist, get, create, update, delete
Tagslist, get, create, update, delete
Brandslist, get, create, update, delete
Attributeslist, get, create, delete
Attribute Termslist, create, delete, batch update
Variationslist, get, create, update, batch update
Orderslist, get, create, update, delete
Order Refundslist, create, delete
Order Noteslist, create, delete
Customerslist, get, create, update
Couponslist, get, create, update, delete
Product Reviewslist, get, update, delete
Shipping Zoneslist, get, create, update, delete
Shipping Zone Methodslist, get, create, update, delete
Shipping Classeslist, create
Tax Rateslist, get, create, update, delete
Tax Classeslist, create, delete
Webhookslist, get, create, update, delete
Payment Gatewayslist, get, update
Settingslist groups, get, update
System Statusget status, list tools, run tool
Datalist countries, list currencies
Reportssales, top sellers, order/product/customer totals
Medialist, delete, cleanup orphaned

Resources

The server exposes 7 MCP resources that provide schema references and guides for AI agents:

URIDescription
woo://schema/productProduct fields, types, statuses, and key rules
woo://schema/orderOrder fields, status lifecycle, and payment info
woo://schema/couponCoupon types, limits, restrictions, and rules
woo://schema/refundRefund fields, reasons, line items, and processing rules
woo://reference/product-typesWhen to use simple, variable, grouped, or external products
woo://reference/order-statusesOrder status transitions and lifecycle diagram
woo://reference/payment-gatewaysAvailable payment gateways and their configuration options

Resources are read-only context that agents can fetch to understand WooCommerce data structures before making API calls.

Prompts

5 guided workflow prompts that orchestrate multi-step operations:

PromptArgsWhat it does
setup_variable_productproduct_name, attribute_name, variationsCreates a variable product end-to-end: attribute → terms → product → variations → publish
process_orderorder_idReviews an order's details and recommends the appropriate status transition
catalog_overview(none)Runs 5 tools in parallel to produce a store dashboard (products, orders, customers, categories, top sellers)
handle_refundorder_idGuides through refund processing: review order, select items, create refund, verify
moderate_reviews(none)Reviews pending product reviews and recommends approve/update/delete actions

Tool Annotations

Every tool is annotated with behavior hints so AI agents can make safe decisions:

AnnotationMeaningApplied to
readOnlyHintNo side effects, safe to call anytimeAll list_*, get_*, and report tools (46)
destructiveHintDeletes or removes dataAll delete_* tools + cleanup_orphaned_media + run_system_tool + batch_update_* (22)
idempotentHintSafe to retry, same result each timeAll update_* tools (15)

All tools also set openWorldHint: false — they only interact with WooCommerce, no external side effects.

Configuration

Environment Variables

VariableRequiredDescription
WORDPRESS_SITE_URLYesWordPress store URL (e.g. https://store.example.com)
WOOCOMMERCE_CONSUMER_KEYYesWooCommerce REST API consumer key (ck_...)
WOOCOMMERCE_CONSUMER_SECRETYesWooCommerce REST API consumer secret (cs_...)
WORDPRESS_USERNAMENoWordPress admin username (for media tools)
WORDPRESS_APP_PASSWORDNoWordPress Application Password (for media tools)
MCP_TRANSPORTNoSet to http for remote HTTP access (default: stdio)
PORTNoPlatform-provided port (Hostinger, Railway); overrides MCP_PORT
MCP_PORTNoHTTP server port (default: 3000)
MCP_AUTH_TOKENNo*Bearer token for HTTP auth (*required when MCP_TRANSPORT=http)
WOOCOMMERCE_MCP_READ_ONLYNoSet to true to block all write/delete operations (safe exploration mode)

Using a .env file

Instead of inlining credentials, point to a directory with a .env file:

json
{  "mcpServers": {    "woocommerce": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "cwd": "/path/to/your/project"    }  }}

Multiple Stores

Use different server names to manage multiple stores from one project:

json
{  "mcpServers": {    "store-a": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "env": { "WORDPRESS_SITE_URL": "https://store-a.com", "..." }    },    "store-b": {      "command": "npx",      "args": ["-y", "@amitgurbani/mcp-server-woocommerce"],      "env": { "WORDPRESS_SITE_URL": "https://store-b.com", "..." }    }  }}

Token Optimization

All tools support an optional fields param (comma-separated) to return only specific fields:

text
# Browsing products — just names and pricesfields: "id,name,price"
# Stock checkfields: "id,name,stock_status,stock_quantity"
# Order overviewfields: "id,number,status,total"

This reduces response size by 60-97%, keeping AI context windows focused and costs low.

Development

bash
git clone https://github.com/AmitGurbani/mcp-server-woocommerce.gitcd mcp-server-woocommercepnpm install
bash
pnpm dev               # Watch modepnpm build             # Buildpnpm start             # Run directlypnpm test              # Run unit testspnpm test:integration  # Run integration tests (requires Docker)pnpm test:watch        # Run unit tests in watch modepnpm inspector         # Debug with MCP Inspector

Integration tests run against a real WordPress 6.9.4 + WooCommerce 10.5.3 instance via @wordpress/env. Prerequisite: Docker. The test environment starts automatically when you run pnpm test:integration.

Docker

bash
docker build -t mcp-server-woocommerce .docker run \  -e WORDPRESS_SITE_URL=https://store.example.com \  -e WOOCOMMERCE_CONSUMER_KEY=ck_your_key \  -e WOOCOMMERCE_CONSUMER_SECRET=cs_your_secret \  mcp-server-woocommerce

Remote / Mobile Access (HTTP Transport)

For accessing your WooCommerce tools from Claude mobile, ChatGPT, or other remote clients, run the server in HTTP mode:

bash
MCP_TRANSPORT=http MCP_AUTH_TOKEN=your-secret-token node build/index.js

Or with Docker:

bash
docker run -p 3000:3000 \  -e MCP_TRANSPORT=http \  -e MCP_AUTH_TOKEN=your-secret-token \  -e WORDPRESS_SITE_URL=https://store.example.com \  -e WOOCOMMERCE_CONSUMER_KEY=ck_your_key \  -e WOOCOMMERCE_CONSUMER_SECRET=cs_your_secret \  mcp-server-woocommerce
VariableDefaultDescription
MCP_TRANSPORTstdioSet to http for remote access
PORT—Platform-provided port (overrides MCP_PORT)
MCP_PORT3000HTTP server port
MCP_AUTH_TOKEN—Bearer token for authentication (Claude Desktop/Code)
AUTH0_DOMAIN—Auth0 tenant URL for OAuth 2.1 (Claude.ai Connectors)
AUTH0_AUDIENCE—Auth0 API identifier for OAuth 2.1
MCP_SERVER_URL—Public server URL for OAuth 2.1 discovery

Either MCP_AUTH_TOKEN or AUTH0_DOMAIN + AUTH0_AUDIENCE + MCP_SERVER_URL is required.

Deployment guide: See docs/DEPLOYMENT.md for step-by-step instructions for Railway ($0/mo), Fly.io ($0/mo with scale-to-zero), and Docker deployments.

Claude Desktop / Code: Use bearer token auth — add the server URL and Authorization: Bearer <token> header to your config.

Claude.ai web / mobile: Requires OAuth 2.1 via Auth0 (free tier). See the deployment guide for setup instructions.

Default mode remains stdio — existing npx users are unaffected.

License

MIT


WooCommerce is a registered trademark of Automattic Inc. This project is not affiliated with, endorsed by, or sponsored by Automattic Inc.

來源:README.md,提交 e689993

工具

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

版本歷史

1
  1. v1.2.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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