home / mcp / wordpress mcp server
Exposes WordPress REST tools over stdio for managing posts, CPTs, taxonomies, users, and plugins via MCP clients.
Configuration
View docs{
"mcpServers": {
"jahzlariosa-wordpress-mcp": {
"command": "node",
"args": [
"/absolute/path/to/server.mjs"
],
"env": {
"WP_URL": "https://your-site.example",
"WP_USER": "your-username",
"WP_APP_PASS": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}This minimal MCP server exposes WordPress REST tools over stdio, enabling you to manage posts, pages, categories, tags, users, plugins, and dynamic CPT routing directly from your MCP host. It is designed to run alongside your MCP infrastructure so you can drive WordPress content and configurations with MCP clients.
You run the WordPress MCP server as a local stdio service under your MCP host. Start it, and your MCP client can issue tools to interact with WordPress entities such as posts, categories, tags, and users. For non-standard post types, use the CPT routing by passing the type or post_type parameter to target the correct REST base.
Common actions include listing posts, creating posts, updating posts, and deleting posts, as well as performing the same operations for taxonomies like categories and tags. The server also supports dynamic routing for custom post types and status overrides when creating posts so you can draft or publish CPT entries directly.
Prerequisites: Node.js 18+ and a WordPress application password with REST access.
npm install
```
```env
WP_URL="https://your-site.example"
WP_USER="your-username"
WP_APP_PASS="your-app-password"Start the server with the runtime command shown in the setup example.
The server runs over stdio. Configure your MCP host to launch the server process with the required environment variables set so the WordPress REST client can authenticate against your WordPress site.
If your MCP host uses a TOML config to register MCP servers, add an entry that launches the server with the Node runtime and passes the environment values. The example below demonstrates the required structure and environment passing.
[mcp.servers.WordPressMCP]
command = "node"
args = ["/absolute/path/to/server.mjs"]
env = { WP_URL = "https://your-site.example", WP_USER = "your-username", WP_APP_PASS = "xxxx xxxx xxxx xxxx xxxx xxxx" }Key components include the main entrypoint server.mjs, a configuration parser, a WordPress REST client, utilities for query and form handling, a cached CPT resolver, and a collection of tool modules for interacting with WordPress data.
Retrieve a list of posts with optional filters such as categories and tags; supports CPT routing by type/post_type for non-standard content blocks.
Fetch a single post by ID or slug from the WordPress REST API.
Create a new post with optional categories and tags; supports status overrides for CPTs like drafts.
Update an existing post's content, metadata, categories, or tags.
Remove a post by ID.
List, filter, or retrieve categories.
Fetch a single category by ID or slug.
Create a new category.
Update an existing category.
Delete a category.
List, filter, or retrieve tags.
Fetch a single tag by ID or slug.
Create a new tag.
Update an existing tag.
Delete a tag.