Provides tools for interacting with WooCommerce REST API, enabling management of products (search, list), orders (create, retrieve, list with filters), and e-commerce operations through the WooCommerce platform.
MCP WooCommerce Server
A Model Context Protocol (MCP) server that provides tools to interact with WooCommerce REST API.
Features
Search Products: Search for products by name or SKU
List Products: Retrieve all products with pagination
Create Orders: Create new orders with line items
Get Orders: Retrieve specific orders by ID
List Orders: List orders with optional filters
Setup
Clone this repository
Copy
.env.exampleto.envand fill in your WooCommerce API credentials:WOO_URL=https://yourstore.com WOO_CONSUMER_KEY=your_consumer_key WOO_CONSUMER_SECRET=your_consumer_secretGet your WooCommerce API credentials:
Go to WooCommerce > Settings > Advanced > REST API
Create a new key with read/write permissions
Copy the Consumer Key and Consumer Secret
Running Locally
With Docker Compose
With Python
API Endpoints
The server exposes the following MCP tools:
search_products(query: str, per_page: int = 10)- Search productslist_products(per_page: int = 20, page: int = 1)- List all productscreate_order(customer_id: int, line_items: List[Dict], billing: Dict, shipping: Optional[Dict])- Create orderget_order(order_id: int)- Get specific orderlist_orders(customer_id: Optional[int], status: Optional[str], per_page: int = 10)- List orders
WooCommerce API Requirements
WooCommerce 3.5+
WordPress 4.4+
Pretty permalinks enabled
REST API enabled (default)
Testing the MCP Server
Using the Example Clients
The project includes example MCP clients to test the server:
Simple Tool Lister
This script connects to the MCP server and lists all available tools with their descriptions and parameters.
Complete Example Client
This comprehensive client demonstrates:
Connecting to the MCP server
Listing tools, resources, and prompts
Calling tools (
list_productsandsearch_products)Handling structured responses
Manual Testing
You can also test the server manually using curl:
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables interaction with WooCommerce stores through the REST API. Supports product search, order management, and e-commerce operations through natural language commands.