Techspawn Solutions/woocommerce-mcp-server
Built by Metorial, the integration platform for agentic AI.
Techspawn Solutions/woocommerce-mcp-server
Server Summary
Manage products
Process orders
Handle customer inquiries
Configure shipping settings
Apply discounts
Manage store configuration
Handle taxes
A Model Context Protocol (MCP) server for WooCommerce integration, compatible with Windows, macOS, and Linux.
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.
npm install
npm run build
Add the server to your MCP settings file with environment variables for credentials:
{
"mcpServers": {
"woocommerce": {
"command": "node",
"args": ["path/to/build/index.js"],
"env": {
"WORDPRESS_SITE_URL": "https://your-wordpress-site.com",
"WOOCOMMERCE_CONSUMER_KEY": "your-woocommerce-consumer-key",
"WOOCOMMERCE_CONSUMER_SECRET": "your-woocommerce-consumer-secret",
"WORDPRESS_USERNAME": "your-wordpress-username",
"WORDPRESS_PASSWORD": "your-wordpress-password"
}
}
}
}
WORDPRESS_SITE_URL
: Your WordPress site URL (WooCommerce is a WordPress plugin)WOOCOMMERCE_CONSUMER_KEY
: WooCommerce REST API consumer keyWOOCOMMERCE_CONSUMER_SECRET
: WooCommerce REST API consumer secretWORDPRESS_USERNAME
: WordPress username with appropriate permissionsWORDPRESS_PASSWORD
: WordPress password for authenticationYou can also provide these credentials in the request parameters if you prefer not to use environment variables.
WooCommerce API access requires consumer keys that you can generate in your WordPress dashboard under WooCommerce → Settings → Advanced → REST API.
For WordPress-specific methods (like managing posts), you need to provide:
The server supports both WordPress and WooCommerce API methods. Here's a list of available methods grouped by category:
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 |
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 |
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 |
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 |
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 |
get_attribute_terms | Retrieve attribute terms |
get_attribute_term | Get a single attribute term |
create_attribute_term | Create a new attribute term |
update_attribute_term | Update an attribute term |
delete_attribute_term | Delete an attribute term |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Method | Description |
---|---|
get_payment_gateways | Retrieve payment gateways |
get_payment_gateway | Get a single payment gateway |
update_payment_gateway | Update a payment gateway |
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 |
Method | Description |
---|---|
get_settings | Retrieve all settings |
get_setting_options | Retrieve options for a setting |
update_setting_option | Update a setting option |
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 |
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 |
All methods follow a similar parameter structure. Here are some examples:
siteUrl
: (optional if set in env) WordPress site URLconsumerKey
: (optional if set in env) WooCommerce consumer keyconsumerSecret
: (optional if set in env) WooCommerce consumer secretusername
: (optional if set in env) WordPress usernamepassword
: (optional if set in env) WordPress password{
"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"
}
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_products",
"params": {
"perPage": 20,
"page": 1,
"filters": {
"category": 19,
"status": "publish"
}
}
}
{
"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"
}
]
}
}
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_product_meta",
"params": {
"productId": 456,
"metaKey": "_custom_product_field",
"metaValue": {
"special_attribute": "value",
"another_attribute": 42
}
}
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "create_order_meta",
"params": {
"orderId": 789,
"metaKey": "_delivery_instructions",
"metaValue": "Leave package at the back door"
}
}
For WooCommerce REST API access, you need to generate API keys. You can create them in your WordPress dashboard under WooCommerce → Settings → Advanced → REST API.
MIT License - See LICENSE file for details