WordPress Plugins
Free Tools
Claude Skills
Pricing Blog Switch to Royal Plugin Graveyard Support My Account Cart
Home Support Royal MCP Reference

Royal MCP Reference

The full Royal MCP reference in one place. Installation and configuration walkthroughs. Supported AI platforms. Seven plugin integrations that auto-register when the sibling plugin is active. The composer pattern for one-call publish flows. The free undo-token system. The Activity Log. And the REST API endpoints. Anchor links from the old hub URL still resolve here.

Installation

From WordPress.org (recommended)

Search for the plugin

In your WordPress admin, go to Plugins → Add New and search for “Royal MCP”.

Install and activate

Click Install Now, then Activate once installation completes.

Configure settings

Navigate to Royal MCP → Settings in your admin menu to begin setup.

Manual installation

Download the plugin

Download the ZIP file from WordPress.org or your purchase receipt.

Upload via WordPress

Go to Plugins → Add New → Upload Plugin, choose the ZIP file, and click Install Now.

Activate the plugin

Click Activate Plugin after installation completes.

Configuration

Enable Royal MCP integration

Toggle the main switch to ON to activate the MCP endpoints.

Copy your API key

An API key is auto-generated on activation. Copy this for use with AI platforms.

Add AI platforms

Use the dropdown to add platforms such as Claude, ChatGPT, and Perplexity. Enter their API keys.

Test connection

Click Test Connection on each platform card to verify setup.

WordPress API key vs. platform API key

Your WordPress API key is different from platform API keys. The WordPress key authenticates requests to your site; platform keys authenticate requests from your site to AI services. See API Keys → for the full reference.

Royal MCP Settings Page

The main Royal MCP settings page showing API key and endpoint configuration.

AI Platform Configuration

Adding and configuring AI platforms with API keys and model selection.

Supported AI platforms

Royal MCP supports multiple AI platforms, configured independently. See AI IDE Compatibility → for the full IDE and CLI list.

PlatformConnection TypeNotes
Claude (Anthropic)Native MCPFull MCP support with Claude Desktop, Web, and Code CLI
ChatGPT (OpenAI)Native MCP + REST APIVia Custom GPT MCP connector or platform API
PerplexityNative MCP + REST APIAny MCP-compliant client connection
Google GeminiREST APIVia API integration
Mistral AIREST APIVia API integration
GroqREST APIHigh-speed inference

Cross-plugin composers

The composer pattern stitches multiple write operations into a single atomic MCP call. Instead of asking the AI to make five separate calls (upload image, create post, set featured image, assign categories, write SEO meta), the composer does it in one, with each step logged and any failure surfaced as a warning rather than a hard error.

Available composers

wp_publish_and_promote
Publish a WordPress post in one call: optional featured image sideload, post creation, optional category (created if missing), optional tags (created if missing), optional SEO meta write (Yoast, Rank Math, AIOSEO, and SEObolt auto-detected). Best-effort composition. Added in v1.4.41.

Composition pattern

Composers follow a best-effort shape:

  1. One step is the anchor. If it fails, the whole call fails. In wp_publish_and_promote the anchor is post creation.
  2. Every other step is best-effort. Failures surface as warnings in the response but don’t block the anchor step.
  3. Every step’s status is logged in the steps array of the response, so an AI agent can inspect exactly what worked and what didn’t.

Example queries

Scheduling and status

Status defaults to publish, so the composer writes a LIVE post unless you pass status="draft". Supply publish_date in the future and the composer auto-flips status to future for WordPress’s scheduling. Ask Claude to draft first if you want to review before it goes live.

Backslash escape sequences in payloads

Payloads with backslash escape sequences (JSON unicode escapes, embedded JSON-LD, Divi loop field bindings) may not survive the MCP-to-REST-to-write pipeline as literal backslashes. Decode client-side before sending, or verify rendered output after the call.

Undo tokens

Royal MCP ships an undo-token system for reversible operations. Every destructive tool call that supports it returns a short opaque undo_token in its response. Passing that token to the mcp_undo_last_operation tool reverses the operation. Tokens live for 72 hours by default. Shipped across the Free plugin starting in v1.4.39 and expanded in v1.4.40.

Tools that issue undo tokens (Free)

How to use it

The flow is one extra call. When the AI agent runs a destructive tool, the response includes an undo block:

{
  "ok": true,
  "deleted_post_id": 142,
  "undo": {
    "token": "opaque-string-here",
    "expires_at": "2026-08-24T14:30:00Z"
  }
}

