mcpField
W
wordpress-mcp

wordpress-mcp

github.com/5unnykum4rMarketing & growth344 installsUpdated 35w ago
Repository

About wordpress-mcp

wordpress-mcp is a skill for managing WordPress sites through a Python MCP proxy server. It supports content, media, comments, settings, plugins, redirects, Gutenberg blocks, and TablePress across configured sites.

Key features

  1. 01Create, read, update, and delete posts
  2. 02Manage categories, tags, media, and comments
  3. 03Handle Rank Math SEO fields and redirects
  4. 04Inspect and edit Gutenberg blocks and patterns
  5. 05Manage plugins, settings, and caches
  6. 06Create and update TablePress tables

Use cases

  1. 01Publish and optimize WordPress posts
  2. 02Audit and update post SEO metadata
  3. 03Change slugs and create redirects
  4. 04Build posts with custom blocks or tables

MCP support

A Python FastMCP proxy exposes WordPress site-management tools to MCP clients. Each tool targets a configured site and forwards requests to its WordPress MCP adapter.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/5unnykum4r/wordpress-mcp --skill wordpress-mcp

After installing, type/wordpress-mcpin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
admin.md
categories-tags.md
comments.md
media.md
posts.md
redirections.md
tablepress.md

Details

From the project README

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:

  1. Clone the repo and install the PHP adapter on your WordPress site (wordpress/ directory)
  2. Create a WordPress Application Password and add your site to sites.json
  3. 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:

  1. Every tool takes site as the first parameter (e.g. site="myblog")
  2. The proxy looks up credentials in sites.json
  3. Sends JSON-RPC requests to the WordPress MCP adapter endpoint
  4. 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.

ToolActionKey Params
list_postsList posts/pagesstatus, category, tag, search, post_type, page
read_postRead full post + SEOpost_id
create_postCreate post/pagetitle, content, slug, status, author, categories, tags, rank_math
update_postUpdate post/pagepost_id + any fields to change (incl. author)
delete_postTrash/deletepost_id, permanent
bulk_update_statusBulk status changepost_ids[], status
list_revisionsRevision historypost_id
restore_revisionRestore revisionrevision_id
search_replaceFind/replace in postssearch, replace, dry_run
list_categoriesList categories + SEOhide_empty, parent, search
create_categoryCreate categoryname, slug, description, parent_id, rank_math
update_categoryEdit categorycategory_id + fields, rank_math
delete_categoryDelete categorycategory_id
list_tagsList tagshide_empty, search
create_tagCreate tagname, slug, description
update_tagEdit tagtag_id + fields
delete_tagDelete tagtag_id
upload_imageUpload from URLimage_url, title, alt_text, filename
list_mediaBrowse media librarymime_type, search, page
update_mediaEdit media metadataattachment_id, title, alt_text, caption
delete_mediaDelete media itemattachment_id
list_commentsList commentspost_id, status, search
update_commentApprove/spam/replycomment_id, status, reply
delete_commentDelete commentcomment_id
list_redirectionsList Rank Math redirectssearch
create_redirectionCreate redirectfrom_url, to, type (301/302)
update_redirectionEdit redirectredirection_id + fields
delete_redirectionDelete redirectredirection_id
list_pluginsList installed plugins—
toggle_pluginActivate/deactivateplugin, action
list_usersList usersrole, search
manage_optionsRead/write WP settingsread[], write{}
clear_cacheFlush all caches—
get_infoSite info + stats—
list_block_typesList Gutenberg blocksnamespace, custom_only
list_patternsList synced patternssearch
read_patternRead pattern contentpattern_id
create_patternCreate synced patterntitle, content
update_patternUpdate patternpattern_id + fields
delete_patternDelete patternpattern_id
list_tablepress_tablesList TablePress tables—
read_tablepress_tableRead table data + optionstable_id
create_tablepress_tableCreate new tablename, data[][], options
update_tablepress_tableUpdate tabletable_id + any fields
delete_tablepress_tableDelete tabletable_id
list_sitesShow 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
  1. upload_image(site="myblog", image_url="...") — upload featured image
  2. create_post(site="myblog", title="...", content="...", categories=["Tech"], rank_math={...}) — create with SEO
  3. read_post(site="myblog", post_id=123) — verify
  4. update_post(site="myblog", post_id=123, status="publish") — publish
Bulk SEO audit
  1. list_posts(site="myblog", number=50) — get all published posts
  2. read_post(site="myblog", post_id=X) — check rank_math fields
  3. update_post(site="myblog", post_id=X, rank_math={...}) — fix missing SEO
Manage redirects after slug change
  1. read_post(site="myblog", post_id=123) — get current slug
  2. update_post(site="myblog", post_id=123, slug="new-slug") — change slug
  3. create_redirection(site="myblog", from_url="/old-slug", to="/new-slug", type=301) — redirect
Search and replace
  1. search_replace(site="myblog", search="old text", replace="new text", dry_run=True) — preview
  2. search_replace(site="myblog", search="old text", replace="new text", dry_run=False) — execute
Create a reusable synced pattern
  1. create_pattern(site="myblog", title="CTA Banner", content="<!-- wp:group -->...") — returns ref block markup
  2. Use the returned ref_block (e.g. <!-- wp:block {"ref":456} /-->) in any post content
  3. Updating the pattern auto-updates every post that references it
Create a post with custom Gutenberg blocks
  1. list_block_types(site="myblog", custom_only=True) — discover custom blocks and their attributes
  2. Build block markup: <!-- wp:namespace/block-name {"attr":"value"} -->\n<div>...</div>\n<!-- /wp:namespace/block-name -->
  3. create_post(site="myblog", title="...", content="...block markup...", rank_math={...}) — create post
  4. read_post(site="myblog", post_id=123) — verify block content preserved
Edit blocks in an existing post
  1. read_post(site="myblog", post_id=123) — get current block markup from content
  2. Modify the specific <!-- wp:... --> blocks in the content string
  3. update_post(site="myblog", post_id=123, content="...updated full content...") — save back
Create and embed a TablePress table
  1. create_tablepress_table(site="myblog", name="Pricing", data=[["Plan","Price"],["Basic","$9"],["Pro","$29"]]) — returns id + shortcode
  2. update_post(site="myblog", post_id=123, content="... [table id=5 /] ...") — embed in post
  3. 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

Comments

Markdown supported