wordpress-mcp-server

v6.2.1
@adsim/wordpress-mcp-server Checked 1 day ago Published 4 months ago

Enterprise WordPress MCP Server — 137 tools, modular architecture, governance, audit trail, WooCommerce, Schema.org, multilingual.

The enterprise governance layer for Claude-to-WordPress integrations — secure, auditable, and multi-site. Most WordPress MCP servers focus on what you can do. This one focuses on what you should be allowed to do — and who can verify it happened. In regulated environments — financial services, healthcare, legal, government — AI-powered content operations need guardrails. This server supplies a governance layer: read-only and draft-only modes, an approval workflow, dry-run previews, before/after diffs, undo, and a sequenced, hash-chained audit trail.

Summary extracted from the README.

WordPress MCP Server

License: MIT Node.js MCP SDK Tests npm

Governance · Audit Trail · Multi-Site · No plugin for the core operations

The enterprise governance layer for Claude-to-WordPress integrations — secure, auditable, and multi-site.

v6.2.1 Enterprise · 137 tools · 1268 Vitest tests · GitHub Actions CI


Table of Contents


Architecture

┌─────────────────────────────┐
│       Claude Client         │  Claude Desktop · Claude Code · Any MCP client
└──────────────┬──────────────┘
               │ MCP Protocol (stdio or HTTP Streamable)
┌──────────────▼──────────────┐
│    WordPress MCP Server     │  Node.js · Standalone · No plugin for core operations
├─────────────────────────────┤
│  index.js (~498 lines)      │  Orchestration only: MCP transport, enterprise controls, dispatch
├─────────────────────────────┤
│  src/tools/ (18 modules)    │  180 tool definitions + handlers by category
├─────────────────────────────┤
│  src/shared/                │  utils · api · audit · governance · context
├─────────────────────────────┤
│  src/plugins/               │  PluginRegistry · ACF · auto-detected via REST namespaces
├─────────────────────────────┤
│  Tool Profile Filter        │  editorial by default · shop · site · maintenance · all
├─────────────────────────────┤
│  Execution Controls         │  Read-only · Draft-only · Plugin mgmt · Type/status allowlists
├─────────────────────────────┤
│  Audit Logging              │  JSON on stderr · 79+ instrumentation points
├─────────────────────────────┤
│  Rate Limiting              │  Client-side · Configurable per-minute cap
├─────────────────────────────┤
│  HTTP Transport             │  Bearer auth · Session management · Origin validation
└──────────────┬──────────────┘
               │ HTTPS + WordPress Application Password (Basic Auth over TLS)
┌──────────────▼──────────────┐
│    WordPress REST API       │  Single site or multi-target
├─────────────────────────────┤
│  MCP Diagnostics mu-plugin  │  Optional · Debug log · Cron · Schema · Security endpoints
└─────────────────────────────┘

Why This Server

Most WordPress MCP servers focus on what you can do. This one focuses on what you should be allowed to do — and who can verify it happened.

In regulated environments — financial services, healthcare, legal, government — AI-powered content operations need guardrails. This server supplies a governance layer: read-only and draft-only modes, an approval workflow, dry-run previews, before/after diffs, undo, and a sequenced, hash-chained audit trail.

It is one component, not a compliance product. Read the Safety Model before quoting it in a tender: the controls live in this process, the audit log needs somewhere durable to land, and the security boundary remains the WordPress account you give it.

No MCP plugin required. Posts, pages, media, taxonomies, comments, users and revisions work against a standard WordPress with nothing added for this server. What the rest needs is what you would expect: WooCommerce tools need WooCommerce, SEO tools need an SEO plugin and its fields exposed over REST (see SEO Metadata), multilingual tools need WPML, Polylang or TranslatePress, PageSpeed and WPScan checks need their API keys. The durable change journal, the debug log, file permissions, database diagnostics and schema injection need the companion mu-plugin — one file, no composer, no build.

The promise is that nothing MCP-specific has to be installed to start working, not that 137 tools run on a bare WordPress.

With 137 tools across 21 categories, agencies load only what a deployment needs: the editorial profile is the default, shop, site, maintenance and all cover the rest, and WP_TOOL_CATEGORIES picks categories directly. Beyond narrowing ListTools from ~16.2k to ~4-12k tokens, a profile stops user management, plugin activation and file-permission tools being offered to an agent that only writes articles — and with WP_TOOL_ENFORCE_PROFILE=true it refuses them outright rather than merely hiding them.

Safety Model

These controls are operational guardrails, not a security boundary. They are enforced pre-flight inside the MCP server process, which protects against agent error — the dominant risk in practice — but not against an operator. Anyone who can relaunch the server can relaunch it with different environment variables. The security boundary remains the capabilities of the WordPress account behind the Application Password: scope that account to what the deployment actually needs, and treat the controls below as defence in depth on top of it.

  • Deletes go to the trash by default — a permanent delete needs force=true. Blocking deletion outright (WP_DISABLE_DELETE) and requiring a signed confirmation (WP_CONFIRM_DESTRUCTIVE) are off unless you turn them on
  • Configurable execution modes — read-only, draft-only, or full access per deployment
  • Pre-flight enforcement — all guardrails checked before any API call is made
  • Audit trail — every action logged with timestamp, target, outcome and latency, as structured JSON on stderr. Entries are sequenced and hash-chained; with WP_MCP_SECRET set the chain is keyed with HMAC-SHA-256. That detects alteration, loss and reordering — see Sequence and hash chain. It does not make stderr immutable storage, and there is no delivery guarantee: ship it somewhere append-only if you need one
  • Credential isolation — secrets never appear in logs or error outputs
  • Multi-tenant ready — independent auth and config per WordPress target

Data Retention

There are three levels, and they are worth keeping apart.

1 — The server process writes nothing to disk. No cache, no database, no state file. That is true unconditionally. Audit logs go to stderr in real time and can be disabled (WP_AUDIT_LOG=off) or redirected to any pipeline.

2 — One thing is held in memory: the change journal. To let you undo a write, the server keeps the previous value of the fields that write changed — the last 20 by default, oldest dropped, gone when the process ends. WP_CHANGE_JOURNAL=off disables it; a number resizes it. An entry too large to restore safely is refused rather than truncated, and says why.

3 — With the companion installed, those snapshots are also stored in WordPress. They then survive a restart and are visible from another machine. This is real persistence, and it belongs in your data map — but it lands in the same database the content came from, not in a second place under our control. The companion prunes after 30 days or 500 entries. WP_CHANGE_JOURNAL_DURABLE=off opts out.

Everything else is stateless: content flows through the server and is not retained beyond the tool call that fetched it.

Before 5.9 this section claimed zero retention outright. Undo is not possible without keeping something. 6.2 added the durable half, so the claim is now split three ways rather than stated as an absolute.


Quick Start

Requirements

  • Node.js >= 20 — tested on 20, 22 and 24
  • WordPress site with REST API enabled (default since WP 4.7)
  • WordPress Application Password (WP 5.6+)
  • HTTPS endpoint (required for production)
  • WooCommerce 3.5+ (optional, for WooCommerce tools)

Install from npm

Published as @adsim/wordpress-mcp-server. Nothing to install: MCP clients launch the server themselves, and npx fetches it on first use.

npx -y @adsim/wordpress-mcp-server

Pin a version for anything that matters. A governance component that silently moves under you is a governance component you cannot vouch for: a new release can change which tools exist, what the defaults refuse, and what a workflow does. Shared agency configs, CI and client work should name a version:

npx -y @adsim/wordpress-mcp-server@6.2.1

Unpinned is fine for trying it out or for a throwaway session — it always resolves the latest release:

npx -y @adsim/wordpress-mcp-server

Install globally only if you intend to run it by hand:

npm install -g @adsim/wordpress-mcp-server
wordpress-mcp-server --verbose

The published package holds the runtime and nothing else — 44 files, no tests, no build tooling. Requires Node 20 or later; the version is enforced by engines, so npm warns you on an older runtime rather than failing obscurely later.

Install from GitHub

Use the repository when you want to read the tests, change something, or run an unreleased commit. github.com/GeorgesAdSim/wordpress-mcp-server

git clone https://github.com/GeorgesAdSim/wordpress-mcp-server.git
cd wordpress-mcp-server
npm install
npm test

Every release is tagged, so a specific version is one checkout away:

git checkout v6.2.1
What Where
Releases and tags /releases
Report a bug /issues
Report a vulnerability SECURITY.md — privately, not in an issue
Trademarks and forks TRADEMARK.md

Point a client at a clone with an absolute path instead of npx:

{ "command": "node", "args": ["/absolute/path/to/wordpress-mcp-server/index.js"] }

Useful scripts:

npm test                  # unit suite — no network calls, fully mocked
npm run integration:up    # disposable WordPress in Docker
npm run test:integration  # real HTTP against it
npm run integration:down  # tear it down, volumes included
npm run check:metadata    # fails if any published figure has drifted from the code
npm run build:mcpb        # build the Claude Desktop bundle
npm run verify:mcpb       # unpack it and boot the server out of it
npm run verify:package    # install the npm tarball in a clean project and boot it

Configure

Create a .env file:

WP_API_URL=https://yoursite.com
WP_API_USERNAME=your-username
WP_API_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx

# Optional: WooCommerce (generate at WooCommerce → Settings → Advanced → REST API)
WC_CONSUMER_KEY=ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
WC_CONSUMER_SECRET=cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Tool surface (optional — defaults to the editorial profile)
WP_TOOL_PROFILE=editorial                 # editorial · shop · site · maintenance · all
WP_TOOL_CATEGORIES=seo,content,schema     # Pick categories directly, wins over the profile
WP_COMPACT_JSON=true                      # Compact JSON output (default)

To generate an Application Password: WordPress Admin → Users → Profile → Application Passwords → Add New.

Connect to Claude Desktop

Add to claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["-y", "@adsim/wordpress-mcp-server"],
      "env": {
        "WP_API_URL": "https://yoursite.com",
        "WP_API_USERNAME": "your-username",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Connect to Claude Code

claude mcp add wordpress \
  -e WP_API_URL=https://yoursite.com \
  -e WP_API_USERNAME=your-username \
  -e WP_API_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
  -- npx -y @adsim/wordpress-mcp-server

HTTP Streamable Transport

New in v3.0.0 — Run the server over HTTP instead of (or alongside) stdio, following the MCP spec 2025-03-26.

Start in HTTP mode

MCP_TRANSPORT=http \
MCP_HTTP_PORT=3000 \
MCP_AUTH_TOKEN=your-secret-token \
WP_API_URL=https://yoursite.com \
WP_API_USERNAME=your-username \
WP_API_PASSWORD="xxxx xxxx xxxx xxxx" \
npx -y @adsim/wordpress-mcp-server

Dual mode (stdio + HTTP simultaneously)

MCP_TRANSPORT=http \
MCP_DUAL_MODE=true \
MCP_AUTH_TOKEN=your-secret-token \
npx -y @adsim/wordpress-mcp-server

HTTP environment variables

Variable Default Description
MCP_TRANSPORT stdio Set to http to enable HTTP Streamable transport
MCP_HTTP_PORT 3000 HTTP server port
MCP_HTTP_HOST 127.0.0.1 Bind address
MCP_AUTH_TOKEN (none) Bearer token for authentication (required in HTTP mode)
MCP_ALLOWED_ORIGINS (none) Comma-separated allowed origins (anti-DNS-rebinding)
MCP_SESSION_TIMEOUT_MS 3600000 Session TTL in milliseconds (1 hour)
MCP_DUAL_MODE false Run stdio and HTTP transports simultaneously

Health check

curl http://localhost:3000/health
# → { "status": "ok", "version": "6.2.1", "transport": "http" }

Connect an MCP client via HTTP

{
  "mcpServers": {
    "wordpress-http": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "Authorization": "Bearer your-secret-token"
      }
    }
  }
}

MCPB Bundle — Claude Desktop One-Click Install

New in v3.1.0 — Package the server as a .mcpb bundle for Claude Desktop distribution.

The bundle stores WordPress credentials securely in the OS keychain (sensitive: true) — no manual JSON editing required.

