Skip to main content
Glama
woocommerce-mcp

woocommerce-mcp

by mubasher1111

πŸ›’ woocommerce-mcp

Talk to your WooCommerce store. An MCP server that connects Claude, Cursor, VS Code and other AI assistants to your store: exact sales reports, orders, products, low stock and customers. Read-only by default.

"How much did we sell this month, and what were the top 5 products?" "Which items are about to run out?" "Show me Sana's last order and its notes."

Every number comes from your store's real orders, calculated by code, not guessed by the AI.

Tests npm License MCP

πŸ“– Full guide


Tools

Tool

What it does

store_overview

Orders by status, product count, out-of-stock count, latest orders.

sales_report

For any date range: orders, gross and net sales, refunds, discounts, shipping, tax, average order value, items sold, sales by day, top products, top customers, payment methods and cities.

list_orders

Find orders by status, date or search (order number, name, email, phone).

get_order

One order in full: customer, addresses, items, totals, refunds, coupons and notes.

list_products

Products with price, stock and total sales; search by name or SKU; sort by best-selling.

low_stock

Products and variations out of stock or at/below a threshold, so you know what to reorder.

find_customers

Registered customers by name or email.

Changes (off by default): with WOOCOMMERCE_ALLOW_WRITES=true and a Read/Write key, four more tools appear: update_order_status, add_order_note, update_stock and update_price. Claude is told to confirm each change with you first, and every result shows the value before and after.

Related MCP server: WooCommerce Insights MCP

Setup

1. Create an API key in WooCommerce

WordPress admin β†’ WooCommerce β†’ Settings β†’ Advanced β†’ REST API β†’ Add key. Choose your user, set Permissions: Read (or Read/Write if you'll enable changes), and click Generate API key. Copy the Consumer key (ck_…) and Consumer secret (cs_…).

Your store must use https://.

2. Add the server

You need Node.js 20 or newer.

Claude Desktop: Settings β†’ Developer β†’ Edit Config:

{
  "mcpServers": {
    "woocommerce": {
      "command": "npx",
      "args": ["-y", "woocommerce-mcp"],
      "env": {
        "WOOCOMMERCE_URL": "https://yourstore.com",
        "WOOCOMMERCE_KEY": "ck_xxxxxxxxxxxxxxxx",
        "WOOCOMMERCE_SECRET": "cs_xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Restart Claude Desktop and ask: "Give me an overview of my store."

Claude Code:

claude mcp add woocommerce \
  -e WOOCOMMERCE_URL=https://yourstore.com \
  -e WOOCOMMERCE_KEY=ck_xxx -e WOOCOMMERCE_SECRET=cs_xxx \
  -- npx -y woocommerce-mcp

Cursor / VS Code: the same command, args and env in .cursor/mcp.json or .vscode/mcp.json.

3. (Optional) Allow changes

Use a Read/Write key and add "WOOCOMMERCE_ALLOW_WRITES": "true" to env. Leave it out to keep the assistant strictly read-only.

Privacy and safety

  • The server runs on your computer and talks only to your store. Your key stays in your local config.

  • Order data you ask about is sent to your AI assistant (for example Anthropic for Claude), like anything else you share in a chat.

  • Read-only unless you enable changes. Changing an order status can make WooCommerce email the customer, as it would from the admin.

Troubleshooting

Message

Fix

rejected the API key (401)

Check the key and secret; the key's user must be a shop manager or admin. Some hosts strip the Authorization header: ask them to allow it, or check your security plugin.

isn't allowed (403)

The key is Read-only. Create a Read/Write key for changes.

has no WooCommerce API

Check the URL; WooCommerce must be active and Settings β†’ Permalinks must not be "Plain".

didn't return WooCommerce data

A firewall or security plugin is blocking /wp-json/. Allow it for your IP.

Limits

  • sales_report and low_stock read up to 2,000 orders/products per call; for bigger stores use shorter date ranges. Totals are by order date in the store's timezone.

  • Sales are counted from orders (completed, processing and on-hold by default), so they can differ slightly from WooCommerce Analytics, which has its own settings for which statuses count.

Development

git clone https://github.com/mubasher1111/woocommerce-mcp.git
cd woocommerce-mcp
npm install
npm test     # runs the server over stdio against a fake WooCommerce store

License

MIT. Made by ZexCart. More free tools: zexcart.site/dev-tools. Need a custom store integration? Get in touch.

If it saves you time, please ⭐ star the repo.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to manage WooCommerce stores, including products, orders, customers, categories, coupons, attributes, variations, order notes, refunds, reports, payment gateways, meta data, reviews, settings, data, posts, and system status through natural language.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables secure, read-only access to WooCommerce store data through MCP-compatible assistants, letting users query products, orders, sales summaries, and inventory alerts without exposing store credentials.
      -