Skip to main content
Glama
wp-woo-mcp

wp-woo-mcp

by Wtirliz

wp-woo-mcp

An MCP server that lets AI assistants (Claude Code, Claude Desktop, Cursor and other MCP clients) work with a WooCommerce store: find products, check and change prices with guardrails, read orders and get sales summaries.

You:    Which demo products cost more than 500 UAH? Raise the primer by 3%.
Claude: → search_products → update_product_price (dry run) → shows 375 → 386.25 (+3%)
You:    OK, apply.
Claude: → update_product_price (dry_run: false) → done, re-read confirms 386.25

Tools

Tool

What it does

Writes

search_products

Search by text, SKU (one or several) or status; compact rows with prices and stock

—

get_product

One product by id or SKU: categories, stock, variations, description

—

update_product_price

Change regular / sale price of a simple product

✅ guarded

list_orders

Orders with status and date filters

—

get_order

One order: items, total, payment

—

sales_summary

Orders count, revenue, average order, statuses, top products for a period

—

Related MCP server: Synchronity

Safety by design

An AI agent with write access to a live store needs more than a prompt saying "be careful":

  • Writes are off by default. update_product_price refuses until the server runs with WOO_ALLOW_WRITES=true.

  • Dry run by default. The tool shows before → after and the change in %. It applies only with dry_run: false, which the agent is told to send only after the user agrees.

  • Change limit. Changes above WOO_MAX_PRICE_CHANGE_PCT (default 30%) are refused unless allow_large_change: true, a separate explicit confirmation.

  • Validation. Prices must look like 1250 or 389.50; sale price must be lower than regular; variable products are refused because their prices live on variations.

  • Tool annotations. Read-only tools are marked readOnlyHint, the price tool destructiveHint, so clients can ask for confirmation.

  • Personal data. Orders show only the customer's first name and city unless WOO_EXPOSE_CUSTOMER_CONTACTS=true.

  • Least privilege. Use an application password of a Shop manager user, not an administrator.

  • Readable errors. API errors come back as tool errors with a hint (401 → how to fix the application password), so the agent can explain the problem instead of guessing.

Setup

  1. In WordPress: Users → Profile → Application Passwords, add a password named wp-woo-mcp. Application passwords require HTTPS, except on sites with WP_ENVIRONMENT_TYPE set to local.

  2. Build:

    npm install
    npm run build
  3. Add the server to your MCP client.

Claude Code:

claude mcp add woo \
  -e WP_URL=https://shop.example \
  -e WP_USER=shop-manager \
  -e WP_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
  -- node /path/to/wp-woo-mcp/dist/index.js

Claude Desktop / Cursor (mcpServers in the client config):

{
  "mcpServers": {
    "woo": {
      "command": "node",
      "args": ["/path/to/wp-woo-mcp/dist/index.js"],
      "env": {
        "WP_URL": "https://shop.example",
        "WP_USER": "shop-manager",
        "WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
        "WOO_ALLOW_WRITES": "false"
      }
    }
  }
}

Environment variables

Variable

Default

Meaning

WP_URL

required

Store URL

WP_USER

required

WordPress user login

WP_APP_PASSWORD

required

Application password (spaces are fine)

WOO_ALLOW_WRITES

false

Enables update_product_price

WOO_MAX_PRICE_CHANGE_PCT

30

Max price change without allow_large_change

WOO_EXPOSE_CUSTOMER_CONTACTS

false

Adds customer names and emails to orders

Development

src/
  woo-client.ts   WooCommerce REST client: Basic auth, retries on 429/5xx (Retry-After), timeouts, typed errors
  logic.ts        pure functions: price guard, compact product/order views, sales aggregation
  server.ts       MCP tools (zod input schemas, annotations, error handling)
  index.ts        stdio entry point, config from env
test/             node:test: logic, HTTP client with a fake fetch, MCP protocol via in-memory transport
scripts/smoke.ts  end-to-end check against a real store over stdio
npm test          # 23 tests, no network
npm run build
npm run smoke     # against the store in .env; SMOKE_WRITE_SKU=<test SKU> also checks writes (changes the price and restores it)

Verified end to end against a local store (WooCommerce 11.3, WordPress 7.1, PHP 8.4): 11/11 smoke checks, including a real price update, re-read and restore.

Limitations

  • Price updates for simple products only (variations are refused, not silently skipped).

  • sales_summary reads up to max_orders orders (default 500) through the REST API; for large stores, WooCommerce Analytics would be faster.

  • stdio transport only (local use by one person). A shared remote server would need HTTP transport and per-user auth.

License

MIT

Available Tools

6 tools
get_orderGet orderA
Read-only

Get one order by id: status, total, items, payment method.

Inputs: id (required).

get_productGet productA
Read-only

Get one product with details (categories, stock, variations count, description) by id or SKU.

Inputs: id, sku.

list_ordersList ordersB
Read-only

List orders, newest first, with optional status and date filters (ISO 8601, e.g. 2026-11-01T00:00:00). Customer contacts are hidden unless the server enables them.

Inputs: page, after, before, status, +1 more.

sales_summarySales summaryA
Read-only

Aggregate orders for a period: count, revenue, average order, orders by status and top products by revenue. Reads up to max_orders orders.

Inputs: after (required), top, before, statuses, +1 more.

search_productsSearch productsA
Read-only

Search WooCommerce products by text, SKU (comma-separated for several) or status. Returns compact rows: id, name, sku, type, status, prices, stock.

Inputs: sku, page, search, status, +2 more.

update_product_priceUpdate product priceA
DestructiveIdempotent

Change the regular (and optionally sale) price of a simple product, found by id or SKU. dry_run defaults to true: it only shows what would change. Run with dry_run: false only after the user agrees. Changes above the configured limit are refused unless allow_large_change is true, which needs explicit user confirmation. sale_price: a price to set, "" to remove the sale price, or omit to keep it.

Inputs: regular_price (required), id, sku, dry_run, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct resource+action pair: product search vs. single product fetch vs. price mutation, and order listing vs. single order fetch vs. aggregate reporting. The one plausible overlap (list_orders vs. sales_summary) is resolved by the descriptions making one an enumerator and the other an aggregator.

    Naming Consistency4/5

    Five of six tools follow a clean verb_noun pattern (search_products, get_product, update_product_price, list_orders, get_order) in consistent snake_case. The lone outlier is sales_summary, a noun-only name that breaks the verb convention.

    Tool Count5/5

    Six tools is a tight, well-scoped surface for a store-admin server, with no redundant endpoints. Every tool covers a distinct read or write need an agent would actually reach for.

    Completeness3/5

    Read coverage is solid (search/get for products, list/get for orders, plus aggregation), but the write surface is thin: only price can be modified. There is no stock update, no product field update, and no order status update or refund, which are core WooCommerce operations agents will likely need.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    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
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants to search, compare, and buy products across connected WooCommerce stores with human-in-the-loop approval.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI shopping agents to search products, get offers, and generate signed cart handoff links for self-hosted WooCommerce stores. Also provides a global readiness-scan tool to score any store's agent-readiness.
      -