Build the bundle

npm run build:mcpb
# → wordpress-mcp-server.mcpb

Install in Claude Desktop

Double-click wordpress-mcp-server.mcpb — Claude Desktop will prompt for:

  • WordPress Site URL
  • WordPress Username
  • WordPress Application Password (stored in OS keychain)

Available Tools (137)

Reading the numbers

Several counts appear in this document and they are not the same count.

Count What it is
Definitions in the code 180 Everything declared, retired names included
Retired but still routable 43 Absent from ListTools, still answer when called by name
Advertised 137 The most ListTools can offer — the headline figure
Conditional 29 Withheld until their own switch is on: 20 WooCommerce (WC_CONSUMER_KEY), 3 approval (WP_REQUIRE_APPROVAL), 6 plugin intelligence (WP_ENABLE_PLUGIN_INTELLIGENCE)
Profile all, out of the box 108 137 − 29
Profile editorial, out of the box 68 What a fresh install shows

How 6.0 got from one catalogue to the other:

178  advertised before 6.0
− 43  names retired (21 audits, 22 Full Site Editing)
+  2  tools that replaced them (wp_audit, wp_site_design)
= 137

The 6.0 changelog reported the 43 removals and not the 2 additions, which made the subtraction look wrong. Today's 180 definitions already include both, so 180 − 43 = 137 falls out directly.

Three kinds of conditionality, which the table above does not distinguish and which account for the rest of the questions people ask:

Kind Effect Examples
Gated in ListTools Not offered at all until the switch is on The 29 above
Offered but degraded Always listed; returns less without a key wp_audit_page_speed without PAGESPEED_API_KEY, wp_audit_plugin_vulnerabilities without WPSCAN_API_KEY
Appears on detection Added at runtime when the plugin's REST namespace is found ACF and Elementor tools, counted separately from the 137
Listed but needs the companion Listed and callable; fails cleanly without the mu-plugin Debug log, file permissions, database diagnostics, durable journal

Registry-level figures — 180, 43, 137, 29 — are generated and checked by npm run check:metadata, which fails CI when they drift. The profile counts are measured and written by hand, because they depend on runtime configuration rather than on the registry.

Content Management (13)

Tool Description
wp_list_posts List posts with pagination, filtering by status/category/tag/author, and search
wp_get_post Get a post by ID with full content, meta fields, and taxonomy info
wp_create_post Create a post (defaults to draft). Supports HTML, categories, tags, featured image, meta
wp_update_post Update any post field. Only provided fields are modified
wp_delete_post Move to trash by default. Permanent deletion requires force=true. Confirmation token when WP_CONFIRM_DESTRUCTIVE=true
wp_search Full-text search across all content types
wp_list_pages List pages with hierarchy (parent/child), templates, and menu order
wp_get_page Get page content, template, and hierarchy info
wp_create_page Create a page with parent, template, and menu_order support
wp_update_page Update any page field
wp_validate_block_structure Validate Gutenberg block HTML before saving. Detects unclosed blocks, malformed JSON, invalid nesting, deprecated blocks
wp_bulk_update Bulk update content across multiple posts/pages. Supports text replacement, meta updates, status changes, content append. Dry-run by default
wp_get_post_meta Read post meta fields. Use for ACF data if acf/v3 unavailable, or for any custom meta (_elementor_data, _yoast_wpseo_*). Returns all meta if meta_key omitted

Media Library (3)

Tool Description
wp_list_media Browse media with type filtering (image/video/audio/document)
wp_get_media Get URL, dimensions, alt text, caption, and all available sizes
wp_upload_media Upload a file from a public URL to the WordPress media library

Taxonomies & Structure (5)

Tool Description
wp_list_categories List categories with hierarchy, post count, and descriptions
wp_list_tags List tags with post count
wp_create_taxonomy_term Create a new category or tag
wp_list_post_types Discover all registered post types (including custom ones)
wp_list_custom_posts List content from any custom post type (products, portfolio, events)

Engagement (2)

Tool Description
wp_list_comments List comments with filtering by post, status, and author
wp_create_comment Create a comment or reply on any post

Users & Security (10)

New in v4.7.0 — Full user CRUD, role/capability inspection, password reset, and application password management.

Tool Description
wp_list_users List users with roles, search, pagination. Supports full/summary/ids_only modes
wp_get_user Full user profile: login, email, role, meta, registration date, avatar
wp_create_user Create user with username, email, password, role. Requires confirm=true. Write
wp_update_user Update email, display_name, role, bio, meta. Write
wp_delete_user Delete user with mandatory post reassignment. Requires confirm=true. Blocked by WP_DISABLE_DELETE
wp_list_user_roles All available roles with their capabilities listed
wp_get_user_capabilities Active capabilities for a specific user
wp_reset_user_password Trigger password reset email. Requires mu-plugin companion. Write
wp_list_user_application_passwords List app passwords with name, UUID, created date, last used. Read-only
wp_revoke_application_password Revoke an application password by UUID. Write

SEO Metadata (2)

Auto-detects Yoast, RankMath, SEOPress, AIOSEO.

Tool Description
wp_get_seo_meta Read SEO title, description, focus keyword, canonical, robots, Open Graph
wp_update_seo_meta Update SEO metadata with automatic plugin detection

Audits (1) — consolidated in v6.0

One tool, one check per call. Twenty-one separate audit tools used to differ only by which check they ran; folding them here leaves the model one decision instead of twenty-one. Their original names are no longer advertised but remain callable, so existing scripts keep working.

Check What it looks for
seo Site-wide SEO metadata quality, scored 0-100, with missing fields
media_seo Missing alt text, oversized images, filename quality
orphan_pages Published content no internal link points to
heading_structure H1-H6 hierarchy of one post, keyword placement
thin_content Posts below a word count, weighted by age
canonicals Missing, self-referencing or staging-domain canonicals
eeat_signals Author bio, dates, citations, outbound authority
broken_internal_links Internal links returning 404 or redirecting
keyword_cannibalization Posts competing on the same intent (TF-IDF + cosine)
taxonomies Empty, duplicated or near-duplicate terms
outbound_links External profile: low-authority domains, missing nofollow
translation_coverage Untranslated content per language
missing_seo_translations SEO fields present in the source but absent in translations
readability Sentence length, passive voice, transition words
update_frequency Content gone stale past a threshold
anchor_texts Generic, repeated or over-optimised anchors
schema_markup Presence and validity of JSON-LD
content_structure Section balance, list and media density
duplicate_content Near-duplicate posts by cosine similarity
content_gaps Taxonomy terms with too little content
cta_presence Posts without a call to action

wp_audit(check, post_type?, limit?, post_id?, options?). options carries the settings specific to a check — min_words for thin_content, similarity_threshold for duplicate_content, authoritative_domains for eeat_signals.

Schema.org Intelligence (7) — New in v4.9

Generation + injection + local validation end-to-end.

Tool Description
wp_generate_schema_article Generates Article JSON-LD from post data with _embed for author and featured image
wp_generate_schema_faq Detects Q&A from Gutenberg FAQ blocks, RankMath, AIOSEO, <details>, or H3+paragraph
wp_generate_schema_howto Detects steps from ordered lists or numbered headings. Extracts totalTime, estimatedCost
wp_generate_schema_localbusiness Pulls business data from ACF, Yoast Local SEO, or WP options
wp_generate_schema_breadcrumb Rebuilds full breadcrumb hierarchy: Home > Category/Parent > Post
wp_inject_schema Injects JSON-LD into _custom_schema_jsonld post meta. Supports dry_run=true. Requires mu-plugin
wp_validate_schema_live Fetches live URL, extracts all JSON-LD blocks, validates structure and required fields

Content Intelligence (8) — New in v4.4

All read-only, always allowed regardless of governance flags.

Tool Description
wp_get_content_brief Editorial brief aggregator: SEO + structure + links in 1 call
wp_extract_post_outline H1-H6 outline extraction with category-level pattern analysis
wp_build_link_map Internal link matrix with simplified PageRank scoring (0-100)
wp_extract_faq_blocks FAQ inventory: JSON-LD, Gutenberg blocks, HTML patterns
wp_extract_entities Regex/heuristic named entity extraction (brands, locations, persons, organizations)
wp_get_publishing_velocity Publication cadence by author/category with trend detection
wp_compare_revisions_diff Textual diff between revisions with amplitude scoring
wp_list_posts_by_word_count Posts sorted by length with 6-tier segmentation

Editorial Intelligence (6) — New in v4.13

Batch processing up to 500 posts, reuses TF-IDF engine. All read-only.

Tool Description
wp_suggest_content_updates Finds stale posts needing updates. Prioritizes by age, outdated date references, thin content
wp_audit_author_consistency Profiles each author: post count, avg word count, frequency, readability, media usage
wp_build_editorial_calendar Analyzes 12 months of history for seasonality, best days, scheduled posts, gaps
wp_find_pillar_content_gaps Identifies topics with 3+ posts without a dedicated pillar page
wp_audit_internal_link_equity Builds link graph, identifies orphans, over-linked pages, equity distribution 0-100
wp_suggest_content_cluster Clusters content by TF-IDF + cosine similarity around a keyword or post_id seed

Multilingual Intelligence EU (4) — New in v4.10

WPML · Polylang Pro · Polylang Free (hreflang fallback) · TranslatePress.

Tool Description
wp_detect_multilingual_plugin Auto-detects WPML > Polylang Pro > Polylang Free > TranslatePress
wp_list_languages Lists configured languages with code, name, locale, URL prefix, flag
wp_get_post_translations Gets all translations with post IDs, titles, URLs, statuses, SEO meta per language
wp_sync_seo_meta_translations Copies SEO meta from source to translations. dry_run=true by default. Write

Performance & Core Web Vitals (6) — New in v4.9

Tool Description
wp_audit_page_speed Google PageSpeed Insights: Core Web Vitals (LCP, CLS, INP, FCP, TTFB), score, opportunities. Requires PAGESPEED_API_KEY
wp_find_render_blocking_resources Detects render-blocking <link> and <script> in <head> (excludes defer/async)
wp_audit_image_optimization Media library audit: non-WebP, large files (>100KB), missing alt text
wp_check_caching_status Detects caching plugins (WP Rocket, W3TC, LiteSpeed) and cache HTTP headers
wp_audit_database_bloat Revisions, expired transients, auto-drafts, spam, orphan postmeta. Requires mu-plugin
wp_get_plugin_performance_impact Ranks active plugins by estimated performance impact (~50 plugin database)

Security Audit (6) — New in v4.11

All read-only. Optional WPSCAN_API_KEY for CVE data.

Tool Description
wp_audit_user_security Audits admin accounts: default usernames, inactive accounts, generic emails, missing 2FA
wp_check_file_permissions Checks wp-config.php, .htaccess, uploads/ permissions. Requires mu-plugin
wp_list_recently_modified_files Recently modified files with suspicious detection: PHP in uploads, hex filenames
wp_audit_plugin_vulnerabilities Scans plugins against WPScan API. CVEs with CVSS scores. Without API key: version list
wp_check_ssl_certificate TLS validation (expiry, issuer, SAN), security headers (HSTS, CSP). Grades A+ to F
wp_audit_login_security Login security score /100: XML-RPC, user enumeration, 2FA, brute force protection

Site Health & Diagnostics (8) — New in v4.7

wp_get_debug_log and wp_get_active_hooks require mu-plugin companion.

Tool Description
wp_get_site_health_status Overall health score (good/recommended/critical) with issue counts by severity
wp_list_site_health_issues All health issues with label, description, severity, and badge
wp_get_site_health_info System info: PHP version, MySQL, memory limit, extensions, WP constants
wp_get_debug_log Read last N lines of debug.log filtered by level. Max 500 lines. Requires mu-plugin
wp_get_cron_events List all WP-Cron events with hook, schedule, next run, and overdue detection
wp_get_transients List database transients with key, expiration, size. Filter by expired/active
wp_check_php_compatibility Check each plugin's PHP version requirement vs current PHP
wp_get_active_hooks Inventory of registered actions and filters with callbacks and priorities. Requires mu-plugin

