WooCommerce MCP Server
Enables interaction with WooCommerce stores through the WordPress REST API, supporting comprehensive management of products, orders, customers, shipping, taxes, discounts, and store configuration.
README
WooCommerce MCP Server
A Model Context Protocol (MCP) server for WooCommerce integration, compatible with Windows, macOS, and Linux.
Overview
This MCP server enables interaction with WooCommerce stores through the WordPress REST API. It provides comprehensive tools for managing all aspects of products, orders, customers, shipping, taxes, discounts, and store configuration using JSON-RPC 2.0 protocol.
Configuration
Option 1: Direct Configuration (Your Current Setup)
{
"mcpServers": {
"woocommerce": {
"command": "node",
"args": ["/Users/user/woocommerce-mcp-server/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your.website",
"WOOCOMMERCE_CONSUMER_KEY": "ck_",
"WOOCOMMERCE_CONSUMER_SECRET": "cs_",
"WORDPRESS_USERNAME": "admin",
"WORDPRESS_PASSWORD": "admin"
}
}
}
}
Option 2: Environment File (Recommended for Security)
- Create a
.envfile in your project root:
WORDPRESS_SITE_URL=https://your.website
WOOCOMMERCE_CONSUMER_KEY=ck
WOOCOMMERCE_CONSUMER_SECRET=cs
WORDPRESS_USERNAME=admin
WORDPRESS_PASSWORD=admin
- Use this MCP configuration:
{
"mcpServers": {
"woocommerce": {
"command": "node",
"args": ["/Users/kenan/woocommerce-mcp-server/build/index.js"]
}
}
}
Available Tools
get_mcp_config- Generate MCP server configurationget_products- List WooCommerce productsget_product- Get specific product by IDcreate_product- Create new productupdate_product- Update existing productdelete_product- Delete productget_product_attributes- List product attributesget_product_attribute- Get specific product attributecreate_product_attribute- Create new product attributeupdate_product_attribute- Update product attributedelete_product_attribute- Delete product attributebatch_update_product_attributes- Batch update product attributesget_orders- List ordersget_order- Get specific orderget_customers- List customerscreate_customer- Create new customerget_product_categories- List product categoriescreate_product_category- Create new categoryget_sales_report- Get sales reports
Development
# Build
bun run build
# Start
bun run start
Security Notes
- Never commit credentials to version control
- Use environment variables or secure credential management
- Consider using application passwords instead of main WordPress passwords
- Regularly rotate API keys and passwords
Authentication Options
WooCommerce Authentication
WooCommerce API access requires consumer keys that you can generate in your WordPress dashboard under WooCommerce → Settings → Advanced → REST API.
WordPress Authentication
For WordPress-specific methods (like managing posts), you need to provide:
- Username/password credentials for basic authentication
- The WordPress REST API must be enabled on your site
API Methods
The server supports both WordPress and WooCommerce API methods. Here's a list of available methods grouped by category:
WordPress Content Management
These methods require WordPress username/password credentials and are independent of the WooCommerce API.
| Method | Description |
|---|---|
create_post |
Create a new WordPress post |
get_posts |
Retrieve WordPress posts |
update_post |
Update an existing WordPress post |
get_post_meta |
Get post metadata |
update_post_meta |
Update post metadata |
create_post_meta |
Create post metadata |
delete_post_meta |
Delete post metadata |
WooCommerce Products
| Method | Description |
|---|---|
get_products |
Retrieve a list of products |
get_product |
Get a single product by ID |
create_product |
Create a new product |
update_product |
Update an existing product |
delete_product |
Delete a product |
get_product_meta |
Get product metadata |
create_product_meta |
Create/update product metadata |
update_product_meta |
Update product metadata (alias for create) |
delete_product_meta |
Delete product metadata |
Product Categories
| Method | Description |
|---|---|
get_product_categories |
Retrieve product categories |
get_product_category |
Get a single product category |
create_product_category |
Create a new product category |
update_product_category |
Update a product category |
delete_product_category |
Delete a product category |
Product Tags
| Method | Description |
|---|---|
get_product_tags |
Retrieve product tags |
get_product_tag |
Get a single product tag |
create_product_tag |
Create a new product tag |
update_product_tag |
Update a product tag |
delete_product_tag |
Delete a product tag |
Product Attributes
| Method | Description |
|---|---|
get_product_attributes |
Retrieve product attributes |
get_product_attribute |
Get a single product attribute |
create_product_attribute |
Create a new product attribute |
update_product_attribute |
Update a product attribute |
delete_product_attribute |
Delete a product attribute |
batch_update_product_attributes |
Batch update product attributes |
Product Variations
| Method | Description |
|---|---|
get_product_variations |
Retrieve product variations |
get_product_variation |
Get a single product variation |
create_product_variation |
Create a new product variation |
update_product_variation |
Update a product variation |
delete_product_variation |
Delete a product variation |
Product Reviews
| Method | Description |
|---|---|
get_product_reviews |
Retrieve product reviews |
get_product_review |
Get a single product review |
create_product_review |
Create a new product review |
update_product_review |
Update a product review |
delete_product_review |
Delete a product review |
WooCommerce Orders
| Method | Description |
|---|---|
get_orders |
Retrieve a list of orders |
get_order |
Get a single order by ID |
create_order |
Create a new order |
update_order |
Update an existing order |
delete_order |
Delete an order |
get_order_meta |
Get order metadata |
create_order_meta |
Create/update order metadata |
update_order_meta |
Update order metadata (alias for create) |
delete_order_meta |
Delete order metadata |
Order Notes
| Method | Description |
|---|---|
get_order_notes |
Retrieve order notes |
get_order_note |
Get a single order note |
create_order_note |
Create a new order note |
delete_order_note |
Delete an order note |
Order Refunds
| Method | Description |
|---|---|
get_order_refunds |
Retrieve order refunds |
get_order_refund |
Get a single order refund |
create_order_refund |
Create a new order refund |
delete_order_refund |
Delete an order refund |
WooCommerce Customers
| Method | Description |
|---|---|
get_customers |
Retrieve a list of customers |
get_customer |
Get a single customer by ID |
create_customer |
Create a new customer |
update_customer |
Update an existing customer |
delete_customer |
Delete a customer |
get_customer_meta |
Get customer metadata |
create_customer_meta |
Create/update customer metadata |
update_customer_meta |
Update customer metadata (alias for create) |
delete_customer_meta |
Delete customer metadata |
Shipping
| Method | Description |
|---|---|
get_shipping_zones |
Retrieve shipping zones |
get_shipping_zone |
Get a single shipping zone |
create_shipping_zone |
Create a new shipping zone |
update_shipping_zone |
Update a shipping zone |
delete_shipping_zone |
Delete a shipping zone |
get_shipping_methods |
Retrieve shipping methods |
get_shipping_zone_methods |
Get shipping methods for a zone |
create_shipping_zone_method |
Create a new shipping method for a zone |
update_shipping_zone_method |
Update a shipping method for a zone |
delete_shipping_zone_method |
Delete a shipping method from a zone |
get_shipping_zone_locations |
Get locations for a shipping zone |
update_shipping_zone_locations |
Update locations for a shipping zone |
Taxes
| Method | Description |
|---|---|
get_tax_classes |
Retrieve tax classes |
create_tax_class |
Create a new tax class |
delete_tax_class |
Delete a tax class |
get_tax_rates |
Retrieve tax rates |
get_tax_rate |
Get a single tax rate |
create_tax_rate |
Create a new tax rate |
update_tax_rate |
Update a tax rate |
delete_tax_rate |
Delete a tax rate |
Discounts/Coupons
| Method | Description |
|---|---|
get_coupons |
Retrieve coupons |
get_coupon |
Get a single coupon |
create_coupon |
Create a new coupon |
update_coupon |
Update a coupon |
delete_coupon |
Delete a coupon |
Payment Gateways
| Method | Description |
|---|---|
get_payment_gateways |
Retrieve payment gateways |
get_payment_gateway |
Get a single payment gateway |
update_payment_gateway |
Update a payment gateway |
Reports
| Method | Description |
|---|---|
get_sales_report |
Retrieve sales reports |
get_products_report |
Retrieve products reports |
get_orders_report |
Retrieve orders reports |
get_categories_report |
Retrieve categories reports |
get_customers_report |
Retrieve customers reports |
get_stock_report |
Retrieve stock reports |
get_coupons_report |
Retrieve coupons reports |
get_taxes_report |
Retrieve taxes reports |
Settings
| Method | Description |
|---|---|
get_settings |
Retrieve all settings |
get_setting_options |
Retrieve options for a setting |
update_setting_option |
Update a setting option |
System Status
| Method | Description |
|---|---|
get_system_status |
Retrieve system status |
get_system_status_tools |
Retrieve system status tools |
run_system_status_tool |
Run a system status tool |
Data
| Method | Description |
|---|---|
get_data |
Retrieve store data |
get_continents |
Retrieve continents data |
get_countries |
Retrieve countries data |
get_currencies |
Retrieve currencies data |
get_current_currency |
Get the current currency |
Method Parameters
All methods follow a similar parameter structure. Here are some examples:
Common Parameters for All Methods
siteUrl: (optional if set in env) WordPress site URL
Additional Parameters for WooCommerce Methods
consumerKey: (optional if set in env) WooCommerce consumer keyconsumerSecret: (optional if set in env) WooCommerce consumer secret
Additional Parameters for WordPress Methods
username: (optional if set in env) WordPress usernamepassword: (optional if set in env) WordPress password
Example Usage
WordPress API Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_post",
"params": {
"siteUrl": "https://your-wordpress-site.com",
"username": "your-wordpress-username",
"password": "your-wordpress-password",
"title": "My New Blog Post",
"content": "This is the content of my new blog post.",
"status": "publish"
}
}
WooCommerce Products Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_products",
"params": {
"perPage": 20,
"page": 1,
"filters": {
"category": 19,
"status": "publish"
}
}
}
Create Product Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_product",
"params": {
"productData": {
"name": "Premium T-Shirt",
"type": "simple",
"regular_price": "29.99",
"description": "Comfortable cotton t-shirt, available in various sizes.",
"short_description": "Premium quality t-shirt.",
"categories": [
{
"id": 19
}
],
"images": [
{
"src": "http://example.com/wp-content/uploads/2022/06/t-shirt.jpg"
}
]
}
}
}
Product Metadata Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_product_meta",
"params": {
"productId": 456,
"metaKey": "_custom_product_field",
"metaValue": {
"special_attribute": "value",
"another_attribute": 42
}
}
}
Order Metadata Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_order_meta",
"params": {
"orderId": 789,
"metaKey": "_delivery_instructions",
"metaValue": "Leave package at the back door"
}
}
Requirements
- Node.js 20.0.0 or higher
- WordPress site with WooCommerce plugin installed
- WooCommerce REST API keys
License
MIT License - See LICENSE file for details
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。