To reverse it, call mcp_undo_last_operation with that token:

mcp_undo_last_operation({ token: "opaque-string-here" })

Or just tell your AI in natural language: “Undo that,” “wait, restore that post,” “revert the last menu reorder.” Claude and other MCP-capable clients handle the token roundtrip internally when they see an undo block in a prior response.

Token lifetime

Undo tokens live for 72 hours after issuance. After that, the reverse-state is garbage-collected on the daily royal_mcp_token_cleanup cron. If the token is used before expiry, the reverse-state is consumed and removed. Each token is single-use.

Pro version

Royal MCP Pro extends undo coverage across every destructive integration tool (WooCommerce bulk updates, Divi page clones, Elementor edits, SEO meta writes, redirect changes, form entry restores, and more) with token lifetimes of 72 to 168 hours depending on the operation. Pro also ships a Recent Operations dashboard widget that surfaces every pending undo in one place with batch rollback and per-row undo buttons. See Undo Tokens & Reversibility →.

Activity Log

Royal MCP logs all API interactions for security and debugging.

Accessing the log

Navigate to Royal MCP → Activity Log in your WordPress admin.

What each entry contains

Royal MCP Activity Log

Activity log showing all AI interactions with timestamps, actions, and status.

Pro version

Need to review, audit, or reverse AI-driven changes across a portfolio? Royal MCP Pro ships the Universal Audit Log: a full filter UI (tool, user, status, undo state, date range, free-text search), CSV export with formula-injection defense, per-row undo action for reversible Pro tool calls, configurable retention window, and value-scrubbing of sensitive fields in stored arguments and response summaries. See Understanding the Universal Audit Log →.

REST API reference

Endpoints

EndpointMethodDescription
/wp-json/royal-mcp/v1/mcpPOSTMain MCP endpoint for JSON-RPC messages
/wp-json/royal-mcp/v1/mcpGETMCP stream endpoint
/wp-json/royal-mcp/v1/postsGETREST endpoint for posts
/wp-json/royal-mcp/v1/pagesGETREST endpoint for pages
/wp-json/royal-mcp/v1/mediaGETREST endpoint for media

Authentication

All API requests require authentication via the WordPress API key:

Authorization: Bearer your-api-key

See API Keys → for the full authentication reference, or OAuth Connector Deep Dive → for the primary token-negotiated path.

GuardPress integration

When GuardPress is active, Royal MCP registers 7 additional tools for monitoring site security, viewing scan results, and reviewing the audit log from any AI client. Use it for daily security check-ins, on-demand vulnerability scans, blocked-IP review, failed-login analysis, and audit-log queries.

gp_get_security_status
Current security score and grade with factor breakdown.
gp_get_security_stats
Failed logins, blocked IPs, alert counts, blocked countries.
gp_run_vulnerability_scan
Trigger a fresh vulnerability scan against installed plugins and themes.
gp_get_vulnerability_results
Read the latest scan results with CVE details and severity.
gp_get_blocked_ips
List currently blocked IP addresses with block reason and timestamp.
gp_get_failed_logins
Recent failed login attempts with username, IP, country, and timestamp.
gp_get_audit_log
Browse the security audit log filtered by severity, action, or time range.

Example queries

SiteVault integration

When SiteVault is active, Royal MCP registers 6 additional tools for triggering backups, listing backup history, and reviewing schedules. Use it for pre-update backup automation, backup health checks, “is the latest backup complete yet?” status polling, and schedule audits.

sv_get_backups
List available backups filtered by status, type, or date.
sv_get_backup
Fetch full details on a single backup (size, files, manifest).
sv_create_backup
Trigger a new backup (full, database-only, files, plugins, or themes).
sv_get_backup_status
Check progress on an in-flight backup in real time.
sv_get_backup_stats
Total size, last backup time, success and failure counts.
sv_get_schedules
Review configured backup schedules and their next-run times.

Example queries

Lite vs Pro

Both SiteVault Lite (free, on WordPress.org) and SiteVault Pro expose these tools. Pro adds cloud destinations, AES-256 encryption, and staging environments. The MCP tools are the same across both.

Redirection integration

When Redirection (John Godley’s plugin, 2M+ active installs) is active, Royal MCP registers 4 additional tools for listing, creating, and updating redirects, plus listing redirect groups. Added in v1.4.38.

Use it for bulk 301 setup during a site migration, cleaning up 404s an AI agent found in your Activity Log, staging redirect changes during a URL structure refactor, or asking Claude to audit redirect groups before an SEO audit.