Site Design — FSE (1) — consolidated in v6.0

Twenty-two tools that were list/get/create/update/delete repeated across five resource types. Pure CRUD, so the resource became a parameter. The original names are no longer advertised but remain callable.

wp_site_design(action, resource, id?, options?)

Resource Actions What it is
template list · get · create · update · delete Page-level layouts: single, archive, 404, front-page
template_part list · get · create · update · delete Reusable fragments: header, footer
global_styles list · get · update Theme design tokens: palette, typography, spacing. list returns the theme's style variations
block_pattern list · get · create · delete Block compositions offered in the editor. WordPress has no update
navigation_menu list · get · create · update · delete Block-based menus

Reads are always allowed. create and update are refused by WP_READ_ONLY, delete also by WP_DISABLE_DELETE — the tool gates itself per action rather than being refused whole, so a read-only deployment can still inspect a theme.

Full Site Editing applies to block themes only. A site built with Elementor or a classic theme has no block templates; use the widgets tools below and the Elementor plugin layer.

Widgets (4)

Sidebar widgets belong to the classic theme system, not to Full Site Editing — they were filed under fse until v6.0, which hid four classic-theme tools behind a block-theme label. They now have their own category, in the site profile.

Tool Description
wp_list_widgets List widgets, filterable by sidebar
wp_get_widget Read a single widget
wp_update_widget Update settings or move to another sidebar. Write
wp_delete_widget Delete a widget. Blocked by WP_DISABLE_DELETE

Plugin Intelligence Layer (up to 7) — New in v4.5-v4.6

Activates only when plugin detected via REST namespace discovery. Disable all: WP_DISABLE_PLUGIN_LAYERS=true

ACF (Advanced Custom Fields) — requires /acf/v3 namespace

Tool Description
acf_get_fields Get ACF custom fields for a post/page with key filtering and raw/compact/summary modes
acf_list_field_groups List all configured ACF field groups
acf_get_field_group Get full detail of an ACF field group by ID
acf_update_fields Update ACF custom fields. Write — blocked by WP_READ_ONLY

Elementor — requires /elementor/v1 namespace

Tool Description
elementor_list_templates List Elementor templates (page, section, block, popup)
elementor_get_template Get full template content and elements. Context-guarded at 50k chars
elementor_get_page_data Elementor editor data: widgets used, elements count

Plugin Intelligence (6) — New in v4.5

Requires WP_ENABLE_PLUGIN_INTELLIGENCE=true. Read-only (except write modes noted).

Tool Description
wp_get_rendered_head Fetch real <head> HTML via RankMath/Yoast headless endpoint. Compare rendered vs stored
wp_audit_rendered_seo Bulk rendered-vs-stored SEO divergence detection with per-post scoring
wp_get_pillar_content Read or set RankMath cornerstone/pillar flag. Write blocked by WP_READ_ONLY
wp_audit_schema_plugins Validate JSON-LD from SEO plugin native fields (rank_math_schema or yoast_head_json)
wp_get_seo_score Read RankMath native SEO score (0-100) with bulk mode distribution stats
wp_get_twitter_meta Read/write Twitter Card meta for RankMath, Yoast, SEOPress. Write blocked by WP_READ_ONLY

Plugins & Themes (5)

Tool Description
wp_list_plugins List installed plugins with status, version, author. Requires activate_plugins
wp_activate_plugin Activate a plugin. Blocked by WP_READ_ONLY and WP_DISABLE_PLUGIN_MANAGEMENT
wp_deactivate_plugin Deactivate a plugin. Blocked by WP_READ_ONLY and WP_DISABLE_PLUGIN_MANAGEMENT
wp_list_themes List installed themes with active theme detection
wp_get_theme Get theme details by stylesheet slug

Revisions (4)

Tool Description
wp_list_revisions List revisions of a post or page (metadata only)
wp_get_revision Get a specific revision with full content
wp_restore_revision Restore a post to a previous revision
wp_delete_revision Permanently delete a revision. Blocked by WP_READ_ONLY, WP_DISABLE_DELETE, WP_CONFIRM_DESTRUCTIVE

Editorial Workflow & Visual Staging (9) — v3.2 / v4.15 / v5.1

Requires WP_REQUIRE_APPROVAL=true.

Tool Description
wp_submit_for_review Transition a draft post to pending status (author action)
wp_approve_post Transition a pending post to publish (editor/admin action)
wp_reject_post Return a pending post to draft with a mandatory rejection reason

Visual Staging (5) — New in v4.15. Requires WP_VISUAL_STAGING=true for interception.

Tool Description
wp_create_staging_draft Clone a published page/post into a shadow draft for safe editing
wp_list_staging_drafts List all pending staging drafts, optionally filtered by source
wp_get_staging_preview_url Get native WordPress preview URL for a staging draft
wp_merge_staging_to_live Merge validated staging draft content to the live page (two-step)
wp_discard_staging_draft Permanently delete a staging draft without touching the live page

Workflow Orchestrator (1) — New in v5.1.

Tool Description
wp_run_workflow Execute named or custom tool sequences in a single call. Built-in: seo_audit_and_stage, site_health_report, content_publish_safe, wc_product_audit
Tool Description
wp_analyze_links Audit all internal/external links in a post. HEAD verification per link
wp_suggest_internal_links Semantic link suggestions scored by category, freshness, SEO keyword, title match

WooCommerce Core (6) — New in v3.4

Requires WC_CONSUMER_KEY and WC_CONSUMER_SECRET.

Tool Description
wc_list_products List products with filtering by status, category, search, and sorting
wc_get_product Get product by ID with full details and variations summary
wc_list_orders List orders with filtering by status, customer, and date
wc_get_order Get order by ID with line items, shipping, billing, and payment details
wc_list_customers List customers with search and role filtering
wc_price_guardrail Analyze a price change for safety (read-only). Returns safe/unsafe

WooCommerce Intelligence (4) — New in v3.5

Tool Description
wc_inventory_alert Identify low-stock and out-of-stock products below threshold, sorted by urgency
wc_order_intelligence Customer purchase history: lifetime value, average order, favourite products
wc_seo_product_audit Audit product listings for SEO issues (descriptions, images, alt text, slugs)
wc_suggest_product_links Suggest WooCommerce products to link from blog posts based on keyword relevance

WooCommerce Advanced Intelligence (7) — New in v4.12

All read-only.

Tool Description
wc_audit_product_seo Product SEO score /100: title, description, slug, image alt, schema presence
wc_find_abandoned_carts_pattern Abandoned cart patterns: hourly/daily trends, top products, revenue loss
wc_audit_checkout_friction Checkout friction score 0-10: guest checkout, required fields, coupon, multi-step
wc_get_product_performance Product metrics with trend comparison: units sold, revenue, refund rate
wc_audit_stock_alerts Out-of-stock and low-stock audit with last sale dates. Includes variations
wc_find_duplicate_products Duplicates by SKU, title/slug Levenshtein similarity. Union-find grouping
wc_audit_pricing_consistency Pricing errors: sale >= regular, zero sale, minimal discounts, expired sales

WooCommerce Write (3) — New in v3.6

All blocked by WP_READ_ONLY.

Tool Description
wc_update_product Update product fields. Subject to wc_price_guardrail threshold enforcement
wc_update_stock Update stock quantity of a product or variation
wc_update_order_status Transition order status (e.g., processing → completed)

Operations (5)

Tool Description
wp_set_target Switch active WordPress site in multi-target mode
wp_site_info Site info, current user, post types, enterprise controls, tool_categories, plugin_layer
wp_get_site_options Read WordPress site settings (title, tagline, language, timezone) via /wp/v2/settings
wp_list_changes What writes changed during this session, and whether each can be undone
wp_rollback_change Undo a listed change, restoring the fields it modified to their previous values

Enterprise Controls

Configure execution policy via environment variables. All restrictions are enforced before any API call is made.

Control Default Effect
WP_READ_ONLY false Blocks all write operations
WP_DRAFT_ONLY false Restricts to draft and pending statuses only
WP_DISABLE_DELETE false Blocks all delete operations
WP_DISABLE_PLUGIN_MANAGEMENT false Blocks plugin activate/deactivate (list still allowed)
WP_REQUIRE_APPROVAL false Blocks direct publish. Forces draft → pending → publish workflow
WP_CONFIRM_DESTRUCTIVE false Requires token confirmation before delete operations
WP_MCP_SECRET (ephemeral) Signing secret for confirmation tokens. Unset = a random per-process secret is generated, so tokens stop being valid after a restart. Required when WP_CONFIRM_DESTRUCTIVE=true in HTTP mode
WP_VISUAL_STAGING false When true, direct edits to published pages are intercepted. AI must use staging workflow: wp_create_staging_draft → edit draft → wp_merge_staging_to_live
WP_VALIDATE_BLOCKS false When true, auto-validates Gutenberg block structure on wp_update_post/wp_update_page. Blocks update if errors found
WP_ALLOWED_TYPES all Restricts to specific post types (e.g., post,page)
WP_ALLOWED_STATUSES all Restricts to specific statuses (e.g., draft,pending)
WP_MAX_CALLS_PER_MINUTE unlimited Client-side rate limiting
WP_AUDIT_LOG on Structured JSON audit trail
WP_AUDIT_CHAIN on Adds seq, prev and hash to each audit entry. Keyed by WP_MCP_SECRET when it is set. Verify with npm run verify:audit
WP_COMPACT_JSON true Compact JSON output (~30% token reduction). false for debugging
WP_WRITE_DIFF auto Compare a resource before and after each write. auto = posts and pages, all = every single-resource endpoint, off = disabled. Costs one extra GET per write
WP_CHANGE_JOURNAL_DURABLE auto With the MCP Diagnostics companion installed, snapshots are also stored in WordPress and survive a restart. off skips the probe
WP_CHANGE_JOURNAL 20 How many changes to keep in memory for wp_list_changes. off disables retention entirely. Never written to disk, lost on restart. See Data Retention
WP_TOOL_ENFORCE_PROFILE false When true, a tool outside the active scope is refused instead of merely hidden. Off by default because the previous behaviour was documented
WP_TOOL_PROFILE editorial Named set of categories to expose: editorial · shop · site · maintenance · all. See Tool profiles
WP_TOOL_CATEGORIES (none) Comma-separated categories to expose. Takes precedence over WP_TOOL_PROFILE. Always includes core. Categories: content · revisions · media · taxonomy · engagement · users · seo · audit · schema · intelligence · editorial · fse · widgets · plugins · pluginlayer · workflow · links · woocommerce · security · performance · health
PAGESPEED_API_KEY (none) Google PageSpeed Insights API key. Optional — wp_audit_page_speed degrades gracefully
WPSCAN_API_KEY (none) WPScan vulnerability database API key. Optional — free at wpscan.com/register

Previewing and verifying writes

Every tool that mutates something accepts dry_run. Nothing is sent: the server reports the request it would have made and stops.

{ "dry_run": true, "status": "preview", "tool": "wp_update_post",
  "would": { "method": "POST", "endpoint": "/posts/42", "body": { "title": "New title" } } }

Interception lives in the API layer rather than in each tool, so it holds for writes reached indirectly and for any tool added later. A dry run bypasses WP_READ_ONLY, WP_DISABLE_DELETE and WP_DISABLE_PLUGIN_MANAGEMENT — nothing is sent, so those controls have nothing to protect, and seeing what a read-only deployment would do is what makes it auditable. Execution stops at the first write, so a tool performing several writes shows only the first; wp_bulk_update and wp_run_workflow implement their own fuller previews.

Writes that do run are compared against the resource as it was. WP_WRITE_DIFF=auto (the default) covers posts and pages, at the cost of one extra GET per write:

{ "success": true,
  "changes": { "resource": "/posts/42", "effective": true,
               "fields": { "title": { "before": "Old", "after": "New" },
                           "content": { "lines_added": 3, "lines_removed": 1 } } } }

The field that matters is effective. A write can succeed and change nothing — the value sent was identical, WordPress rejected it silently, or a page builder masks it, which is exactly the Elementor failure the 5.6 guard was built for. A handler cannot tell you that about itself; the comparison can.

