io.github.wppoland/woocommerce-mcp

السجل الرسمي التجارة الإلكترونية

Read-only MCP server for WordPress + WooCommerce products, orders, sales, and posts.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package @wppoland/woocommerce-mcp
Claude Code
claude mcp add woocommerce-mcp -e 'WP_URL=<WP_URL>' -e 'WC_CONSUMER_KEY=<your wc_consumer_key>' -e 'WC_CONSUMER_SECRET=<your wc_consumer_secret>' -- npx -y @wppoland/woocommerce-mcp@0.1.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "woocommerce-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@wppoland/woocommerce-mcp@0.1.1"
            ],
            "env": {
                "WP_URL": "<WP_URL>",
                "WC_CONSUMER_KEY": "<your wc_consumer_key>",
                "WC_CONSUMER_SECRET": "<your wc_consumer_secret>"
            }
        }
    }
}

متغيرات البيئة

  • WP_URL إلزامي Base URL of the WordPress / WooCommerce store (HTTPS)
  • WC_CONSUMER_KEY سري WooCommerce REST API consumer key (Read permission)
  • WC_CONSUMER_SECRET سري WooCommerce REST API consumer secret (Read permission)

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. woocommerce-mcp
  2. Tools
  3. Install & build
  4. Configure
  5. Use with Claude Desktop / Claude Code
  6. Docs on wppoland.com
  7. Articles (off-site)
  8. Verify
  9. Notes
  10. License

woocommerce-mcp

A small, read-only Model Context Protocol server for WordPress + WooCommerce. It lets Claude (or any MCP client) answer questions about a live store — products, orders, sales, and blog posts — over the official REST APIs. No writes, no plugins to install on the store: it talks to the existing WordPress/WooCommerce REST endpoints.

Built and maintained by WPPoland, a senior WordPress developer working with WordPress since 2006. If you need this wired into a real store stack, we build WooCommerce ERP and API integrations and enterprise e-commerce architecture (headless, integrations, AI-ready data).

Tools

ToolWhat it doesNeeds WooCommerce keys
list_productsList / search products (name, sku, price, stock, permalink)yes
get_productFull details for one product by idyes
list_ordersRecent orders, newest first, optional status filteryes
sales_reportSales totals for a period (week / month / last_month / year)yes
search_postsSearch published blog posts (public WP REST API)no

Everything is read-only. The server never creates, edits, or deletes anything in the store.

Install & build

From npm (package name is scoped - the unscoped woocommerce-mcp name is locked on the registry):

npm install -g @wppoland/woocommerce-mcp
# or: npx @wppoland/woocommerce-mcp

From source:

git clone https://github.com/wppoland/woocommerce-mcp.git
cd woocommerce-mcp
npm install
npm run build

Configure

Set three environment variables:

VarRequiredExample
WP_URLyeshttps://shop.example.com
WC_CONSUMER_KEYfor wc_* toolsck_xxx
WC_CONSUMER_SECRETfor wc_* toolscs_xxx

Create the WooCommerce keys in WooCommerce → Settings → Advanced → REST API → Add key with Read permission. search_posts works without keys against any public WordPress site.

The keys are sent to your own store over HTTPS as REST query auth. Use HTTPS, and give the key Read access only.

Use with Claude Desktop / Claude Code

Add to your MCP client config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "woocommerce": {
      "command": "node",
      "args": ["/absolute/path/to/woocommerce-mcp/dist/index.js"],
      "env": {
        "WP_URL": "https://shop.example.com",
        "WC_CONSUMER_KEY": "ck_xxx",
        "WC_CONSUMER_SECRET": "cs_xxx"
      }
    }
  }
}

Then ask things like "What were last month's WooCommerce sales?" or "List the 5 most recent orders that are on hold."

Docs on wppoland.com

Articles (off-site)

Field notes published on DEV (not duplicates of wppoland.com pages):

Show HN: discussion

Verify

npm run check   # builds, then asserts all five tools register (no network/credentials needed)

Notes

  • Node 18+ (uses the built-in fetch).
  • Logs go to stderr so they never corrupt the stdio MCP protocol on stdout.
  • API errors are surfaced with the store's message; credentials are never echoed.

License

MIT © WPPoland

الأسئلة الشائعة

ما هو io.github.wppoland/woocommerce-mcp؟

Read-only MCP server for WordPress + WooCommerce products, orders, sales, and posts.

كيف أثبّت io.github.wppoland/woocommerce-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add woocommerce-mcp -e 'WP_URL=<WP_URL>' -e 'WC_CONSUMER_KEY=<your wc_consumer_key>' -e 'WC_CONSUMER_SECRET=<your wc_consumer_secret>' -- npx -y @wppoland/woocommerce-mcp@0.1.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.wppoland/woocommerce-mcp إلى مفتاح API؟

نعم. يتطلب WP_URL, WC_CONSUMER_KEY, WC_CONSUMER_SECRET، وتضبطها في إعداداته.

هل io.github.wppoland/woocommerce-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.wppoland/woocommerce-mcp؟

ينشره wppoland. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.