mcpField
W
WooCommerce MCP Server (HTTP/Express)

WooCommerce MCP Server (HTTP/Express)

Local
github.com/Vostos007Developer Tools0Updated 80w ago

About 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

  1. 01JSON-RPC 2.0 over HTTP
  2. 02List products
  3. 03Retrieve a product by ID
  4. 04Update product descriptions

Use cases

  1. 01Request a product list with curl
  2. 02Look up a product by ID
  3. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

WooCommerce MCP Server (HTTP/Express)

This server provides a JSON-RPC 2.0 interface over HTTP to interact with WooCommerce.

Setup

  1. Clone the repository (if not already done).
  2. Navigate to the directory:
    cd woocommerce-mcp-server-http
    
  3. Install dependencies:
    npm install
    
  4. Create .env file: Create a file named .env in 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

Markdown supported

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.