Resources

Reference material addressed by URI, so an agent does not spend a tool call rediscovering it at the start of every conversation.

URI What it holds
wp://site Name, URL, timezone, and the account this server authenticates as
wp://post-types Registered post types and REST bases — the valid post_type values
wp://taxonomies Taxonomies, the types they apply to, their REST bases
wp://governance Which controls are on, which tools are exposed, what happens to a write

wp://governance answers "why was that blocked" with no round trip — it reads no network and works even when the site is unreachable.

Only genuinely referential data belongs here. An audit is a computation, not a document: wp_audit(check, post_id) takes arguments, a resource does not, so the audits stayed tools.

Prompts

The four built-in workflows are also exposed as MCP prompts, so a person can pick one in their client instead of describing it. They are generated from the workflow definitions, which means a prompt cannot describe a sequence the server does not run.

Prompt Arguments Steps
seo_audit_and_stage post_id content brief → heading audit → staging draft
site_health_report — health status → issues → environment info
content_publish_safe post_id, content validate blocks → publish
wc_product_audit — product SEO → stock alerts

A prompt resolves to the same wp_run_workflow call an agent would make, with the arguments filled in. Prompts are user-initiated: a model running on its own never invokes one, and does not need to — the tool is there for it.

Undoing a write

Each recorded change carries a change_id. wp_list_changes shows what this session changed and whether each one can be undone; wp_rollback_change writes the previous values back.

{ "success": true, "rolled_back": "chg_3", "restored": ["title", "_yoast_wpseo_title"],
  "undo_id": "chg_4" }

A rollback is itself a write, so it lands in the journal as its own change — the undo can be undone. Rolling the same change back twice is refused: the snapshot no longer describes the resource.

Three things are declared unrollbackable when they are recorded, not when you try:

Case Why
The write changed nothing There is nothing to put back
Permanent deletion (force=true) The resource, its ID and its relations are gone
Previous state above 256 kB Restoring a truncated payload would corrupt the resource

The journal holds the last 20 changes in memory and loses them on restart — see Data Retention. wp_restore_revision remains the separate, durable path for WordPress's own revisions, which cover post content but never meta.

Destructive confirmation flow

When WP_CONFIRM_DESTRUCTIVE=true, wp_delete_post and wp_delete_revision return a stateless confirmation token on the first call instead of executing. Pass it back on a second call to confirm.

mcp_trash_42_1785250649_cf49af092d438e1b

HMAC-SHA-256 over the post, action and timestamp, truncated to 64 bits, compared in constant time, valid for 60 seconds, never stored. Changed in 6.0 — the signature was 16 bits until then, which is a guardrail against an agent's mistake but not against a brute-force.

Tokens are signed with WP_MCP_SECRET. When it is not set the server generates a random secret at startup — tokens stay unforgeable, but they stop being valid after a restart and cannot be validated by a second instance. In stdio mode this only costs you pending tokens on restart, and the server logs a warning. In HTTP mode, where restarts and multiple instances are expected, the server refuses to start rather than offer a control it cannot honour.

WP_MCP_SECRET=$(openssl rand -hex 32)

This is a guardrail against accidental deletion by the agent, not an authorisation mechanism — see Safety Model.

Governance priority order: WP_READ_ONLY → WP_DISABLE_DELETE → WP_CONFIRM_DESTRUCTIVE

Deployment profiles

Agency content production — writers can create and edit, but never publish or delete:

WP_DRAFT_ONLY=true
WP_DISABLE_DELETE=true
WP_ALLOWED_STATUSES=draft,pending
WP_MAX_CALLS_PER_MINUTE=30

Editorial review workflow — forces human approval before publication:

WP_REQUIRE_APPROVAL=true
WP_DISABLE_DELETE=true
WP_AUDIT_LOG=on

Compliance monitoring — read-only access for auditing existing content:

WP_READ_ONLY=true
WP_AUDIT_LOG=on

Regulated publishing — restrict to specific content types in a controlled environment:

WP_ALLOWED_TYPES=post
WP_ALLOWED_STATUSES=draft,pending,publish
WP_DISABLE_DELETE=true
WP_AUDIT_LOG=on

Locked infrastructure — content operations allowed, but no plugin/theme changes:

WP_DISABLE_PLUGIN_MANAGEMENT=true
WP_DISABLE_DELETE=true

E-commerce safe mode — WooCommerce read and intelligence, no writes:

WP_READ_ONLY=true
WC_CONSUMER_KEY=ck_xxx
WC_CONSUMER_SECRET=cs_xxx

Locked down — nothing gets deleted:

WP_DISABLE_DELETE=true
WP_DISABLE_PLUGIN_MANAGEMENT=true
WP_REQUIRE_APPROVAL=true
WP_TOOL_ENFORCE_PROFILE=true         # the profile refuses, it does not merely hide
WP_VISUAL_STAGING=true
WP_VALIDATE_BLOCKS=true
WP_WRITE_DIFF=all
WP_CHANGE_JOURNAL=50
WP_MAX_CALLS_PER_MINUTE=30

Deletion allowed, but never by accident — the same, with deletion re-enabled behind a signed confirmation:

WP_DISABLE_DELETE=false
WP_CONFIRM_DESTRUCTIVE=true
WP_MCP_SECRET=<a stable secret>      # or tokens stop working after a restart

The two are separate on purpose. The priority order is WP_READ_ONLY → WP_DISABLE_DELETE → WP_CONFIRM_DESTRUCTIVE, so turning on both WP_DISABLE_DELETE and WP_CONFIRM_DESTRUCTIVE is not stricter than the first alone — the confirmation is simply never reached.

None of this replaces a narrowly scoped WordPress account — see Safety Model.

Tool profiles

A profile decides which categories reach ListTools. editorial is the default: it covers an article from brief to published and optimised, and leaves out the surface an editorial agent has no business touching — user management, plugin activation, file permissions, Full Site Editing, WooCommerce.

That is a reduction of surface first and of context second — but be precise about what kind of reduction.

By default a profile shapes ListTools, not the router. A tool the profile withholds is invisible to the model, so it will not be chosen by accident — and accident is the dominant risk. It is not refused: a client that already knows the name can still call it. Until 6.0 this page claimed the withholding was the stronger guarantee, which was true of mistakes and false of anyone deliberate.

Set WP_TOOL_ENFORCE_PROFILE=true and the profile becomes a refusal:

Blocked: "wp_delete_user" is outside the active tool scope (profile "editorial"),
and WP_TOOL_ENFORCE_PROFILE=true. Widen the scope to allow it.

It stays opt-in because the previous behaviour was documented and someone may rely on it. Turn it on for anything shared or remote. The names retired in 6.0 resolve to their replacement first, so wp_audit_seo is allowed exactly when wp_audit is in scope — enforcement does not quietly cancel the compatibility promise.

Even enforced, this is a control inside the MCP process, not a WordPress permission: an operator who can restart the server can restart it without the flag. See Safety Model.

Two columns, because a profile alone does not decide how many tools you see. Out of the box is what a fresh install shows. Fully enabled adds the three conditional groups — WC_CONSUMER_KEY, WP_REQUIRE_APPROVAL, WP_ENABLE_PLUGIN_INTELLIGENCE — each of which gates its own tools regardless of profile.

Profile Categories Out of the box Fully enabled
editorial (default) content · revisions · seo · audit · schema · intelligence · editorial · media · taxonomy · links · engagement · workflow · pluginlayer 68 · ~8.9k 77 · ~9.9k
shop editorial + woocommerce 68 · ~8.9k 97 · ~12.0k
site content · revisions · media · taxonomy · fse · widgets · plugins · pluginlayer 40 · ~5.2k 40 · ~5.2k
maintenance health · performance · security · plugins · users 40 · ~4.0k 40 · ~4.0k
all everything 108 · ~13.1k 137 · ~16.2k

core is always exposed on top of the selected categories. shop shows the same 68 tools as editorial until WooCommerce credentials are configured — the profile admits the category, the credentials release the tools. site and maintenance contain none of the conditional groups, so their two columns are identical.

# Default — no configuration needed
# WP_TOOL_PROFILE=editorial

# Everything, as before profiles existed
WP_TOOL_PROFILE=all

# Or pick categories directly — this always wins over WP_TOOL_PROFILE
WP_TOOL_CATEGORIES=seo,content,schema

A tool left out of the profile stays callable by default. Profiles shape what is advertised in ListTools, not what the server executes — nothing you scripted against stops working. Set WP_TOOL_ENFORCE_PROFILE=true to make the profile refuse instead.

Existing deployments are unaffected. WP_TOOL_CATEGORIES takes precedence over WP_TOOL_PROFILE, so a configuration written before profiles existed keeps its exact behaviour. Only deployments that set neither move from the full catalogue to editorial. The active profile and the exposed count are logged at startup and reported by wp_site_info.

Blocked actions return a clear error message explaining which control prevented execution, and are logged in the audit trail with status blocked.


MU-Plugin Companion

Some tools require the optional MCP Diagnostics companion mu-plugin to access data not available via the WordPress REST API.

Installation

cp companion/mcp-diagnostics.php /path/to/wp-content/mu-plugins/

Exposed endpoints

Diagnostics — require manage_options

Endpoint Method Description
/mcp-diagnostics/v1/debug-log GET Last N lines of debug.log by level
/mcp-diagnostics/v1/cron-events GET All scheduled WP-Cron events
/mcp-diagnostics/v1/transients GET Database transients with expiration/size
/mcp-diagnostics/v1/hooks GET Registered actions and filters

Security — require manage_options

Endpoint Method Description
/mcp-diagnostics/v1/user-activity GET Admin last login timestamps
/mcp-diagnostics/v1/file-permissions GET Critical file permission checks
/mcp-diagnostics/v1/modified-files GET Recently modified file listing

Performance — requires manage_options

Endpoint Method Description
/mcp-diagnostics/v1/database-bloat GET Database bloat analysis

WooCommerce — requires manage_options

Endpoint Method Description
/mcp-diagnostics/v1/wc-abandoned-carts GET Abandoned cart data from available sources

Schema — requires edit_posts

Endpoint Method Description
/mcp-diagnostics/v1/schema/{post_id} GET Read _custom_schema_jsonld meta
/mcp-diagnostics/v1/schema/{post_id} POST Write schema meta. Blocked by WP_READ_ONLY
/mcp-diagnostics/v1/schema/{post_id} DELETE Remove schema meta. Blocked by WP_READ_ONLY

Polylang Free — public (no auth required)

Endpoint Method Description
/mcp-diagnostics/v1/polylang/languages GET Polylang languages list
/mcp-diagnostics/v1/polylang/translations/{post_id} GET Post translations by language

Users — requires manage_options

Endpoint Method Description
/mcp-diagnostics/v1/password-reset POST Trigger password reset email

Diagnostics endpoints require manage_options (Administrator). The change journal below requires edit_others_posts instead — restoring a snapshot rewrites content, so it is gated on the authority to edit that content, not on the diagnostics reader role. No endpoint modifies data except POST /schema/{post_id}, POST /password-reset and the journal writes — all blocked when WP_READ_ONLY=true.

Change journal (companion 1.3.0+) — requires edit_others_posts

Endpoint Method Purpose
/mcp-diagnostics/v1/changes GET List stored changes for a site, without their payloads
/mcp-diagnostics/v1/changes POST Store snapshots. Called once per tool call, not per write
/mcp-diagnostics/v1/changes/{change_id} GET One entry with the values needed to restore it
/mcp-diagnostics/v1/changes/{change_id} POST Mark it rolled back, so a second undo is refused

What is stored: the previous value of the fields a write changed — not the whole resource — plus the tool name, the resource path, the site key and a timestamp. Entries above 256 kB are kept as evidence but not as restore points; restoring a truncated page-builder payload would corrupt the page. Retention is enforced on write, not by cron: 30 days or 500 entries, oldest first.

If a journal write fails, the tool call still succeeds — the in-memory journal answers for the session and only durability is lost. WP_CHANGE_JOURNAL_DURABLE=off skips the probe entirely.


SEO Metadata

