WooCommerce MCP Server (HTTP/Express)
LocalAbout WooCommerce MCP Server (HTTP/Express)
An HTTP server example that provides a JSON-RPC 2.0 interface for WooCommerce product operations. It demonstrates listing, retrieving, and updating products, but its WooCommerce request handler is still a placeholder.
Key features
- 01JSON-RPC 2.0 over HTTP
- 02List products
- 03Retrieve a product by ID
- 04Update product descriptions
Use cases
- 01Request a product list with curl
- 02Look up a product by ID
- 03Submit a product description update
MCP support
The server exposes an HTTP JSON-RPC endpoint for MCP clients. Its WooCommerce request handler is currently a placeholder, so actual integration is not implemented.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEWooCommerce MCP Server (HTTP/Express)
This server provides a JSON-RPC 2.0 interface over HTTP to interact with WooCommerce.
Setup
- Clone the repository (if not already done).
- Navigate to the directory:
cd woocommerce-mcp-server-http - Install dependencies:
npm install - Create
.envfile: Create a file named.envin this directory and add the following variables, replacing placeholder values with your actual credentials:# URL вашего WooCommerce WORDPRESS_SITE_URL=https://your-woocommerce-site.com # Ключи WooCommerce API WOOCOMMERCE_CONSUMER_KEY=ck_your_consumer_key WOOCOMMERCE_CONSUMER_SECRET=cs_your_consumer_secret # Порт для MCP сервера (default: 3000) PORT=3000 # Секретный API-ключ для доступа к этому MCP-серверу MCP_API_KEY=your_secret_api_key_here
Running the Server
node server.js
The server will start, and you should see:
✅ MCP HTTP (Express) server listening at http://localhost:3000
RPC Endpoint available at http://localhost:3000/rpc
Usage (Example curl Commands)
Replace your_secret_api_key_here with the value you set for MCP_API_KEY in your .env file.
1. Get Products (first 3):
curl -X POST http://localhost:3000/rpc \
-H "Content-Type: application/json" \
-H "X-API-Key: your_secret_api_key_here" \
-d '{"jsonrpc":"2.0","method":"get_products","params":{"perPage":3},"id":1}'
2. Get Specific Product (ID: 4644):
curl -X POST http://localhost:3000/rpc \
-H "Content-Type: application/json" \
-H "X-API-Key: your_secret_api_key_here" \
-d '{"jsonrpc":"2.0","method":"get_product","params":{"productId":4644},"id":2}'
3. Update Product Description (using payload-http.json):
First, ensure payload-http.json exists with content like:
{
"jsonrpc": "2.0",
"method": "update_product",
"params": {
"productId": 4644,
"productData": {
"description": "This is the updated description."
}
},
"id": 3
}
Then run:
curl -X POST http://localhost:3000/rpc \
-H "Content-Type: application/json" \
-H "X-API-Key: your_secret_api_key_here" \
-d @payload-http.json
(Note: Currently, the server uses a placeholder function handleWooCommerceRequest. Actual WooCommerce integration needs to be implemented there.)
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.