WordPress MCP Site Management
Manage WordPress sites through a single Python MCP proxy server (wordpress in ~/.claude.json). All tools require a site parameter identifying the target site. Sites are configured in sites.json.
Setup
This skill requires the WordPress MCP server. If the wordpress MCP tools are not yet available, set up the full project from https://github.com/5unnykum4r/wordpress-mcp:
- Clone the repo and install the PHP adapter on your WordPress site (
wordpress/ directory)
- Create a WordPress Application Password and add your site to
sites.json
- Add the MCP server to
~/.claude.json:
{
"mcpServers": {
"wordpress": {
"type": "stdio",
"command": "uv",
"args": ["run", "--with", "fastmcp", "--with", "httpx", "python", "/path/to/wordpress-mcp/server.py"]
}
}
}
See SETUP.md in the repo for the full step-by-step guide.
How It Works
A Python FastMCP server proxies tool calls to any WordPress site:
- Every tool takes
site as the first parameter (e.g. site="myblog")
- The proxy looks up credentials in
sites.json
- Sends JSON-RPC requests to the WordPress MCP adapter endpoint
- Authentication uses WordPress Application Passwords via HTTP Basic Auth
Use list_sites to see all configured sites.
Available Tools
See references/posts.md, references/categories-tags.md, references/media.md, references/comments.md, references/redirections.md, references/admin.md, and references/tablepress.md for full parameter details.
Quick Reference
All tools require site as the first parameter.
| Tool |
Action |
Key Params |
list_posts |
List posts/pages |
status, category, tag, search, post_type, page |
read_post |
Read full post + SEO |
post_id |
create_post |
Create post/page |
title, content, slug, status, author, categories, tags, rank_math |
update_post |
Update post/page |
post_id + any fields to change (incl. author) |
delete_post |
Trash/delete |
post_id, permanent |
bulk_update_status |
Bulk status change |
post_ids[], status |
list_revisions |
Revision history |
post_id |
restore_revision |
Restore revision |
revision_id |
search_replace |
Find/replace in posts |
search, replace, dry_run |
list_categories |
List categories + SEO |
hide_empty, parent, search |
create_category |
Create category |
name, slug, description, parent_id, rank_math |
update_category |
Edit category |
category_id + fields, rank_math |
delete_category |
Delete category |
category_id |
list_tags |
List tags |
hide_empty, search |
create_tag |
Create tag |
name, slug, description |
update_tag |
Edit tag |
tag_id + fields |
delete_tag |
Delete tag |
tag_id |
upload_image |
Upload from URL |
image_url, title, alt_text, filename |
list_media |
Browse media library |
mime_type, search, page |
update_media |
Edit media metadata |
attachment_id, title, alt_text, caption |
delete_media |
Delete media item |
attachment_id |
list_comments |
List comments |
post_id, status, search |
update_comment |
Approve/spam/reply |
comment_id, status, reply |
delete_comment |
Delete comment |
comment_id |
list_redirections |
List Rank Math redirects |
search |
create_redirection |
Create redirect |
from_url, to, type (301/302) |
update_redirection |
Edit redirect |
redirection_id + fields |
delete_redirection |
Delete redirect |
redirection_id |
list_plugins |
List installed plugins |
— |
toggle_plugin |
Activate/deactivate |
plugin, action |
list_users |
List users |
role, search |
manage_options |
Read/write WP settings |
read[], write{} |
clear_cache |
Flush all caches |
— |
get_info |
Site info + stats |
— |
list_block_types |
List Gutenberg blocks |
namespace, custom_only |
list_patterns |
List synced patterns |
search |
read_pattern |
Read pattern content |
pattern_id |
create_pattern |
Create synced pattern |
title, content |
update_pattern |
Update pattern |
pattern_id + fields |
delete_pattern |
Delete pattern |
pattern_id |
list_tablepress_tables |
List TablePress tables |
— |
read_tablepress_table |
Read table data + options |
table_id |
create_tablepress_table |
Create new table |
name, data[][], options |
update_tablepress_table |
Update table |
table_id + any fields |
delete_tablepress_table |
Delete table |
table_id |
list_sites |
Show configured sites |
— |
Rank Math SEO
Posts and categories support a rank_math object on create/update.
Post fields:
title, description, focus_keyword, canonical_url, robots[],
primary_category, pillar_content, breadcrumb_title, schema_type,
og_title, og_description, og_image, twitter_title, twitter_description
Category fields:
title, description, focus_keyword, canonical_url, robots[],
breadcrumb_title, og_title, og_description, og_image,
twitter_title, twitter_description
read_post and list_categories return all Rank Math fields.
Gutenberg Blocks
Post content is stored as Gutenberg block markup. read_post returns the raw block HTML including <!-- wp:block-name --> delimiters. create_post and update_post accept full block markup in the content field — block comments are preserved as-is.
Use list_block_types to discover all registered blocks (core + custom). Pass custom_only=True to see only theme/plugin blocks, or namespace="your-theme" to filter by namespace. Each block entry includes its attribute schema so you can construct valid block markup.
Block markup format:
<!-- wp:namespace/block-name {"attribute":"value"} -->
<div class="wp-block-namespace-block-name">Inner HTML</div>
<!-- /wp:namespace/block-name -->
When updating an existing post's content, always read_post first to get the full block markup, modify the specific blocks, then pass the entire content back.
Common Workflows
Create an optimized post
upload_image(site="myblog", image_url="...") — upload featured image
create_post(site="myblog", title="...", content="...", categories=["Tech"], rank_math={...}) — create with SEO
read_post(site="myblog", post_id=123) — verify
update_post(site="myblog", post_id=123, status="publish") — publish
Bulk SEO audit
list_posts(site="myblog", number=50) — get all published posts
read_post(site="myblog", post_id=X) — check rank_math fields
update_post(site="myblog", post_id=X, rank_math={...}) — fix missing SEO
Manage redirects after slug change
read_post(site="myblog", post_id=123) — get current slug
update_post(site="myblog", post_id=123, slug="new-slug") — change slug
create_redirection(site="myblog", from_url="/old-slug", to="/new-slug", type=301) — redirect
Search and replace
search_replace(site="myblog", search="old text", replace="new text", dry_run=True) — preview
search_replace(site="myblog", search="old text", replace="new text", dry_run=False) — execute
Create a reusable synced pattern
create_pattern(site="myblog", title="CTA Banner", content="<!-- wp:group -->...") — returns ref block markup
- Use the returned
ref_block (e.g. <!-- wp:block {"ref":456} /-->) in any post content
- Updating the pattern auto-updates every post that references it
Create a post with custom Gutenberg blocks
list_block_types(site="myblog", custom_only=True) — discover custom blocks and their attributes
- Build block markup:
<!-- wp:namespace/block-name {"attr":"value"} -->\n<div>...</div>\n<!-- /wp:namespace/block-name -->
create_post(site="myblog", title="...", content="...block markup...", rank_math={...}) — create post
read_post(site="myblog", post_id=123) — verify block content preserved
Edit blocks in an existing post
read_post(site="myblog", post_id=123) — get current block markup from content
- Modify the specific
<!-- wp:... --> blocks in the content string
update_post(site="myblog", post_id=123, content="...updated full content...") — save back
Create and embed a TablePress table
create_tablepress_table(site="myblog", name="Pricing", data=[["Plan","Price"],["Basic","$9"],["Pro","$29"]]) — returns id + shortcode
update_post(site="myblog", post_id=123, content="... [table id=5 /] ...") — embed in post
read_tablepress_table(site="myblog", table_id="5") — verify
Managing Sites
Sites are configured in sites.json:
{
"myblog": {
"url": "https://example.com/wp-json/mcp/mcp-adapter-default-server",
"username": "AdminUsername",
"password": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
To add a new site: install the MCP adapter on the WordPress server (see SETUP.md), create an Application Password, and add an entry to sites.json. No restart needed.
Site-Specific Extensions
For sites with custom workflows (e.g. ACF custom fields, specific content templates, SEO recovery plans), create additional skill files alongside this one and reference them from your project's CLAUDE.md or .claude/skills/ directory.
Example structure:
~/.claude/skills/
├── wordpress-mcp/ ← This skill (generic WordPress tools)
│ ├── SKILL.md
│ └── references/
└── my-site-workflow/ ← Your custom skill (site-specific context)
└── SKILL.md
1---2name: wordpress-mcp3description: Manage WordPress sites via MCP. Use when the user asks to create, read, update, or delete posts, pages, categories, tags, media, comments, redirections, TablePress tables, synced patterns (reusable blocks), or site settings on a WordPress site connected through the MCP adapter. Covers Rank Math SEO, Gutenberg block discovery, reusable patterns, TablePress, plugin management, cache clearing, user listing, and bulk operations.4---56# WordPress MCP Site Management78Manage WordPress sites through a single Python MCP proxy server (`wordpress` in `~/.claude.json`). All tools require a `site` parameter identifying the target site. Sites are configured in `sites.json`.910## Setup1112This skill requires the WordPress MCP server. If the `wordpress` MCP tools are not yet available, set up the full project from **https://github.com/5unnykum4r/wordpress-mcp**:13141. Clone the repo and install the PHP adapter on your WordPress site (`wordpress/` directory)152. Create a WordPress Application Password and add your site to `sites.json`163. Add the MCP server to `~/.claude.json`:17```json18{19 "mcpServers": {20 "wordpress": {21 "type": "stdio",22 "command": "uv",23 "args": ["run", "--with", "fastmcp", "--with", "httpx", "python", "/path/to/wordpress-mcp/server.py"]24 }25 }26}27```2829See `SETUP.md` in the repo for the full step-by-step guide.3031## How It Works3233A Python FastMCP server proxies tool calls to any WordPress site:341. Every tool takes `site` as the first parameter (e.g. `site="myblog"`)352. The proxy looks up credentials in `sites.json`363. Sends JSON-RPC requests to the WordPress MCP adapter endpoint374. Authentication uses WordPress Application Passwords via HTTP Basic Auth3839Use `list_sites` to see all configured sites.4041## Available Tools4243See `references/posts.md`, `references/categories-tags.md`, `references/media.md`, `references/comments.md`, `references/redirections.md`, `references/admin.md`, and `references/tablepress.md` for full parameter details.4445### Quick Reference4647All tools require `site` as the first parameter.4849| Tool | Action | Key Params |50|------|--------|------------|51| `list_posts` | List posts/pages | status, category, tag, search, post_type, page |52| `read_post` | Read full post + SEO | post_id |53| `create_post` | Create post/page | title, content, slug, status, author, categories, tags, rank_math |54| `update_post` | Update post/page | post_id + any fields to change (incl. author) |55| `delete_post` | Trash/delete | post_id, permanent |56| `bulk_update_status` | Bulk status change | post_ids[], status |57| `list_revisions` | Revision history | post_id |58| `restore_revision` | Restore revision | revision_id |59| `search_replace` | Find/replace in posts | search, replace, dry_run |60| `list_categories` | List categories + SEO | hide_empty, parent, search |61| `create_category` | Create category | name, slug, description, parent_id, rank_math |62| `update_category` | Edit category | category_id + fields, rank_math |63| `delete_category` | Delete category | category_id |64| `list_tags` | List tags | hide_empty, search |65| `create_tag` | Create tag | name, slug, description |66| `update_tag` | Edit tag | tag_id + fields |67| `delete_tag` | Delete tag | tag_id |68| `upload_image` | Upload from URL | image_url, title, alt_text, filename |69| `list_media` | Browse media library | mime_type, search, page |70| `update_media` | Edit media metadata | attachment_id, title, alt_text, caption |71| `delete_media` | Delete media item | attachment_id |72| `list_comments` | List comments | post_id, status, search |73| `update_comment` | Approve/spam/reply | comment_id, status, reply |74| `delete_comment` | Delete comment | comment_id |75| `list_redirections` | List Rank Math redirects | search |76| `create_redirection` | Create redirect | from_url, to, type (301/302) |77| `update_redirection` | Edit redirect | redirection_id + fields |78| `delete_redirection` | Delete redirect | redirection_id |79| `list_plugins` | List installed plugins | — |80| `toggle_plugin` | Activate/deactivate | plugin, action |81| `list_users` | List users | role, search |82| `manage_options` | Read/write WP settings | read[], write{} |83| `clear_cache` | Flush all caches | — |84| `get_info` | Site info + stats | — |85| `list_block_types` | List Gutenberg blocks | namespace, custom_only |86| `list_patterns` | List synced patterns | search |87| `read_pattern` | Read pattern content | pattern_id |88| `create_pattern` | Create synced pattern | title, content |89| `update_pattern` | Update pattern | pattern_id + fields |90| `delete_pattern` | Delete pattern | pattern_id |91| `list_tablepress_tables` | List TablePress tables | — |92| `read_tablepress_table` | Read table data + options | table_id |93| `create_tablepress_table` | Create new table | name, data[][], options |94| `update_tablepress_table` | Update table | table_id + any fields |95| `delete_tablepress_table` | Delete table | table_id |96| `list_sites` | Show configured sites | — |9798## Rank Math SEO99100Posts and categories support a `rank_math` object on create/update.101102**Post fields:**103```104title, description, focus_keyword, canonical_url, robots[],105primary_category, pillar_content, breadcrumb_title, schema_type,106og_title, og_description, og_image, twitter_title, twitter_description107```108109**Category fields:**110```111title, description, focus_keyword, canonical_url, robots[],112breadcrumb_title, og_title, og_description, og_image,113twitter_title, twitter_description114```115116`read_post` and `list_categories` return all Rank Math fields.117118## Gutenberg Blocks119120Post content is stored as Gutenberg block markup. `read_post` returns the raw block HTML including `<!-- wp:block-name -->` delimiters. `create_post` and `update_post` accept full block markup in the `content` field — block comments are preserved as-is.121122Use `list_block_types` to discover all registered blocks (core + custom). Pass `custom_only=True` to see only theme/plugin blocks, or `namespace="your-theme"` to filter by namespace. Each block entry includes its attribute schema so you can construct valid block markup.123124Block markup format:125```126<!-- wp:namespace/block-name {"attribute":"value"} -->127<div class="wp-block-namespace-block-name">Inner HTML</div>128<!-- /wp:namespace/block-name -->129```130131When updating an existing post's content, always `read_post` first to get the full block markup, modify the specific blocks, then pass the entire content back.132133## Common Workflows134135### Create an optimized post1361. `upload_image(site="myblog", image_url="...")` — upload featured image1372. `create_post(site="myblog", title="...", content="...", categories=["Tech"], rank_math={...})` — create with SEO1383. `read_post(site="myblog", post_id=123)` — verify1394. `update_post(site="myblog", post_id=123, status="publish")` — publish140141### Bulk SEO audit1421. `list_posts(site="myblog", number=50)` — get all published posts1432. `read_post(site="myblog", post_id=X)` — check rank_math fields1443. `update_post(site="myblog", post_id=X, rank_math={...})` — fix missing SEO145146### Manage redirects after slug change1471. `read_post(site="myblog", post_id=123)` — get current slug1482. `update_post(site="myblog", post_id=123, slug="new-slug")` — change slug1493. `create_redirection(site="myblog", from_url="/old-slug", to="/new-slug", type=301)` — redirect150151### Search and replace1521. `search_replace(site="myblog", search="old text", replace="new text", dry_run=True)` — preview1532. `search_replace(site="myblog", search="old text", replace="new text", dry_run=False)` — execute154155### Create a reusable synced pattern1561. `create_pattern(site="myblog", title="CTA Banner", content="<!-- wp:group -->...")` — returns ref block markup1572. Use the returned `ref_block` (e.g. `<!-- wp:block {"ref":456} /-->`) in any post content1583. Updating the pattern auto-updates every post that references it159160### Create a post with custom Gutenberg blocks1611. `list_block_types(site="myblog", custom_only=True)` — discover custom blocks and their attributes1622. Build block markup: `<!-- wp:namespace/block-name {"attr":"value"} -->\n<div>...</div>\n<!-- /wp:namespace/block-name -->`1633. `create_post(site="myblog", title="...", content="...block markup...", rank_math={...})` — create post1644. `read_post(site="myblog", post_id=123)` — verify block content preserved165166### Edit blocks in an existing post1671. `read_post(site="myblog", post_id=123)` — get current block markup from `content`1682. Modify the specific `<!-- wp:... -->` blocks in the content string1693. `update_post(site="myblog", post_id=123, content="...updated full content...")` — save back170171### Create and embed a TablePress table1721. `create_tablepress_table(site="myblog", name="Pricing", data=[["Plan","Price"],["Basic","$9"],["Pro","$29"]])` — returns id + shortcode1732. `update_post(site="myblog", post_id=123, content="... [table id=5 /] ...")` — embed in post1743. `read_tablepress_table(site="myblog", table_id="5")` — verify175176## Managing Sites177178Sites are configured in `sites.json`:179180```json181{182 "myblog": {183 "url": "https://example.com/wp-json/mcp/mcp-adapter-default-server",184 "username": "AdminUsername",185 "password": "xxxx xxxx xxxx xxxx xxxx xxxx"186 }187}188```189190To add a new site: install the MCP adapter on the WordPress server (see `SETUP.md`), create an Application Password, and add an entry to `sites.json`. No restart needed.191192## Site-Specific Extensions193194For sites with custom workflows (e.g. ACF custom fields, specific content templates, SEO recovery plans), create additional skill files alongside this one and reference them from your project's CLAUDE.md or `.claude/skills/` directory.195196Example structure:197```198~/.claude/skills/199├── wordpress-mcp/ ← This skill (generic WordPress tools)200│ ├── SKILL.md201│ └── references/202└── my-site-workflow/ ← Your custom skill (site-specific context)203 └── SKILL.md204```