The SEO tools auto-detect which SEO plugin is installed on your WordPress site and use the correct meta fields automatically.

Supported plugins:

  • Yoast SEO — _yoast_wpseo_title, _yoast_wpseo_metadesc, _yoast_wpseo_focuskw, plus yoast_head_json REST API extension
  • RankMath — rank_math_title, rank_math_description, rank_math_focus_keyword
  • SEOPress — _seopress_titles_title, _seopress_titles_desc, _seopress_analysis_target_kw
  • All in One SEO — _aioseo_title, _aioseo_description, _aioseo_keywords

SEO Audit Scoring

wp_audit_seo scores each post on a 100-point scale:

Check Penalty
Missing SEO title -30
SEO title too short (< 30 chars) or too long (> 60 chars) -10
Missing meta description -30
Meta description too short (< 120 chars) or too long (> 160 chars) -10
Missing focus keyword -20
Focus keyword not in SEO title -10

Exposing SEO Meta Fields (Required)

Most SEO plugins store their data in WordPress post meta fields that are not exposed via the REST API by default. Without this step, wp_get_seo_meta and wp_audit_seo will return empty results even though your SEO data exists in the database.

Add the following code to your theme's functions.php (Appearance → Theme File Editor → functions.php) or — preferably — create a custom mini-plugin (see below).

Important: When pasting code into functions.php, make sure the file starts with exactly <?php — no extra characters before it. A stray character (like <<?php) will break the WordPress REST API by injecting invalid output before JSON responses, causing Unexpected token '<' errors in MCP.

RankMath:

add_action( 'init', function() {
    $fields = array(
        'rank_math_title',
        'rank_math_description',
        'rank_math_focus_keyword',
        'rank_math_canonical_url',
        'rank_math_robots',
        'rank_math_facebook_title',
        'rank_math_facebook_description',
        'rank_math_facebook_image',
    );
    foreach ( $fields as $field ) {
        foreach ( array( 'post', 'page' ) as $post_type ) {
            register_post_meta( $post_type, $field, array(
                'show_in_rest'  => true,
                'single'        => true,
                'type'          => 'string',
                'auth_callback' => function() {
                    return current_user_can( 'edit_posts' );
                },
            ) );
        }
    }
} );

Yoast SEO:

add_action( 'init', function() {
    $fields = array(
        '_yoast_wpseo_title',
        '_yoast_wpseo_metadesc',
        '_yoast_wpseo_focuskw',
        '_yoast_wpseo_canonical',
        '_yoast_wpseo_meta-robots-noindex',
        '_yoast_wpseo_meta-robots-nofollow',
        '_yoast_wpseo_opengraph-title',
        '_yoast_wpseo_opengraph-description',
        '_yoast_wpseo_opengraph-image',
    );
    foreach ( $fields as $field ) {
        foreach ( array( 'post', 'page' ) as $post_type ) {
            register_post_meta( $post_type, $field, array(
                'show_in_rest'  => true,
                'single'        => true,
                'type'          => 'string',
                'auth_callback' => function() {
                    return current_user_can( 'edit_posts' );
                },
            ) );
        }
    }
} );

SEOPress:

add_action( 'init', function() {
    $fields = array(
        '_seopress_titles_title',
        '_seopress_titles_desc',
        '_seopress_analysis_target_kw',
        '_seopress_robots_canonical',
        '_seopress_robots_index',
        '_seopress_social_fb_title',
        '_seopress_social_fb_desc',
        '_seopress_social_fb_img',
    );
    foreach ( $fields as $field ) {
        foreach ( array( 'post', 'page' ) as $post_type ) {
            register_post_meta( $post_type, $field, array(
                'show_in_rest'  => true,
                'single'        => true,
                'type'          => 'string',
                'auth_callback' => function() {
                    return current_user_can( 'edit_posts' );
                },
            ) );
        }
    }
} );

All in One SEO:

add_action( 'init', function() {
    $fields = array(
        '_aioseo_title',
        '_aioseo_description',
        '_aioseo_keywords',
        '_aioseo_og_title',
        '_aioseo_og_description',
        '_aioseo_og_image_url',
    );
    foreach ( $fields as $field ) {
        foreach ( array( 'post', 'page' ) as $post_type ) {
            register_post_meta( $post_type, $field, array(
                'show_in_rest'  => true,
                'single'        => true,
                'type'          => 'string',
                'auth_callback' => function() {
                    return current_user_can( 'edit_posts' );
                },
            ) );
        }
    }
} );

Note: Core content operations require no WordPress plugin. SEO metadata tools may require exposing meta fields via the REST API using either a theme snippet or this optional micro-plugin.

Instead of modifying your theme's functions.php (which gets overwritten on theme updates), create a standalone micro-plugin.

Create the file wp-content/plugins/mcp-seo-bridge.php:

<?php
/**
 * Plugin Name: MCP SEO Bridge
 * Description: Exposes SEO plugin meta fields via REST API for WordPress MCP Server
 * Version: 1.0.0
 * Author: AdSim
 * Author URI: https://adsim.be
 */

if ( ! defined( 'ABSPATH' ) ) exit;

add_action( 'init', function() {
    $fields = array();

    if ( defined( 'RANK_MATH_VERSION' ) ) {
        $fields = array(
            'rank_math_title', 'rank_math_description', 'rank_math_focus_keyword',
            'rank_math_canonical_url', 'rank_math_robots',
            'rank_math_facebook_title', 'rank_math_facebook_description', 'rank_math_facebook_image',
        );
    } elseif ( defined( 'WPSEO_VERSION' ) ) {
        $fields = array(
            '_yoast_wpseo_title', '_yoast_wpseo_metadesc', '_yoast_wpseo_focuskw',
            '_yoast_wpseo_canonical', '_yoast_wpseo_meta-robots-noindex', '_yoast_wpseo_meta-robots-nofollow',
            '_yoast_wpseo_opengraph-title', '_yoast_wpseo_opengraph-description', '_yoast_wpseo_opengraph-image',
        );
    } elseif ( defined( 'SEOPRESS_VERSION' ) ) {
        $fields = array(
            '_seopress_titles_title', '_seopress_titles_desc', '_seopress_analysis_target_kw',
            '_seopress_robots_canonical', '_seopress_robots_index',
            '_seopress_social_fb_title', '_seopress_social_fb_desc', '_seopress_social_fb_img',
        );
    } elseif ( defined( 'AIOSEO_VERSION' ) ) {
        $fields = array(
            '_aioseo_title', '_aioseo_description', '_aioseo_keywords',
            '_aioseo_og_title', '_aioseo_og_description', '_aioseo_og_image_url',
        );
    }

    foreach ( $fields as $field ) {
        foreach ( array( 'post', 'page' ) as $post_type ) {
            register_post_meta( $post_type, $field, array(
                'show_in_rest'  => true,
                'single'        => true,
                'type'          => 'string',
                'auth_callback' => function() {
                    return current_user_can( 'edit_posts' );
                },
            ) );
        }
    }
} );

Activate it from WordPress Admin → Plugins. This approach auto-detects your SEO plugin and survives theme updates.

Verifying SEO Fields Are Exposed

After adding the code, verify the fields are accessible:

curl -s -u "username:application-password" \
  "https://yoursite.com/wp-json/wp/v2/posts?per_page=1" | python3 -m json.tool | grep -E "rank_math|yoast|seopress|aioseo"

If you see your SEO fields in the meta object, the configuration is working.

Troubleshooting SEO Fields

Symptom Cause Fix
wp_audit_seo returns empty SEO data Meta fields not exposed via REST API Add register_post_meta() code above
Unexpected token '<' on all calls Stray character before <?php Remove any characters before <?php
SEO fields visible but all null SEO plugin not yet configured on posts Set titles/descriptions in RankMath/Yoast editor
No SEO plugin detected Plugin constant not matched Verify your SEO plugin is active
Fields lost after theme update Code was in functions.php Use the MCP SEO Bridge plugin instead

WooCommerce Setup

Generate API Keys

Go to WooCommerce → Settings → Advanced → REST API → Add key.

Set permissions to Read/Write if you plan to use wc_update_product or wc_update_order_status. Set to Read for a read-only WooCommerce integration.

WC_CONSUMER_KEY=ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
WC_CONSUMER_SECRET=cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Price Guardrail

wc_price_guardrail analyzes proposed price changes before any write operation. It returns safe or unsafe based on a configurable threshold (default 20%). Claude should call this tool before wc_update_product when modifying prices.

WC_PRICE_GUARDRAIL_THRESHOLD=20   # percentage — changes above this require explicit override

wc_price_guardrail is always allowed regardless of WP_READ_ONLY. It never modifies data.


Testing

Two suites, and the difference matters.

Unit — 72 test files · 1268 unit tests covering all 137 tools. Zero network calls, fully mocked. They prove the code does what we believe WordPress does. npm test, offline, about two seconds.

Integration — 17 tests against a real WordPress in Docker. They prove what WordPress actually does, which is not the same thing: meta silently dropped unless registered for REST, Application Passwords refused over plain HTTP, the Authorization header lost without the right rewrite rule. Both suites run on every push.

npm run integration:up && npm run test:integration && npm run integration:down

They found two defects no mock could: wp_site_info reporting roles as undefined on every deployment, and change identifiers colliding across restarts. What they do not cover: your host, your security plugin, your CDN, page-builder payloads at real scale, and concurrent writers.

npm test              # run all tests (vitest)
npm run test:watch    # watch mode
npm run test:coverage # coverage report
Test file Scope Tests
governance.test.js All governance flags + combinations including WP_REQUIRE_APPROVAL and WP_CONFIRM_DESTRUCTIVE 30
posts.test.js list, get, create, update, delete, search 18
pages.test.js list, get, create, update 12
media.test.js list, get, upload 14
taxonomies.test.js categories, tags, create term 16
comments.test.js list, create 12
users.test.js list 7
users.crud.test.js get, create, update, delete, roles, capabilities, password reset, app passwords —
search.test.js search, post types, custom posts 10
seo.test.js get, update, audit 12
plugins.test.js list, activate, deactivate 16
themes.test.js list, get 8
revisions.test.js list, get, restore, delete 17
editorial.test.js submit_for_review, approve, reject 15
links.test.js analyze_links, suggest_internal_links 16
woocommerce.test.js products, orders, customers, write, guardrail 40
woocommerce.advanced.test.js product SEO, abandoned carts, checkout friction, performance, stock, duplicates, pricing 37
auditMediaSeo.test.js media alt text audit, filename scoring 12
findOrphanPages.test.js inbound link detection, exclusion list 10
auditHeadingStructure.test.js H1/H2/H3 hierarchy, level skips, keyword detection 12
findThinContent.test.js word count threshold, heading density 10
auditCanonicals.test.js canonical validation, mismatch detection, multi-plugin 12
analyzeEeatSignals.test.js E-E-A-T scoring, author bio, citations, structured data 12
findBrokenInternalLinks.test.js HEAD request batching, 4xx/3xx detection 12
findKeywordCannibalization.test.js focus keyword conflicts, multi-plugin detection 10
auditTaxonomies.test.js Levenshtein duplicates, unused terms, over-tagging 12
auditOutboundLinks.test.js external link profile, nofollow detection 10
contentAnalyzer.test.js readability, TF-IDF, cosine similarity, entities, text diff 44
contentIntelligence.test.js 16 content intelligence tools 125
pluginIntelligence.test.js 6 plugin intelligence tools 48
editorialIntelligence.test.js 6 editorial intelligence tools 37
fse.test.js FSE templates, template parts, global styles, patterns, navigation, widgets —
diagnostics.test.js Site health, debug log, cron, transients, PHP compat, hooks —
performance.test.js Page speed, render blocking, image optimization, caching, database bloat, plugin impact —
schema.test.js Schema generation, injection, live validation —
multilingual.test.js Plugin detection, languages, translations, coverage, SEO translations —
security.test.js User security, file permissions, modified files, vulnerabilities, SSL, login security 37
dynamicFiltering.test.js WooCommerce/editorial/plugin-intelligence/category filtering, combined counts 19
outputCompression.test.js mode=full/summary/ids_only for 10 listing tools 30
site.test.js site info, set target 5
siteOptions.test.js wp_get_site_options: all options, key filtering, 403, audit log 5
destructive.test.js Destructive confirmation flow 12
helpers/pagination.test.js buildPaginationMeta: total_pages, has_more, next_page 5
transport/http.test.js HTTP transport, Bearer auth, sessions 10
pluginDetector.test.js SEO plugin detection, rendered head, HTML head parsing 13
dxt/manifest.test.js MCPB manifest validation 10
contentCompressor.test.js Content compression and field filtering —
plugins/registry.test.js PluginRegistry: ACF/Elementor detection, WP_DISABLE_PLUGIN_LAYERS 6
plugins/contextGuard.test.js applyContextGuard: threshold, truncation, raw bypass 4
plugins/iPluginAdapter.test.js validateAdapter: complete adapter, missing fields 3
plugins/acf/acfAdapter.test.js ACF read tools: fields, filter, contextGuard, groups 10
plugins/acf/acfAdapter.write.test.js ACF write: update fields, WP_READ_ONLY blocking 8
plugins/elementor/elementorAdapter.test.js Elementor: templates, page data, contextGuard 10
pluginLayer.test.js Plugin Layer integration: listTools, callTool routing 8
perTargetControls.test.js Per-target governance controls —
approval.test.js Approval workflow integration —
woocommerceIntelligence.test.js WooCommerce intelligence tools —
woocommerceWrite.test.js WooCommerce write tools —

