mcp-server-woocommerce
Provides full store management via WooCommerce REST API, including products, orders, customers, coupons, shipping, taxes, webhooks, settings, reports, and media.
Allows media management via WordPress REST API, including listing, deleting, and cleaning up orphaned media.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-woocommerceShow me this week's sales report"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-woocommerce
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:
Add to your project's .mcp.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"
}
}
}
}Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"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"
}
}
}
}Install in Cursor (one-click) or add to .cursor/mcp.json in your project root:
{
"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
fieldsparam 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, andidempotentHinton all 101 tools for safe agent behaviorActionable 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=trueto 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:
Tool | Why it's irreversible |
| WordPress media deletions bypass trash entirely |
| Tax rates have no trash — deleted immediately |
| Tax classes have no trash — rates become orphaned |
| Removes the attribute AND all its terms from every product |
| Removes refund record (does not reverse payment) |
| Permanently deletes all unattached media when |
| System 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)
Domain | Tools |
Products | list, get, create, update, delete |
Categories | list, get, create, update, delete |
Tags | list, get, create, update, delete |
Brands | list, get, create, update, delete |
Attributes | list, get, create, delete |
Attribute Terms | list, create, delete, batch update |
Variations | list, get, create, update, batch update |
Orders | list, get, create, update, delete |
Order Refunds | list, create, delete |
Order Notes | list, create, delete |
Customers | list, get, create, update |
Coupons | list, get, create, update, delete |
Product Reviews | list, get, update, delete |
Shipping Zones | list, get, create, update, delete |
Shipping Zone Methods | list, get, create, update, delete |
Shipping Classes | list, create |
Tax Rates | list, get, create, update, delete |
Tax Classes | list, create, delete |
Webhooks | list, get, create, update, delete |
Payment Gateways | list, get, update |
Settings | list groups, get, update |
System Status | get status, list tools, run tool |
Data | list countries, list currencies |
Reports | sales, top sellers, order/product/customer totals |
Media | list, delete, cleanup orphaned |
Resources
The server exposes 7 MCP resources that provide schema references and guides for AI agents:
URI | Description |
| Product fields, types, statuses, and key rules |
| Order fields, status lifecycle, and payment info |
| Coupon types, limits, restrictions, and rules |
| Refund fields, reasons, line items, and processing rules |
| When to use simple, variable, grouped, or external products |
| Order status transitions and lifecycle diagram |
| Available 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:
Prompt | Args | What it does |
|
| Creates a variable product end-to-end: attribute → terms → product → variations → publish |
|
| Reviews an order's details and recommends the appropriate status transition |
| (none) | Runs 5 tools in parallel to produce a store dashboard (products, orders, customers, categories, top sellers) |
|
| Guides through refund processing: review order, select items, create refund, verify |
| (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:
Annotation | Meaning | Applied to |
| No side effects, safe to call anytime | All |
| Deletes or removes data | All |
| Safe to retry, same result each time | All |
All tools also set openWorldHint: false — they only interact with WooCommerce, no external side effects.
Configuration
Environment Variables
Variable | Required | Description |
| Yes | WordPress store URL (e.g. |
| Yes | WooCommerce REST API consumer key ( |
| Yes | WooCommerce REST API consumer secret ( |
| No | WordPress admin username (for media tools) |
| No | WordPress Application Password (for media tools) |
| No | Set to |
| No | Platform-provided port (Hostinger, Railway); overrides |
| No | HTTP server port (default: |
| No* | Bearer token for HTTP auth (*required when |
| No | Set to |
Using a .env file
Instead of inlining credentials, point to a directory with a .env file:
{
"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:
{
"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:
# Browsing products — just names and prices
fields: "id,name,price"
# Stock check
fields: "id,name,stock_status,stock_quantity"
# Order overview
fields: "id,number,status,total"This reduces response size by 60-97%, keeping AI context windows focused and costs low.
Development
git clone https://github.com/AmitGurbani/mcp-server-woocommerce.git
cd mcp-server-woocommerce
pnpm installpnpm dev # Watch mode
pnpm build # Build
pnpm start # Run directly
pnpm test # Run unit tests
pnpm test:integration # Run integration tests (requires Docker)
pnpm test:watch # Run unit tests in watch mode
pnpm inspector # Debug with MCP InspectorIntegration 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
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-woocommerceRemote / Mobile Access (HTTP Transport)
For accessing your WooCommerce tools from Claude mobile, ChatGPT, or other remote clients, run the server in HTTP mode:
MCP_TRANSPORT=http MCP_AUTH_TOKEN=your-secret-token node build/index.jsOr with Docker:
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-woocommerceVariable | Default | Description |
|
| Set to |
| — | Platform-provided port (overrides |
|
| HTTP server port |
| — | Bearer token for authentication (Claude Desktop/Code) |
| — | Auth0 tenant URL for OAuth 2.1 (Claude.ai Connectors) |
| — | Auth0 API identifier for OAuth 2.1 |
| — | 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.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmitGurbani/mcp-server-woocommerce'
If you have feedback or need assistance with the MCP directory API, please join our Discord server