redirection_list_redirects
List redirects with source URL, target URL, HTTP status code, group, and hit count. Filter by group ID or URL substring. Default limit 50, max 200.
redirection_create_redirect
Create a redirect. Supports 301 (permanent, default), 302 (temporary), and 307 (preserved-method). Group assignment and regex-pattern support included.
redirection_update_redirect
Edit an existing redirect: target URL, status code, group, or enable/disable.
redirection_list_groups
Enumerate redirect groups so an AI agent can file new redirects under the right group without guessing IDs.

Example queries

Royal AI Firewall integration

When Royal AI Firewall is active, Royal MCP registers 6 additional tools for reading firewall stats, inspecting recent bot activity, and adjusting per-bot policies through natural language. Added in v1.4.37.

Royal MCP and Royal AI Firewall work as a companion pair. Royal AI Firewall sees HTTP-layer AI bot traffic hitting your site; Royal MCP lets your own AI clients act on your site. Together they give complete visibility over both sides of AI traffic on your WordPress install.

raif_get_dashboard_stats
Return current dashboard metrics: total bot hits, unique bots seen, top blocked and allowed bots, and time-window aggregates.
raif_get_recent_hits
List the most recent bot requests with user-agent, IP, path, timestamp, and policy decision. Useful for spotting unusual crawler behavior.
raif_get_bot_policies
Enumerate every configured bot policy with the current action (allow, block, throttle) and rule scope.
raif_set_bot_policy
Change the policy on a specific bot. Block GPTBot, allow ClaudeBot, throttle a scraping tool, and so on.
raif_get_daily_rollup
Return a summarized rollup for a given day: total hits, blocked, allowed, throttled, and per-bot subtotals.
raif_block_all_ai_bots
Toggle the master switch that blocks every known AI training crawler in one action. Useful for a fast lockdown.

Example queries

Companion positioning

Royal MCP handles AI agents that you connect to your site: Claude, ChatGPT, Perplexity, and so on. Royal AI Firewall handles AI bots that show up uninvited: training crawlers, scrapers, and unauthorized indexers. Running both is the complete AI-traffic story for WordPress: outbound control via MCP, inbound control via the firewall.

ForgeCache integration

When ForgeCache is active, Royal MCP registers 3 additional tools for page cache management. Useful when an AI agent just published or updated content and needs the cache to reflect it, or when troubleshooting stale-content reports.

fc_purge_url
Purge the ForgeCache entry for a single URL. Resolves the URL to a WordPress post or page and clears its cached HTML.
fc_clear_cache
Clear the entire ForgeCache page cache. Use after a major site update, content migration, or when troubleshooting stale content.
fc_get_cache_stats
Return cache statistics: total cached files, total size on disk, oldest and newest cached entries.

Example queries

Auto-purge on Royal MCP writes

Royal MCP’s standard post and page write tools (wp_update_post, wp_update_page, elementor_replace_text, etc.) don’t auto-invalidate ForgeCache today. Explicit fc_purge_url or fc_clear_cache calls are required after a write for the change to appear immediately to cached visitors. Auto-invalidate composition is on the Royal MCP Pro roadmap.

Royal Ledger integration

When Royal Ledger (cost-tracker and license-vault plugin) is active, Royal MCP registers 4 additional tools for adding tracked costs, listing them, checking upcoming renewals, and listing stored license keys.

Use it for asking Claude to log a new subscription you just bought, getting a rundown of renewals in the next 30 days, categorizing costs (plugins, themes, hosting, domains, SaaS), or discovering which license keys are stored for a specific product.

rl_get_costs
List tracked cost items (premium plugins, hosting, domains, CDN, SaaS subscriptions). Filter by category and status (active, paused, expired).
rl_create_cost
Add a new cost item: name, amount, currency, billing cycle (monthly, quarterly, annual, biennial, one-time, custom), next renewal date, and category.
rl_get_renewals
Return upcoming renewals in a given date window, sorted by next-renewal date. Ideal for “what’s due this month?” queries.
rl_get_keys
List stored license keys (product name, partial key, associated cost item). Full key decryption requires a manual visit to the Royal Ledger admin. MCP surface is metadata-only for safety.

Example queries

Metadata only for license keys

The rl_get_keys tool returns license metadata (product name, partial key, associated cost item). Full key decryption requires a manual visit to the Royal Ledger admin. AI agents can help you find and organize keys but cannot decrypt them, so a compromised MCP session cannot exfiltrate your license library.