home / mcp / wordpress mcp server

WordPress MCP Server

Exposes WordPress REST tools over stdio for managing posts, CPTs, taxonomies, users, and plugins via MCP clients.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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.

Additional configuration and notes

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" }

Project layout and capabilities

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.

Available tools

list_posts

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.

get_post

Fetch a single post by ID or slug from the WordPress REST API.

create_post

Create a new post with optional categories and tags; supports status overrides for CPTs like drafts.

update_post

Update an existing post's content, metadata, categories, or tags.

delete_post

Remove a post by ID.

list_categories

List, filter, or retrieve categories.

get_category

Fetch a single category by ID or slug.

create_category

Create a new category.

update_category

Update an existing category.

delete_category

Delete a category.

list_tags

List, filter, or retrieve tags.

get_tag

Fetch a single tag by ID or slug.

create_tag

Create a new tag.

update_tag

Update an existing tag.

delete_tag

Delete a tag.