
WordPress MCP
β 2from 5unnykum4r
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
| Category | Tools | Capabilities |
|---|---|---|
| Posts & Pages | 9 tools | CRUD, bulk status change, revisions, search & replace |
| Categories & Tags | 8 tools | CRUD with Rank Math SEO support |
| Media | 4 tools | Upload from URL, browse library, update metadata, delete |
| Comments | 3 tools | List, moderate (approve/spam/trash), reply, delete |
| Rank Math SEO | β | Full SEO metadata on posts and categories (title, description, focus keyword, Open Graph, Twitter, schema, robots) |
| Redirections | 4 tools | Rank Math redirect CRUD (301/302/307/410/451) |
| Gutenberg Blocks | 1 tool | Discover all registered block types with attribute schemas |
| Synced Patterns | 5 tools | Create, read, update, delete reusable blocks |
| TablePress | 5 tools | Full table CRUD with display options and visibility |
| Plugins | 2 tools | List installed plugins, activate/deactivate |
| Users | 1 tool | List users with role filtering |
| Settings | 3 tools | Read/write options, flush caches, get site info |
| Utility | 1 tool | List all configured sites |
Total: 46 tools covering the full WordPress management surface.
Tool Reference
All tools require site as the first parameter.
| Tool | Action |
|---|---|
list_posts | List/filter posts and pages |
read_post | Read full content, metadata, SEO |
create_post | Create with content, categories, tags, SEO |
update_post | Partial update any fields |
delete_post | Trash or permanently delete |
bulk_update_status | Change status of multiple posts |
list_revisions | View revision history |
restore_revision | Revert to a previous revision |
search_replace | Find/replace across content (dry run supported) |
| Tool | Action |
|---|---|
list_categories | List with Rank Math SEO data |
create_category | Create with optional SEO |
update_category | Update name, slug, parent, SEO |
delete_category | Delete (posts move to default) |
list_tags | List and search tags |
create_tag | Create a new tag |
update_tag | Update tag name, slug, description |
delete_tag | Remove a tag (posts are untagged) |
| Tool | Action |
|---|---|
upload_image | Download from URL and add to media library |
list_media | Browse with mime type filtering |
update_media | Update title, alt text, caption |
delete_media | Permanently delete |
| Tool | Action |
|---|---|
list_comments | Filter by post, status, search |
update_comment | Approve, spam, trash, or reply |
delete_comment | Permanently delete |
| Tool | Action |
|---|---|
list_redirections | List Rank Math redirects |
create_redirection | Create 301/302/307/410/451 redirect |
update_redirection | Modify source, destination, type |
delete_redirection | Remove a redirect rule |
| Tool | Action |
|---|---|
list_block_types | Discover registered blocks + schemas |
list_patterns | List reusable/synced patterns |
read_pattern | Read pattern block content |
create_pattern | Create synced pattern |
update_pattern | Update pattern content |
delete_pattern | Delete a pattern |
| Tool | Action |
|---|---|
list_tablepress_tables | List all tables |
read_tablepress_table | Read data, options, visibility |
create_tablepress_table | Create with 2D data array |
update_tablepress_table | Update data, options, visibility |
delete_tablepress_table | Permanently delete |
| Tool | Action |
|---|---|
list_plugins | List installed plugins + status |
toggle_plugin | Activate or deactivate |
list_users | List users by role |
manage_options | Read/write WordPress settings |
clear_cache | Flush all caches |
get_info | Site info, versions, theme |
list_sites | Show 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)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
npx skills add 5unnykum4r/wordpress-mcpQuick 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 instructions2. 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-mcpOr manually symlink:
ln -s /path/to/wordpress-mcp/skill/wordpress-mcp ~/.claude/skills/wordpress-mcpSee the full setup guide for detailed instructions, troubleshooting, and usage examples.
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-apiandwordpress/mcp-adapter
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.