woocommerce-mcp-server
Integrates with WooCommerce to provide tools for fetching recent orders and retrieving order details by ID.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@woocommerce-mcp-servershow me the 5 most recent orders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
WooCommerce MCP Server
A Model Context Protocol (MCP) server for integrating WooCommerce with Claude and other AI assistants.
Overview
This server provides tools for AI assistants to interact with a WooCommerce store, allowing them to:
Fetch recent orders with optional filtering
Retrieve detailed information about specific orders by ID
The server implements the Model Context Protocol specification, making it compatible with MCP-enabled AI assistants like Claude for Desktop.
Related MCP server: WooCommerce MCP Server
Prerequisites
Node.js v18 or higher
A WooCommerce store with REST API access
WooCommerce API credentials (consumer key and secret)
Installation
Clone this repository:
git clone https://github.com/techspawn/woocommerce-mcp-server.git
cd woocommerce-mcp-serverInstall dependencies:
npm installConfiguration
You need to configure your WooCommerce API credentials. You can do this by:
Setting environment variables when running the server:
WOOCOMMERCE_URL=https://your-store.com \
WOOCOMMERCE_CONSUMER_KEY=your-consumer-key \
WOOCOMMERCE_CONSUMER_SECRET=your-consumer-secret \
node index.jsOr by editing the default values in the
index.jsfile:
const woocommerceConfig = {
url: process.env.WOOCOMMERCE_URL || 'https://your-store.com',
consumerKey: process.env.WOOCOMMERCE_CONSUMER_KEY || 'your-consumer-key',
consumerSecret: process.env.WOOCOMMERCE_CONSUMER_SECRET || 'your-consumer-secret',
version: 'wc/v3'
};Running the Server
To run the server directly:
node index.jsOr using the npm script:
npm startIntegration with Claude for Desktop
To connect this server to Claude for Desktop:
Make sure you have Claude for Desktop installed
Open your Claude Desktop configuration file located at:
Windows:
%USERPROFILE%\AppData\Roaming\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add your WooCommerce MCP server configuration (create the file if it doesn't exist):
{
"mcpServers": {
"woocommerce": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/woocommerce-mcp-server/index.js"
],
"env": {
"WOOCOMMERCE_URL": "https://your-store.com",
"WOOCOMMERCE_CONSUMER_KEY": "your-consumer-key",
"WOOCOMMERCE_CONSUMER_SECRET": "your-consumer-secret"
}
}
}
}Save the file and restart Claude for Desktop
Available Tools
getRecentOrders
Fetches a list of recent orders from your WooCommerce store.
Parameters:
status(optional): Filter orders by status (e.g., "processing", "completed", "on-hold")limit(optional, default: 5): Number of orders to return
getOrderById
Retrieves detailed information about a specific order.
Parameters:
id: The order ID to retrieve
Building Your Own MCP Server with JavaScript
This section provides a guide to creating your own MCP server using JavaScript/Node.js.
1. Set up a new project
mkdir my-mcp-server
cd my-mcp-server
npm init -y2. Install dependencies
npm install @modelcontextprotocol/sdk axios zod3. Create your server file (index.js)
Start with the basic structure:
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
// Initialize server
const server = new McpServer({
name: "My MCP Service",
version: "1.0.0",
});
// Define and register your tools
server.tool(
"myToolName",
{
// Define parameters using Zod schemas
param1: z.string().describe("Description of param1"),
param2: z.number().optional().describe("Optional parameter")
},
async ({ param1, param2 }) => {
// Tool implementation logic here
const result = `Processed ${param1} with value ${param2 || 'none'}`;
// Return result in the expected format
return {
content: [
{
type: "text",
text: result
}
]
};
}
);
// Connect the server
const transport = new StdioServerTransport();
await server.connect(transport);4. Make your package.json ES module compatible
{
"type": "module",
"scripts": {
"start": "node index.js"
}
}5. Define tools
MCP tools are defined with three components:
Name: A unique identifier for the tool
Parameters: Schema for input parameters (using Zod)
Handler: Async function that processes the inputs and returns results
Example:
server.tool(
"calculateTotal",
{
items: z.array(
z.object({
name: z.string(),
price: z.number(),
quantity: z.number().int().positive()
})
).describe("Array of items to calculate total for")
},
async ({ items }) => {
const total = items.reduce((sum, item) => sum + (item.price * item.quantity), 0);
return {
content: [
{
type: "text",
text: `Total: $${total.toFixed(2)}`
}
]
};
}
);6. Testing locally
You can test your MCP server locally using the stdio transport:
node index.js7. Debugging tips
Use
console.error()for debugging, notconsole.log()which interferes with stdio transportCheck the logs in Claude for Desktop for errors
Ensure your tool handlers properly handle exceptions
Resources
License
MIT
Available Tools
2 toolsgetOrderByIdD
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The order ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getRecentOrdersD
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Get orders after this date (format: YYYY-MM-DD) | |
| limit | No | Number of orders to return (use 0 for unlimited) | |
| before | No | Get orders before this date (format: YYYY-MM-DD) | |
| status | No | Filter orders by status (e.g., processing, completed, on-hold) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The two tools are clearly distinct: one retrieves recent orders, the other retrieves a single order by ID. There is no overlap in their purposes.
Both tools follow a consistent camelCase verb_noun pattern (getRecentOrders, getOrderById), making naming predictable.
With only 2 tools for a WooCommerce server, the tool surface is far too thin for the typical scope of e-commerce operations.
The server only provides order retrieval, missing critical CRUD operations for orders, products, customers, and other WooCommerce entities.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Scans self-hosted WooCommerce stores for AI-agent readiness and exposes a live MCP product catalog.
Manage your NanoCart store from any AI agent: products, orders, coupons, subscribers, reports.
Enable AI assistants to interact seamlessly with Feeef e-commerce stores, products, and orders usi…
Agentic commerce gateway: discovery, search, checkout across Shopify/Woo/Odoo/PrestaShop.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with WooCommerce stores through the REST API. Supports product search, order management, and e-commerce operations through natural language commands.
- FlicenseNot gradedqualityDmaintenanceEnables interaction with WooCommerce stores through the WordPress REST API, supporting comprehensive management of products, orders, customers, shipping, taxes, discounts, and store configuration.
- FlicenseNot gradedqualityCmaintenanceEnables AI to view and manage e-commerce data such as products, orders, and coupons, and perform actions like updating prices, stock, and generating sales reports.
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage WooCommerce stores, including products, orders, customers, categories, coupons, attributes, variations, order notes, refunds, reports, payment gateways, meta data, reviews, settings, data, posts, and system status through natural language.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/opestro/woocommerce-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server