WordPress MCP

A Model Context Protocol (MCP) server that gives AI agents full control over WordPress sites. 46 tools for posts, pages, media, SEO, comments, redirects, blocks, patterns, TablePress, and more.

WordPress MCP

A Model Context Protocol (MCP) server that gives AI agents full control over WordPress sites. Manage posts, pages, media, categories, tags, comments, SEO, redirects, Gutenberg blocks, reusable patterns, TablePress tables, plugins, users, and site settings — all through 46 MCP tools.

Built for Claude Code. Also compatible with the Claude Agent SDK and any MCP-capable client.

How It Works

┌─────────────┐     JSON-RPC      ┌──────────────────┐     HTTP/Auth     ┌─────────────────┐
│  Claude /    │ ──────────────▶  │  Python MCP      │ ──────────────▶  │  WordPress Site  │
│  AI Agent    │                  │  Proxy Server    │                  │  (MCP Adapter)   │
│              │ ◀──────────────  │  (server.py)     │ ◀──────────────  │  (mu-plugin)     │
└─────────────┘     MCP Tools     └──────────────────┘     JSON-RPC     └─────────────────┘
                                         │
                                    sites.json
                                  (multi-site config)

A single Python proxy handles unlimited WordPress sites. Each tool call includes a site parameter to target a specific site. Authentication uses WordPress Application Passwords (built into WP 5.6+).

Features

CategoryToolsCapabilities
Posts & Pages9 toolsCRUD, bulk status change, revisions, search & replace
Categories & Tags8 toolsCRUD with Rank Math SEO support
Media4 toolsUpload from URL, browse library, update metadata, delete
Comments3 toolsList, moderate (approve/spam/trash), reply, delete
Rank Math SEOFull SEO metadata on posts and categories (title, description, focus keyword, Open Graph, Twitter, schema, robots)
Redirections4 toolsRank Math redirect CRUD (301/302/307/410/451)
Gutenberg Blocks1 toolDiscover all registered block types with attribute schemas
Synced Patterns5 toolsCreate, read, update, delete reusable blocks
TablePress5 toolsFull table CRUD with display options and visibility
Plugins2 toolsList installed plugins, activate/deactivate
Users1 toolList users with role filtering
Settings3 toolsRead/write options, flush caches, get site info
Utility1 toolList all configured sites

Total: 46 tools covering the full WordPress management surface.

Quick Start

1. Install the WordPress adapter

# Build PHP dependencies locally
cd wordpress/
composer install

# Upload vendor/ and load-mcp-adapter.php to your WordPress server
# See SETUP.md for detailed instructions

2. Configure the proxy

# Copy the example config
cp sites.json.example sites.json

# Edit with your site details
{
  "myblog": {
    "url": "https://yourdomain.com/wp-json/mcp/mcp-adapter-default-server",
    "username": "YourAdmin",
    "password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  }
}

3. Connect to Claude

Claude Code — add to ~/.claude.json (or ask your Claude Code agent to set it up for you):

{
  "mcpServers": {
    "wordpress": {
      "type": "stdio",
      "command": "uv",
      "args": [
        "run",
        "--with", "fastmcp",
        "--with", "httpx",
        "python",
        "/path/to/wordpress-mcp/server.py"
      ]
    }
  }
}

Then install the skill for tool documentation:

npx skills add 5unnykum4r/wordpress-mcp

Or manually symlink:

ln -s /path/to/wordpress-mcp/skill/wordpress-mcp ~/.claude/skills/wordpress-mcp

See the full setup guide for detailed instructions, troubleshooting, and usage examples.

Tool Reference

All tools require site as the first parameter.

ToolAction
list_postsList/filter posts and pages
read_postRead full content, metadata, SEO
create_postCreate with content, categories, tags, SEO
update_postPartial update any fields
delete_postTrash or permanently delete
bulk_update_statusChange status of multiple posts
list_revisionsView revision history
restore_revisionRevert to a previous revision
search_replaceFind/replace across content (dry run supported)
ToolAction
list_categoriesList with Rank Math SEO data
create_categoryCreate with optional SEO
update_categoryUpdate name, slug, parent, SEO
delete_categoryDelete (posts move to default)
list_tagsList and search tags
create_tagCreate a new tag
update_tagUpdate tag name, slug, description
delete_tagRemove a tag (posts are untagged)
ToolAction
upload_imageDownload from URL and add to media library
list_mediaBrowse with mime type filtering
update_mediaUpdate title, alt text, caption
delete_mediaPermanently delete
ToolAction
list_commentsFilter by post, status, search
update_commentApprove, spam, trash, or reply
delete_commentPermanently delete
ToolAction
list_redirectionsList Rank Math redirects
create_redirectionCreate 301/302/307/410/451 redirect
update_redirectionModify source, destination, type
delete_redirectionRemove a redirect rule
ToolAction
list_block_typesDiscover registered blocks + schemas
list_patternsList reusable/synced patterns
read_patternRead pattern block content
create_patternCreate synced pattern
update_patternUpdate pattern content
delete_patternDelete a pattern
ToolAction
list_tablepress_tablesList all tables
read_tablepress_tableRead data, options, visibility
create_tablepress_tableCreate with 2D data array
update_tablepress_tableUpdate data, options, visibility
delete_tablepress_tablePermanently delete
ToolAction
list_pluginsList installed plugins + status
toggle_pluginActivate or deactivate
list_usersList users by role
manage_optionsRead/write WordPress settings
clear_cacheFlush all caches
get_infoSite info, versions, theme
list_sitesShow configured sites

Project Structure

wordpress-mcp/
├── README.md                  ← This file
├── SETUP.md                   ← Full setup guide + troubleshooting
├── LICENSE                    ← MIT license
├── server.py                  ← Python MCP proxy (FastMCP + httpx)
├── sites.json.example         ← Site configuration template
├── wordpress/
│   ├── load-mcp-adapter.php   ← WordPress MU-plugin (server-side)
│   ├── composer.json          ← PHP dependencies
│   └── composer.lock
└── skill/
    └── wordpress-mcp/         ← Claude Code skill
        ├── SKILL.md
        └── references/        ← Tool documentation (7 files)

Requirements

Local (proxy server):

  • Python 3.10+
  • uv package manager
  • FastMCP and httpx (installed automatically by uv run)

WordPress server:

  • WordPress 5.6+ (for Application Passwords)
  • PHP 7.4+
  • Composer packages: wordpress/abilities-api and wordpress/mcp-adapter

Multi-Site Management

Add as many WordPress sites as you need to sites.json:

{
  "blog": {
    "url": "https://blog.example.com/wp-json/mcp/mcp-adapter-default-server",
    "username": "admin",
    "password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  },
  "shop": {
    "url": "https://shop.example.com/wp-json/mcp/mcp-adapter-default-server",
    "username": "admin",
    "password": "yyyy yyyy yyyy yyyy yyyy yyyy"
  },
  "docs": {
    "url": "https://docs.example.com/wp-json/mcp/mcp-adapter-default-server",
    "username": "editor",
    "password": "zzzz zzzz zzzz zzzz zzzz zzzz"
  }
}

Each site gets its own alias. Target any site with site="blog", site="shop", etc. No proxy restart needed when adding new sites.

Contributing

Contributions are welcome. Please open an issue or pull request.

License

MIT

Related Servers