WO
OfficialSecurity

WooCommerce MCP Server WordPress Plugin

Enable an MCP server for WooCommerce with WordPress plugin supporting STDIO, HTTP streaming and optional JWT authentication based on official MCP.

Quick Install
npx -y @iOSDevSK/mcp-for-woocommerce

Overview

This plugin turns a WooCommerce-powered WordPress site into a read-only MCP (Model Context Protocol) server so AI assistants and agents can query your store data safely. It implements the official WordPress MCP patterns and exposes product catalogs, categories, reviews, shipping settings and public WordPress content through two transport options: legacy STDIO-style WordPress transport and a modern Streamable HTTP (JSON‑RPC 2.0) transport.

Use it to connect chatbots, Claude, VS Code MCP clients or custom agents directly to your shop data. The plugin focuses on secure, read-only access (no writes, no customer PII) and supports optional JWT authentication for production deployments while offering a developer-friendly local mode for quick testing.

Features

  • Read-only MCP server for WooCommerce and WordPress
  • Two transport modes:
    • STDIO WordPress style endpoint (compatible with Automattic proxies)
    • Streamable HTTP transport using JSON-RPC 2.0 (low-latency)
  • Optional JWT authentication (recommended for production)
  • Admin UI to enable/disable tools and manage JWT tokens
  • Returns permalinks for products/variations so AI responses can include clickable links
  • Exposes: products, variations, categories, tags, attributes, reviews, shipping/payment/tax settings, WordPress posts/pages, system status
  • OpenAPI (for streamable transport) to assist client integrations
  • Safe defaults: read-only, no customer or private data exposed

Architecture & Endpoints

The plugin provides two main MCP endpoints. Use the Streamable HTTP transport for modern clients; STDIO endpoint is useful for compatibility with existing WordPress proxies.

TransportEndpointAuthenticationNotes
STDIO (WordPress format)/wp-json/wp/v2/wpmcpJWT optional (dev mode)Compatible with @automattic/mcp-wordpress-remote
Streamable HTTP (JSON-RPC 2.0)/wp-json/wp/v2/wpmcp/streamableJWT recommendedLow latency; includes OpenAPI at /wp-json/wp/v2/wpmcp/openapi.json

Authentication: generate JWT tokens from the plugin admin UI. When JWT enforcement is disabled the plugin can auto-generate a local proxy script to help connect Claude Desktop and other local clients.

Installation / Configuration

Requirements:

  • WordPress 6.4+
  • PHP 8.0+
  • WooCommerce active
  • Node.js & Composer required only for development or rebuilding the admin UI

Quick install (Admin UI):

  1. Download latest ZIP from the repository or Releases.
  2. In WordPress admin: Plugins → Add New → Upload Plugin → Select ZIP → Install and Activate.
  3. Go to Settings → MCP for WooCommerce to enable the plugin and configure tools and authentication.

Manual / Development commands:

# Production: upload and activate ZIP via WP admin

# Development: clone and build
cd wp-content/plugins/
git clone https://github.com/iOSDevSK/mcp-for-woocommerce.git
cd mcp-for-woocommerce
composer install
npm install
npm run build

Enabling JWT and creating a token:

  1. Settings → MCP for WooCommerce → Require JWT Authentication (toggle on).
  2. Generate a token in Authentication Tokens and copy it for your client.

Example: curl to the Streamable endpoint with JWT:

curl -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"mcp.listTools","params":{},"id":1}' \
  https://your-site.com/wp-json/wp/v2/wpmcp/streamable

Example: add to Claude CLI (HTTP + JWT)

claude mcp add --transport http \
  mcp-for-woocommerce https://your-site.com/wp-json/wp/v2/wpmcp/streamable \
  --header "Authorization: Bearer YOUR_JWT"

Available Resources (Tools)

The plugin exposes a set of read-only “tools” (resources) useful to AI agents:

  • Products and variations (with permalinks)
  • Categories, tags, attributes
  • Product reviews and ratings
  • Shipping methods, payment gateways, taxes (configuration/status)
  • WordPress posts and pages (public content)
  • System health/status endpoint Each tool returns structured JSON suited for MCP clients; permalinks are included to let assistants supply clickable links in responses.

Use Cases

  • AI Shopping Assistant: connect a conversational agent to answer product questions, suggest variations, and provide links to product pages.
  • Site Search augmentation: feed product metadata to an agent that can craft rich search responses with direct links.
  • Internal tooling: allow a VS Code or custom MCP client to query store configuration, product lists and posts for development or auditing.
  • Rapid prototyping: run locally with proxy mode (JWT disabled) for Claude Desktop or inspector tools to iterate quickly.

Concrete example: Customer asks “Do you have size 10 running shoes under $100?” An MCP-enabled agent can search products, filter variations for size and price, and return a list of matching products with permalinks so the user can click through.

Security & Best Practices

  • Use JWT authentication for production; rotate tokens regularly and scope expirations appropriately.
  • The plugin exposes only public, read-only data. It’s designed to avoid leaking customer PII or private store data.
  • Test integrations in local/dev mode before enabling JWT enforcement and connecting public AI clients.

Troubleshooting & Next Steps

  • If a client can’t connect, verify WP REST routes are reachable and JWT header is correct.
  • Use the OpenAPI JSON for the streamable transport to inspect available methods.
  • For proxy-based setups (STDIO), use @automattic/mcp-wordpress-remote as documented by Automattic for best compatibility.

This plugin is intended for developers looking to integrate AI agents with WooCommerce using the Model Context Protocol. Follow the installation steps, enable the tools you need, and secure your endpoints with JWT when exposing them beyond local development.