
WooCommerce MCP
io.github.sadrmanesh由 GitHub 帳號 sadrmanesh 發布v0.6.0更新於 Oct 31, 2026
Manage WooCommerce stores: products, orders, customers, coupons, webhooks, and analytics.
概覽
面向 WooCommerce 商店的本機 MCP 伺服器:瀏覽商品、訂單、客戶、優惠券與銷售分析,並以預覽與稽核方式執行寫入。
- 可以做什麼
- 瀏覽與搜尋商品、訂單、訂單備註、客戶、優惠券、Webhook、配送區域與稅率
- 建立與更新商品,批次更新最多 100 個商品,調整價格與庫存
- 管理訂單:變更狀態、新增或刪除備註、附物流資訊出貨,以及全額或部分退款
- 操作促銷:建立、更新、刪除優惠券,安排與結束促銷,檢視優惠券成效
- 讀取分析資料:商店概況、依日/週/月的銷售、熱銷商品、付款方式和低庫存報告
- 將商店、商品、訂單與 Webhook 投遞作為 MCP 資源提供,並提供銷售簡報、補貨計畫等提示詞
- 適用情境
- 適合讓助理協助經營 WooCommerce 商店:回答銷售與庫存問題、草擬促銷方案,或在預覽與稽核紀錄下執行訂單、商品與退款變更。適合希望寫入操作須經確認、而非直接修改的營運人員。
- 執行需求
- 需要 Node.js 20 或更新版本,可透過 npx 或 Docker 映像執行;預設為 stdio,也可選用 HTTP 傳輸。需要 WOOCOMMERCE_URL,以及在 WooCommerce 設定中建立的 REST API 金鑰組,分別放入 WOOCOMMERCE_CONSUMER_KEY 與 WOOCOMMERCE_CONSUMER_SECRET。WordPress 固定網址不能設為「單純」。需能連線至商店網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 WooCommerce MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
woocommerce-mcp
[CI] [License: MIT] [Node.js] [Docs] [npm] [DOI] [MCP Registry] [Glama MCP server score] [Listed on mcpservers.org] [WooCommerce MCP on mcprush] [M8ven Score] [M8ven Verified]
A Model Context Protocol server for running one or more WooCommerce stores through the WooCommerce REST API. MCP clients can browse the catalog, work through and fulfill orders, issue refunds, adjust prices and stock in bulk, run promotions, segment customers, react to webhooks, and read sales analytics. Every change is previewed before it is applied and can be written to an audit log.
It runs locally over stdio, or as a remote service over streamable HTTP with bearer-token or OAuth 2.0 authentication, and ships as a Docker image on the GitHub Container Registry.
Documentation: https://sadrmanesh.github.io/woocommerce-mcp/ · Tool explorer: Hugging Face Space
Read more: Safe write tools for agents: preview, confirm, audit, and stale previews in a WooCommerce MCP server on Dev.to · Preview, confirm, audit on LinkedIn · Update: A week of reader feedback: what changed in my four AI-for-commerce tools on Dev.to · What reader feedback taught me about building production-safe AI tooling for commerce on LinkedIn
Listed on the official MCP Registry as io.github.sadrmanesh/woocommerce-mcp, on Glama, and on mcpservers.org.
[woocommerce-mcp MCP server on Glama] [WooCommerce MCP server]
Contents
- Highlights
- Quick start
- Connect an MCP client
- Tools, resources, and prompts
- Safe writes
- Configuration
- Deployment
- Development
- Documentation
Highlights
- Multi-store. Configure any number of stores and pick one per call with
store. Each store has its own credentials and its own read-only switch. - Safe by default. Stores are read-only until you allow writes. Write tools then return a preview of the exact REST request and apply it only when called again with
confirm: true. A confirm is refused if the arguments or the store data the change was computed from changed since the preview.dryRun: truealways previews. - Signed approvals (optional). Set
WOOCOMMERCE_APPROVAL_SECRETand a confirm also needs a short-lived, single-use token signed for that exact preview by someone outside the agent's reach, for example withwoocommerce-mcp approve <previewId>. The agent cannot approve its own writes. - Audit log. One JSON line per write attempt: applied, previewed, refused, or failed, with the tool, store, arguments, caller, and a preview id that links each confirmed write to its preview.
- Refunds and bulk operations. Partial or line-item refunds, batch updates of up to 100 products, and percentage or fixed price adjustments.
- Analytics. Sales by day, week, or month with refunds, average order value, top products, and payment methods, plus a low-stock report that covers variations.
- Promotions and customers. Coupon performance, scheduled sales, and customer segments such as VIP, repeat, and at risk.
- Fulfillment. Order notes, shipment tracking, and one-step fulfillment that emails the customer.
- Webhooks. Manage store webhooks and receive signed deliveries, readable as MCP resources.
- Shipping and taxes. Read shipping zones, methods, tax rates, and tax classes.
- Privacy and control. Optional PII redaction, and tool allow and deny lists per deployment or per store.
- Gentle on the store. Per-store rate limiting, retries with backoff and jitter, and an optional read cache.
- Remote ready. Streamable HTTP with static bearer tokens (full or read-only) or RFC 7662 token introspection, RFC 9728 protected resource metadata, Host and Origin checks, and a health endpoint.
- MCP resources and prompts. Read products and orders by URI, and start common workflows such as a sales briefing or a restock plan.
- Observability. Optional OpenTelemetry traces for every tool call and WooCommerce request.
- Well tested. Strict TypeScript, Zod validation on every input, and tests against a mocked WooCommerce API.
Quick start
Node.js 20 or newer is required.
Or run the Docker image from the GitHub Container Registry (linux/amd64 and linux/arm64, tags X.Y.Z, X.Y, and latest). The same image is on Docker Hub as sadrmanesh/woocommerce-mcp:
The npm package is also on GitHub Packages; see Install options for the .npmrc setup. npmjs.com remains the main registry.
Or from a checkout:
Create a REST API key under WooCommerce > Settings > Advanced > REST API. Use a Read key while the store is read-only, and a Read/Write key only when you enable writes. WordPress permalinks must not be set to "Plain", or /wp-json/ will not resolve.
The process then serves MCP on stdin and stdout. Logs go to stderr. npm start in a checkout loads .env from the working directory without overriding variables that are already set.
Connect an MCP client
Most hosts accept an mcpServers map like the ones below. Keep secrets in env, never in args. Docker, Smithery, and MCP Registry installs are in docs/install.md.
stdio
From a checkout, use "command": "node" and "args": ["/absolute/path/to/woocommerce-mcp/dist/index.js"].
Streamable HTTP
Without authentication the HTTP endpoint only binds to loopback. See docs/security.md for tokens, scopes, and OAuth introspection.
Tools, resources, and prompts
Every tool except woocommerce_list_stores accepts an optional store id. Without it, the default store is used.
To browse every tool with its full input schema and build tools/call requests in the browser, open the tool explorer on Hugging Face.
Every name starts with woocommerce_, for example woocommerce_customer_segments. That makes 47 tools: 28 reads and 19 writes.
Resources
Prompts: sales_briefing, restock_plan, order_triage, and price_change_review.
Full argument and response details are in docs/tools.md.
Safe writes
-
Read-only stores. A store accepts writes only when
WOOCOMMERCE_READ_ONLY=false(single store) or"readOnly": false(store list). Otherwise write tools fail withread_onlybefore contacting the store. -
Confirmation. With
WOOCOMMERCE_REQUIRE_CONFIRMATION=true(the default), the first call returns the planned request and changes nothing:Calling the tool again with the same arguments and
confirm: trueapplies it.dryRun: truealways previews, even with confirmation turned off. Every preview carries apreviewId; send it back withconfirm: trueand the server refuses the call withpreview_mismatchif the arguments changed since the preview.Tools that compute a write from store data, such as a 10% price increase, resolve it at preview time: the preview lists each record it read under
preconditions, with the current values (before) and the absolute values the write will set (after), and thepreviewIdgains a second part that fingerprints that data. On confirm the server reads the same data again, and if it changed, for example because the price was edited in between, the call is refused withstale_previewand nothing is sent. See Stale previews for what is and is not covered. -
Scopes. Over authenticated HTTP, write tools also need the
woocommerce:writescope. Read-only tokens can never change a store. -
Audit. Set
WOOCOMMERCE_AUDIT_LOGto a file path orstderr: -
Signed approvals (optional). A preview id binds what is confirmed, not who confirmed it: by default an agent can request a preview and confirm it in the same turn. Set
WOOCOMMERCE_APPROVAL_SECRETto require anapprovaltoken on every confirm. The token is an HMAC-SHA256 signature over the exactpreviewId(state part included), tool, store, and an expiry, so it cannot be reused for other arguments or a changed store. Tokens are single-use and expire after 10 minutes by default. A person signs one after reviewing the preview:The command shows the previewed change from the audit log, asks for a yes, and prints the token, which the agent passes back as
approvalwithconfirm: true. Missing, invalid, expired, mismatched, and reused tokens are refused withapproval_required,approval_invalid,approval_expired,approval_mismatch, andapproval_replayed. The token format is documented, so an approval page or webhook can sign too.What this is not: whoever holds the secret can approve, so keep it out of MCP client configs, prompts, and any host the agent has a shell on. Spent tokens are tracked in memory per process. Without the secret, behavior is exactly as in 0.5.0. See Signed approvals.
Refunds created by woocommerce_create_refund are recorded as manual refunds unless apiRefund: true asks the payment gateway to return the money.
Configuration
The most common settings are below. Every variable, including the multi-store file format, is in docs/configuration.md and .env.example.
Multi-store example (stores.json):
Deployment
The image runs as a non-root user, listens on port 3000, and has a health check. Put it behind a TLS-terminating reverse proxy for remote use. See docs/deployment.md.
Development
Tests run against a mocked WooCommerce API and never call a live store. See CONTRIBUTING.md.
Documentation
The full documentation site is at https://sadrmanesh.github.io/woocommerce-mcp/. The same guides are in this repository:
- Install options
- Configuration
- Tools reference
- Webhooks
- Privacy
- Performance
- Security and authentication
- Deployment
- Observability
- Changelog
Technical report
Technical Report: WooCommerce Model Context Protocol Server - A Multi-Store, Previewed Safe-Write Architecture for Autonomous AI Agents in E-Commerce. M. N. Sadrmanesh, Zenodo, 2026. https://doi.org/10.5281/zenodo.23897615 Also on ResearchGate and Academia.edu.
License
MIT. Copyright (c) 2026 Naser Sadrmanesh. See LICENSE.
Author
Naser Sadrmanesh: https://github.com/sadrmanesh · https://sadrmanesh.github.io · [email protected]
來源:README.md,提交 2f16b6c
工具
0版本歷史
4- v0.6.0最新Oct 31, 2026
- v0.5.0Oct 31, 2026
- v0.4.0Oct 31, 2026
- v0.3.2Oct 30, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分