Each test verifies: success response shape, governance blocking (write tools), HTTP error handling (403/404), and audit log entries.


Structured Audit Log

Every tool invocation is recorded as a JSON event on stderr — ready for ingestion into Datadog, Splunk, CloudWatch, Langfuse, ELK, or any JSON-compatible pipeline.

{
  "timestamp": "2026-03-11T10:42:00.000Z",
  "tool": "wp_create_post",
  "target": 1234,
  "target_type": "post",
  "action": "create",
  "status": "success",
  "latency_ms": 245,
  "site": "production",
  "params": { "title": "New Post", "status": "draft" },
  "error": null
}

79+ instrumentation points across all tools. Status is success, error, blocked, pending or dry_run.

Sequence and hash chain

Each entry carries seq, prev and hash. prev is the hash of the entry before it, so altering one line invalidates every line after it, and a collector that sees 41 then 43 knows an event was lost — stderr offers no delivery guarantee, and this is what makes the gap visible.

{ "timestamp": "…", "tool": "wp_delete_post", "status": "success",
  "seq": 42, "prev": "9f2c…", "hash": "b71e…" }

Verify a log with the shipped script — a chain nobody can check is decoration:

npm run verify:audit -- /var/log/wp-mcp.log
128 entries, seq 1 → 128, links keyed by WP_MCP_SECRET
Chain intact.

What it proves depends on the key. Unkeyed, the links are plain SHA-256: they catch loss, reordering and careless edits, but anyone rewriting the whole file can recompute them. Set WP_MCP_SECRET and the links become HMAC-SHA-256 — the chain can then be verified by whoever holds the secret and forged by no one else. The verification script says which mode it ran in rather than letting you assume.

Neither mode turns stderr into immutable storage. Ship the log to append-only or WORM storage if that is the requirement; the chain then tells you whether what arrived is what was sent. WP_AUDIT_CHAIN=off removes the fields.

Field Description
timestamp ISO 8601
tool Tool name invoked
target Resource ID when applicable
target_type Resource type
action Operation performed
status success, error, blocked, pending (awaiting a confirmation token) or dry_run
latency_ms Execution time
site Active target name
params Sanitized parameters (content truncated)
error Error detail or null

Multi-Target

Manage multiple WordPress sites from a single server instance. Designed for agencies and multi-brand organizations.

Inline configuration:

WP_TARGETS_JSON='{"production":{"url":"https://mysite.com","username":"admin","password":"xxxx"},"staging":{"url":"https://staging.mysite.com","username":"editor","password":"xxxx"}}'

File-based configuration:

WP_TARGETS_FILE=/path/to/targets.json
{
  "production": {
    "url": "https://mysite.com",
    "username": "admin",
    "password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  },
  "staging": {
    "url": "https://staging.mysite.com",
    "username": "editor",
    "password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  },
  "client-blog": {
    "url": "https://client.com",
    "username": "content-manager",
    "password": "xxxx xxxx xxxx xxxx xxxx xxxx"
  }
}

Switch targets during a session with wp_set_target. All available sites and the active target are visible in wp_site_info.


Health & Reliability

The server performs a health check on startup: REST API connectivity, user authentication, and role verification. During operation: automatic retry with exponential backoff (configurable, default 3 attempts), request timeout (default 30s), rate limit handling (respects 429 + retry-after), and contextual error messages with diagnosis guidance.

Setting Default Description
WP_MCP_VERBOSE false Debug-level logging
WP_MCP_TIMEOUT 30000 Request timeout (ms)
WP_MCP_MAX_RETRIES 3 Max retry attempts

Security

  • HTTPS required in production. HTTP only for localhost
  • Application Passwords only — never use WordPress login credentials
  • Credentials never logged — audit trail sanitizes all sensitive data
  • No credentials in code — .env or environment variables only
  • Instant revocation — Application Passwords can be revoked from WordPress admin
  • Traceable requests — custom User-Agent: WordPress-MCP-Server/6.2.1
  • Bearer token auth in HTTP mode — timing-safe comparison, no token in logs
  • Origin validation in HTTP mode — anti-DNS-rebinding protection

Reporting a vulnerability, what is in scope, and the documented limits of this model: SECURITY.md.


Troubleshooting

Issue Solution
401 Unauthorized Verify username and Application Password
403 Forbidden Check WordPress user role and capabilities
404 Not Found Verify WP_API_URL and REST API availability
Unexpected token '<' Stray character before <?php in functions.php — see SEO Troubleshooting
Blocked: READ-ONLY mode Disable WP_READ_ONLY to allow writes
Blocked: DRAFT-ONLY mode Only draft/pending allowed. Check WP_DRAFT_ONLY
Blocked: PLUGIN MANAGEMENT Disable WP_DISABLE_PLUGIN_MANAGEMENT to allow activate/deactivate
Blocked: APPROVAL REQUIRED Use wp_submit_for_review then wp_approve_post
Confirmation token required WP_CONFIRM_DESTRUCTIVE=true — pass returned token within 60s
401 Unauthorized (HTTP mode) Set MCP_AUTH_TOKEN and pass Authorization: Bearer <token>
403 Forbidden (HTTP mode) Check MCP_ALLOWED_ORIGINS includes your client origin
WooCommerce 401 Verify WC_CONSUMER_KEY and WC_CONSUMER_SECRET
WooCommerce 403 API key needs Read/Write permissions for write tools
Rate limit exceeded Adjust WP_MAX_CALLS_PER_MINUTE
Timeout Increase WP_MCP_TIMEOUT or check server
Site not found Verify site key in WP_TARGETS_JSON or file
No SEO plugin detected Install Yoast, RankMath, SEOPress, or AIOSEO
SEO meta fields empty Add register_post_meta() code or install MCP SEO Bridge plugin
PAGESPEED_API_KEY missing wp_audit_page_speed returns partial data. Add key to .env
WPSCAN_API_KEY missing wp_audit_plugin_vulnerabilities lists plugins without CVEs. Set key for full scan
mu-plugin not installed Debug log / file permissions / abandoned carts return error. Copy companion/mcp-diagnostics.php to mu-plugins/
No multilingual plugin wp_list_languages returns site default only. Install WPML, Polylang, or TranslatePress
WP_TOOL_CATEGORIES unknown category Only core tools exposed. Check category names in README
Schema not rendering in <head> wp_inject_schema succeeded but schema not in output. Install mu-plugin companion
wp_find_broken_internal_links slow Reduce batchSize parameter or increase timeoutMs
Server not starting Check Node.js 20+ is installed: node --version

Development

# Clone the repository
git clone https://github.com/GeorgesAdSim/wordpress-mcp-server.git
cd wordpress-mcp-server

# Install dependencies
npm install

# Run tests
npm test

# Run locally (stdio)
WP_API_URL="https://your-site.com" \
WP_API_USERNAME="user" \
WP_API_PASSWORD="xxxx xxxx xxxx xxxx" \
node index.js

# Run locally (HTTP)
MCP_TRANSPORT=http \
MCP_AUTH_TOKEN=dev-token \
WP_API_URL="https://your-site.com" \
WP_API_USERNAME="user" \
WP_API_PASSWORD="xxxx xxxx xxxx xxxx" \
node index.js

# Build MCPB bundle
npm run build:mcpb

Testing with MCP Inspector

npx @modelcontextprotocol/inspector node index.js

Changelog

v6.2.1 (2026-07-29) — Documentation

No code changes. Two rounds of external review found claims in this README that no longer matched the software, and 6.2.0 shipped before they were corrected — so the npm and Claude Desktop listings still carried them. This release exists to replace those.

  • The Safety Model said the audit log carried "no signature, no hash chain". 6.1 added both, and a whole section describes them. The most visible contradiction in the document.
  • "Plugin-Free" and "works against a stock WordPress with nothing installed" were true of the core operations and false of the catalogue: WooCommerce tools need WooCommerce, SEO tools need an SEO plugin, the durable journal needs the companion. The promise is that nothing MCP-specific has to be installed, not that nothing does.
  • Data Retention still said the journal dies with the process. 6.2 made that false. It is now stated as three levels: nothing on the server's disk, a bounded in-memory journal, and — with the companion — snapshots persisted in WordPress.
  • Profile counts contradicted each other, 108 in one table and 128 in another, because they assumed different feature switches without saying so. The table now has two columns, out of the box and fully enabled, and shop is shown for what it is: identical to editorial until WooCommerce credentials exist.
  • "Default non-destructive" became what is true — deletes go to the trash, blocking them outright and requiring a signed confirmation are opt-in. "Maximum safety" enabled both WP_DISABLE_DELETE and WP_CONFIRM_DESTRUCTIVE, which the priority order makes pointless; it is now two separate configurations.
  • The audit status table listed three of five values. The companion's change-journal endpoints were undocumented, along with the edit_others_posts they require. The roadmap still presented six shipped versions as upcoming. Version-bearing examples were three releases stale and are now generated by npm run check:metadata.
  • The MCPB manifest description carried the same claims and has been rewritten.
  • 137 tools · 1268 Vitest tests · 17 integration tests

v6.2.0 (2026-07-29) — Undo That Survives

  • The change journal is durable when the companion is installed — no configuration. The server probes for it on the first write of each target and caches the answer, so a companion added mid-session is picked up on the next one. Snapshots are stored by MCP Diagnostics Companion 1.3.0 in a dedicated table.
  • Why this matters. The in-memory journal covered one case: undo what I just did. It did not survive a restart, and it did not reach a colleague on another machine working the same client site — the case that actually matters to an agency.
  • The promise still holds. The server writes nothing to disk; the snapshots never leave the WordPress they came from. A table rather than post meta, because meta is returned by REST reads and would bloat every response, and because meta is deleted along with the post whose restoration is the whole point.
  • Cost. One flush per tool call, not per write: a bulk update across forty posts costs one request. Writes that changed nothing are not persisted — they have nothing to restore. A failed flush is not fatal; the in-memory journal still answers for the session and only durability is lost. WP_CHANGE_JOURNAL_DURABLE=off disables the probe.
  • Retention is enforced by the companion on write, not by cron: 30 days or 500 entries. Reading or restoring requires edit_others_posts, not the diagnostics reader role — replaying a snapshot rewrites content.
  • Fix: change identifiers were unique within a process, not across processes. The counter restarted at 1, and the durable store keys on the identifier, so the first write of a new session overwrote the previous session's — precisely the one an operator wants back after a restart. Identifiers now carry a per-process token (chg_a3f9c1_1). Found by the integration suite on its first run against the durable store; no unit test could see it, since it only appears with real storage outliving the journal.
  • 137 tools · 1268 Vitest tests · 17 integration tests

v6.1.0 (2026-07-29) — Enforcement, Evidence, and a Real WordPress

  • WP_TOOL_ENFORCE_PROFILE. A profile shaped ListTools and nothing else, while this page called withholding "a stronger guarantee than refusing" — true of accidents, false of anyone who knew the tool's name. Set the flag and the profile refuses. Opt-in, because the previous behaviour was documented; recommended for anything shared or remote. Names retired in 6.0 resolve to their replacement first, so enforcement does not quietly cancel the compatibility promise.
  • The audit trail is sequenced and chained. Every entry carries seq, prev and hash; npm run verify:audit checks a log. Unkeyed it catches loss, reordering and careless edits. With WP_MCP_SECRET the links are HMAC-SHA-256, which only the holder of the secret can forge. It still does not make stderr immutable storage, and the documentation says so.
  • An integration suite against a real WordPress, in Docker, wired into CI. The unit tests mock every response, so they prove the code does what we believe WordPress does; these prove what it actually does — meta silently dropped unless registered for REST, Application Passwords refused over plain HTTP, the Authorization header lost without the right rewrite rule.
  • Fix: wp_site_info reported current_user.roles as undefined on every deployment. /wp/v2/users/me answers in view context by default, where roles and capabilities are absent from the schema. No unit test could see it — the mock returned a field WordPress does not. wp://site had the same defect. Found by the integration suite on its first green run.
  • 137 tools · 1268 Vitest tests

v6.0.0 (2026-07-28) — The Cut

A major version buys one thing: the right to break. This one spends it on removal. Prompts, resources and the token change ride along because they were ready, not because they needed a major.

Breaking

  • 43 tool names are no longer advertised. wp_audit replaces 21 audit tools that differed only by which check they ran; wp_site_design replaces 22 Full Site Editing tools that were list/get/create/update/delete repeated across five resource types. The catalogue drops from 178 to 137, and the default editorial profile from 88 tools to 68. The old names remain callable — they are removed from ListTools, not from the router, so anything already scripted against them keeps working. The handlers go in 6.1.
  • WP_TOOL_CATEGORIES=seo no longer includes the audits. They moved to a new audit category; ask for seo,audit. Profiles are unaffected.
  • Widgets left the fse category for their own. Sidebars are the classic theme system, not the block one, and filing them together hid four classic-theme tools behind a block-theme label. They are in the site profile.
  • The confirmation token changed format. HMAC-SHA-256 over the post, action and timestamp, truncated to 64 bits instead of 16, compared in constant time. The signature is 16 hex characters instead of 4. Tokens issued by an older server no longer validate — they expire in 60 seconds anyway.

Added

  • MCP prompts for the four built-in workflows, generated from their definitions so a prompt cannot describe a sequence the server does not run. Prompts are user-initiated: a model running on its own never invokes one, and does not need to.
  • MCP resources: wp://site, wp://post-types, wp://taxonomies, wp://governance. The last one reads no network — it answers "why was that blocked" even when the site is unreachable. Audits stayed tools: an audit takes arguments, a resource does not.

Fixed

  • seo_audit_and_stage had never worked. Two of its three steps named tools that do not exist (wp_audit_seo_score, wp_analyze_readability) and the third passed source_post_id to a tool whose schema expects source_id. The executor stops at the first failure, so the workflow died on step one — inside wp_run_workflow, the most called tool on the server. A test asserted the template resolution and confirmed the wrong argument names. Three new tests now check that every step calls a tool that exists, that every argument is one its schema accepts, and that every {{placeholder}} is declared.
  • A governance hole the consolidation would have opened. WRITE_TOOLS derived from the advertised definitions, which no longer contain the superseded tools — so a wp_create_template called by its old name would have stopped being refused by WP_READ_ONLY. Enforcement now derives from the raw definitions: superseded does not mean ungoverned.
  • ListTools strips every internal field rather than only _category.
  • 137 tools · 1250 Vitest tests

v5.9.0 (2026-07-28) — Undo

  • wp_list_changes and wp_rollback_change. Every write recorded by the 5.8 diff now carries a change_id. The journal keeps the previous value of the fields that actually moved — so an entry is the size of the change, not the size of the resource — and wp_rollback_change writes them back. A rollback is itself a write, so it enters the journal as its own change: the undo can be undone. Rolling the same change back twice is refused, because the snapshot no longer describes the resource.
  • Three cases are declared unrollbackable when they are recorded, not when you try. A write that changed nothing has nothing to put back; a permanent deletion (force=true) cannot be replayed since the ID and its relations are gone; a previous state above 256 kB is kept as evidence but not as a restore point, because restoring a truncated page-builder payload would corrupt the page. Discovering any of this at rollback time, on a client site, would be the wrong moment.
  • The rollback does not go through WordPress revisions. Revisions cover title, content and excerpt and never meta — not Yoast, not Rank Math, not _elementor_data — and matching a revision to the pre-write state is guesswork once another actor has written. Replaying the journal's own snapshot is exact, and one mechanism beats two. wp_restore_revision remains available for what it does well: native, durable revisions visible in wp-admin.
  • Governance applies to undo. WP_READ_ONLY refuses a rollback like any other write, and WP_DRAFT_ONLY prevents republishing through it.
  • WP_CHANGE_JOURNAL sets how many changes are kept (20 by default) or off to keep none.
  • The Data Retention section changed, and this is deliberate. It previously claimed content was never "retained in memory beyond the scope of a single tool invocation". Undo is not possible without keeping something. The section now states exactly what is kept, for how long, and how to switch it off — nothing is written to disk, ever, and the journal dies with the process.
  • Fixes a bug caught before it shipped: the journal did not record which API client produced an entry, so undoing a WooCommerce write to /products/42 would have replayed it against the WordPress API.
  • 178 tools · 1208 Vitest tests

v5.8.0 (2026-07-28) — Write Safety

  • dry_run on every mutating tool. Four tools out of 176 offered it, with three different implementations; all 48 now accept it. Interception lives in the API layer rather than in each handler, so it covers writes reached indirectly, holds for tools added later, and holds even for a handler that ignores its own argument. Nothing is sent — the server reports the request it would have made. A dry run bypasses WP_READ_ONLY, WP_DISABLE_DELETE and WP_DISABLE_PLUGIN_MANAGEMENT: nothing leaves the process, so those controls have nothing to protect, and previewing what a read-only deployment would do is what makes it auditable. Execution stops at the first write, which the response states rather than hides; wp_bulk_update and wp_run_workflow keep their own fuller previews.
  • WP_WRITE_DIFF — writes are compared against the resource as it was. auto (default) covers posts and pages, all covers every single-resource endpoint, off disables it. The comparison is against what WordPress returns, not against the request body: comparing against what was sent would reproduce exactly the lie this is meant to catch. The "after" side is free — the REST API returns the updated resource — so it costs one extra GET per write, not two.
  • changes.effective answers the question a handler cannot answer about itself. A write can succeed and change nothing: the value sent was identical, WordPress rejected it silently, or a page builder masks it — the Elementor failure the 5.6 guard was written for, now detected generically without knowing anything about Elementor.
  • Tool effects are declared, not listed. Governance ran on three hand-maintained arrays of names in index.js, which is how nine WooCommerce readers drifted into the write list until 5.7.1. Each mutating tool now declares _effect (write, destructive, or conditional for the four that read and write depending on arguments); WP_READ_ONLY and WP_DISABLE_DELETE derive from it, so a new write tool is governed the moment it is declared. wp_revoke_application_password moves from write to destructive — it is irreversible and locks out the integration that uses it, and WP_DISABLE_DELETE=true now refuses it.
  • ListTools strips every underscore-prefixed field rather than only _category, so internal classification never reaches a client.
  • 176 tools · 1190 Vitest tests

v5.7.1 (2026-07-28) — Read-only mode could not read WooCommerce

  • Fix: WP_READ_ONLY=true blocked nine read-only WooCommerce tools. wc_list_products, wc_get_product, wc_list_orders, wc_get_order, wc_list_customers, wc_inventory_alert, wc_order_intelligence, wc_seo_product_audit and wc_suggest_product_links were listed among the write tools, so the deployment profile meant to be the safest could not read a product or an order. Of the 20 WooCommerce tools only three write — wc_update_product, wc_update_stock, wc_update_order_status — and those are still blocked.
  • The list is now a named WRITE_TOOLS constant, and a test asserts it never contains a tool documented as read-only. Four write tools stay out of it on purpose: wp_inject_schema, wp_sync_seo_meta_translations, wp_get_pillar_content and wp_get_twitter_meta read as well as write, and gate only their write path.
  • 176 tools · 1165 Vitest tests

v5.7.0 (2026-07-27) — Tool Profiles, Coherent Metadata

  • WP_TOOL_PROFILE — changes the default tool surface. Named category sets: editorial (default, 86 tools, ~10.3k tokens), shop (106), site (59), maintenance (38), all (167 — the previous behaviour). The point is reach more than context: wp_delete_user, wp_reset_user_password, wp_deactivate_plugin, wp_check_file_permissions and the 26 Full Site Editing tools are no longer offered to an agent whose job is writing articles. Tools outside the profile remain callable — a profile shapes ListTools, not the router, so nothing scripted against this server stops working. WP_TOOL_CATEGORIES keeps precedence: any deployment that already set it is unaffected, and only deployments setting neither variable move from the full catalogue to editorial. The active profile and the exposed count are logged at startup and reported by wp_site_info.
  • Two new categories (19 total): revisions, split out of plugins — an agent allowed to write must be allowed to restore, and the editorial profile would otherwise have granted one without the other; and pluginlayer for the ACF and Elementor adapters, so that a profile which rightly excludes plugin activation does not also drop elementor_insert_link.
  • Confirmation tokens are no longer signed with a shipped constant. When WP_MCP_SECRET is unset the server now generates a random per-process secret instead of falling back to mcp-default-secret, which was published on npm and made every token forgeable. HTTP mode refuses to start when WP_CONFIRM_DESTRUCTIVE=true without a stable secret; stdio warns and keeps running.
  • Safety Model restated. The governance controls are documented as operational guardrails enforced inside the MCP process — protection against agent error, not a security boundary, which remains the capabilities of the WordPress account. The audit trail is documented for what it is: observability on stderr, with no signature, hash chain or delivery guarantee.
  • Generated metadata. npm run sync:metadata derives version, tool count and test counts from the code; npm run check:metadata fails CI on any drift. README, package.json and the MCPB manifest previously announced 173, 175, 176 or 180 tools depending on where you looked — the real count is 176.
  • MCPB manifest repaired. Its version was pinned at 4.14.0, its tool list was missing 9 tools (including the entire staging workflow) and carried 167 stale descriptions out of 174, and the wp_require_approval / wp_confirm_destructive toggles were wired to no environment variable — ticking them did nothing. The list is now generated, and wp_tool_profile and wp_mcp_secret are exposed in Claude Desktop.
  • Roadmap renumbered. It listed v4.14, v4.15 and v5.0 as upcoming while those versions had shipped in March. The TypeScript migration is dropped rather than deferred.
  • 176 tools · 1161 Vitest tests

v5.6.0 (2026-07-27) — No More Silent No-Op Writes (Elementor + Schema)

  • Elementor guard: wp_update_post/wp_update_page now REFUSE content writes on Elementor-built pages (_elementor_edit_mode=builder) instead of reporting a success that the _elementor_data render masks. Detection: companion endpoint (authoritative) → fallback post meta / data-elementor-* markers in rendered content. Explicit hint towards elementor_insert_link / elementor_update_widget; updates without content stay allowed.
  • wp_inject_schema verified persistence: the REST fallback writes a protected meta (_custom_schema_jsonld) that WordPress silently drops — the tool now reads the meta back and errors explicitly instead of simulating success. New channel + rendering fields in the response.
  • Companion 1.2.0: rank_math/json_ld integration (schema merged into Rank Math's @graph, no duplicate script block), wp_head output moved to priority 99 with re-encoded JSON, and Elementor CSS cache purge (Post_CSS::delete() + files_manager->clear_stack() + _elementor_css meta delete) after every _elementor_data write, including link insertion.
  • 180 tools · 1137 Vitest tests

v5.3.1 (2026-03-11) — ACF REST Integration Fix

  • Fix: wp_get_post and wp_get_page now include acf_fields from WP REST acf field
  • Fix: wp_get_post_meta includes acf_fields alongside meta via ?_fields=meta,acf
  • Fix: acf_get_fields second fallback via wp/v2?_fields=acf when acf/v3 returns empty
  • Hint displayed when ACF data is empty (Show in REST API diagnostic)
  • 176 tools · ~1109 Vitest tests

v5.3.0 (2026-03-11) — ACF Fallback + Post Meta

  • wp_get_post_meta: generic post meta reader — ACF, Elementor, Yoast, any custom meta
  • ACF adapter: WP Core meta fallback when acf/v3 returns 404 (ACF free support)
  • ACF adapter: diagnostic warning with causes when fields are empty
  • Auto-parse JSON meta values (_elementor_data, etc.)
  • 176 tools · ~1109 Vitest tests

v5.1.0 (2026-03-11) — Workflow Orchestrator

  • wp_run_workflow: execute named or custom tool sequences in a single call
  • 4 built-in workflows: seo_audit_and_stage, site_health_report, content_publish_safe, wc_product_audit
  • Template variables: {{key}} resolved from context
  • dry_run mode: preview execution plan before running
  • stop_on_error control: abort or continue on step failure
  • 175 tools · ~1101 Vitest tests

v5.0.0 (2026-03-11) — Modular Architecture

  • Refactored monolithic index.js (~9000 lines) into 18 tool modules + 4 shared modules
  • Zero functional changes — all 180 tools and 1093 tests unchanged
  • New structure: src/tools/*.js (18 category modules) + src/shared/*.js (context, utils, governance, api) + src/plugins/registry.js
  • handleToolCall reduced from ~8000-line switch/case to modular dispatch (~40 lines)
  • Foundation for wp_run_workflow (v5.1.0)

v4.20.0 (2026-03-11) — Block Validation

  • wp_validate_block_structure: validate Gutenberg block HTML (unclosed blocks, malformed JSON, invalid nesting, deprecated blocks)
  • WP_VALIDATE_BLOCKS: optional guard on wp_update_post/wp_update_page — blocks save if invalid structure
  • 180 tools · ~1093 Vitest tests

v4.19.0 (2026-03-11) — Bulk Update

  • wp_bulk_update: bulk update content across multiple posts/pages with dry-run safety
  • Supports: replace_text, update_meta, update_status, append_content operations
  • Two-step safety: dry_run=true (default) → preview, then confirm=true to execute
  • Batch processing with configurable batch_size and limit (max 500)
  • 179 tools · ~1084 Vitest tests

v4.15.0 (2026-03-11) — Visual Staging (5 tools)

  • wp_create_staging_draft: clone live page to shadow draft
  • wp_list_staging_drafts: list all pending staging drafts
  • wp_get_staging_preview_url: native WordPress preview URL
  • wp_merge_staging_to_live: merge validated draft to production
  • wp_discard_staging_draft: discard without touching live page
  • WP_VISUAL_STAGING: automatic interception on wp_update_post/wp_update_page
  • Completes the enterprise governance triad
  • 178 tools · ~1076 Vitest tests

v4.14.0 (2026-03-11) — Editorial Intelligence Advanced

6 new editorial analysis tools for content-driven teams. All read-only, batch-optimized up to 500 posts.

  • wp_suggest_content_updates — stale content detection with outdated date references
  • wp_audit_author_consistency — author profiling with deviation analysis
  • wp_build_editorial_calendar — seasonality, best publishing days, gap detection
  • wp_find_pillar_content_gaps — topics with 3+ posts without pillar page
  • wp_audit_internal_link_equity — link graph with orphan/over-linked detection
  • wp_suggest_content_cluster — TF-IDF cosine similarity clustering
  • 1061 Vitest unit tests · 173 tools

v4.12.0 — WooCommerce Advanced Intelligence

7 new WooCommerce analytics tools for agencies. All read-only.

  • wc_audit_product_seo — product SEO scoring /100
  • wc_find_abandoned_carts_pattern — abandoned cart analysis (3 data source adapters)
  • wc_audit_checkout_friction — checkout friction scoring 0-10
  • wc_get_product_performance — product metrics with period comparison
  • wc_audit_stock_alerts — out-of-stock audit with variation support
  • wc_find_duplicate_products — duplicate detection by SKU and Levenshtein similarity
  • wc_audit_pricing_consistency — pricing error detection

v4.11.0 — Security Audit

6 new security audit tools. All read-only.

  • wp_audit_user_security — admin account risk assessment
  • wp_check_file_permissions — critical file permission checks
  • wp_list_recently_modified_files — suspicious file modification detection
  • wp_audit_plugin_vulnerabilities — WPScan CVE scanning
  • wp_check_ssl_certificate — TLS and security header grading
  • wp_audit_login_security — login security scoring /100

v4.10.0 — Multilingual Intelligence EU

6 new multilingual tools. WPML, Polylang Pro, Polylang Free, TranslatePress.

  • wp_detect_multilingual_plugin — auto-detection with priority fallback
  • wp_list_languages — language listing with post counts
  • wp_get_post_translations — translation mapping across all plugins
  • wp_audit_translation_coverage — coverage percentages and missing counts
  • wp_find_missing_seo_translations — SEO metadata gaps in translations
  • wp_sync_seo_meta_translations — cross-language SEO meta sync (dry_run default)

v4.9.0 — Schema.org Intelligence

7 new schema tools: generation + injection + validation.

  • wp_generate_schema_article/faq/howto/localbusiness/breadcrumb — 5 schema generators
  • wp_inject_schema — JSON-LD injection with dry_run support
  • wp_validate_schema_live — live URL validation against Google requirements

v4.8.0 — Performance & Core Web Vitals

6 new performance tools + complete user management (10 tools).

  • wp_audit_page_speed — Google PageSpeed Insights integration
  • wp_find_render_blocking_resources — render-blocking detection
  • wp_audit_image_optimization — media optimization audit
  • wp_check_caching_status — caching plugin detection
  • wp_audit_database_bloat — database health analysis
  • wp_get_plugin_performance_impact — plugin performance ranking
  • User CRUD: wp_get_user, wp_create_user, wp_update_user, wp_delete_user
  • User security: wp_list_user_roles, wp_get_user_capabilities, wp_reset_user_password, wp_list_user_application_passwords, wp_revoke_application_password

v4.7.0 — Site Health & Diagnostics + FSE

26 FSE tools + 8 diagnostics tools + companion mu-plugin.

  • Full Site Editing: templates, template parts, global styles, block patterns, navigation menus, widgets
  • Site Health: status, issues, system info
  • Diagnostics: debug log, cron events, transients, PHP compatibility, active hooks
  • companion/mcp-diagnostics.php — mu-plugin for data not available via REST API

v4.6.0 — Plugin Intelligence Layer

Extensible adapter architecture for third-party plugins.

  • src/plugins/registry.js — PluginRegistry with REST namespace discovery
  • ACF adapter: acf_get_fields, acf_list_field_groups, acf_get_field_group, acf_update_fields
  • Elementor adapter: elementor_list_templates, elementor_get_template, elementor_get_page_data
  • wp_site_info reports plugin_layer (detected plugins, tools count)

v4.5.1 — Context Optimization

LLM context reduction across all tools — zero breaking changes.

  • WP_COMPACT_JSON — compact JSON output (~30% token reduction)
  • WP_TOOL_CATEGORIES — category-based tool filtering (18 categories)
  • Pagination has_more metadata on 10 listing tools
  • 53 property descriptions trimmed (~446 tokens saved)
  • getFilteredTools() — dynamic tool filtering by env vars

v4.5.0 — Plugin Intelligence (RankMath + Yoast)

6 new tools exploiting native SEO plugin API endpoints.

  • wp_get_rendered_head — rendered <head> fetching via RankMath/Yoast
  • wp_audit_rendered_seo — bulk rendered vs stored SEO comparison
  • wp_get_pillar_content — RankMath cornerstone flag
  • wp_audit_schema_plugins — JSON-LD validation from plugin fields
  • wp_get_seo_score — RankMath native SEO score
  • wp_get_twitter_meta — Twitter Card meta management

v4.4.0 — Content Intelligence

16 new read-only analysis tools.

  • src/contentAnalyzer.js — shared engine: readability, TF-IDF, cosine similarity, entity extraction
  • Editorial: content brief, outline, readability, update frequency, link map, anchor texts
  • Technical: schema markup, content structure, duplicate detection, content gaps
  • Advanced: FAQ extraction, CTA detection, entity extraction, publishing velocity, revision diff, word count

v4.2.0 — SEO Audit Suite (Sprint 3)

  • wp_find_broken_internal_links, wp_find_keyword_cannibalization, wp_audit_taxonomies, wp_audit_outbound_links

v4.1.0 — SEO Audit Suite (Sprint 2)

  • wp_find_thin_content, wp_audit_canonicals, wp_analyze_eeat_signals

v4.0.0 — SEO Audit Suite (Sprint 1)

  • wp_audit_media_seo, wp_find_orphan_pages, wp_audit_heading_structure

v3.6.0 — WooCommerce Write

  • wc_update_product, wc_update_stock, wc_update_order_status
  • WC_PRICE_GUARDRAIL_THRESHOLD — configurable price change safety

v3.5.0 — WooCommerce Intelligence

  • wc_inventory_alert, wc_order_intelligence, wc_seo_product_audit, wc_suggest_product_links

v3.4.0 — WooCommerce Core

  • wc_list_products, wc_get_product, wc_list_orders, wc_get_order, wc_list_customers, wc_price_guardrail
  • wp_analyze_links, wp_suggest_internal_links
  • src/linkUtils.js — shared link utilities

v3.2.0 — Governance Workflows

  • Editorial approval: wp_submit_for_review, wp_approve_post, wp_reject_post
  • WP_REQUIRE_APPROVAL, WP_CONFIRM_DESTRUCTIVE
  • src/confirmationToken.js — stateless token system

v3.1.0 — MCPB Bundle

  • dxt/manifest.json — MCPB v0.3 spec
  • OS keychain credential storage

v3.0.0 — HTTP Streamable Transport

  • HTTP transport (MCP spec 2025-03-26) via MCP_TRANSPORT=http
  • Bearer auth, session management, origin validation
  • Dual mode: stdio + HTTP simultaneously

v2.2.0 — Enterprise Edition

  • Plugins (list/activate/deactivate), themes (list/get), revisions (list/get/restore/delete)
  • WP_DISABLE_PLUGIN_MANAGEMENT

v2.1.0 — Enterprise Governance + Multi-Target

  • Governance controls (read-only, draft-only, allowlists)
  • Structured JSON audit trail
  • Multi-target site management
  • SEO auto-detection for 4 plugins

v1.0.0 (2025-10-17)

  • Initial release — 5 tools (list, get, create, update, search posts)

Roadmap

Everything the earlier roadmap listed through v6.0 has shipped — see the Changelog. What is left:

Under consideration

  • OAuth 2.1 on the HTTP transport. The MCP server can act as its own resource server; WordPress is not involved and needs no plugin. It would replace the single static bearer token with per-client identity, which is also what would let the audit trail name who made a change rather than only that the server did.
  • Google Search Console signals feeding the audit checks, so cannibalisation and decay are ranked on measured data rather than inferred from content alone.
  • Redirect intelligence — creating 301s and surfacing 404s.
  • Consuming the WordPress Abilities API, exposing abilities declared by third-party plugins as MCP tools.

No dates. The tool count stays frozen: a new tool must retire one, or be composed from those that exist.

Contributing

Contributions welcome. Open an issue or submit a pull request.

Security issues go to SECURITY.md instead — privately, not in a public issue.

License

MIT — see LICENSE. The licence covers the code, not the names: see TRADEMARK.md.

Credits

Built by AdSim — Digital Marketing & AI Agency, Liege, Belgium.

Building the governance layer for Claude-powered WordPress infrastructure in regulated environments.