WordPress Plugins
Free Tools
Pricing Blog Case Studies Switch to Royal Plugin Graveyard Support My Account Cart
Support / Royal MCP

Royal MCP Documentation

Complete guide to connecting AI platforms to your WordPress site using Model Context Protocol. Learn how to set up, configure, and use Royal MCP with Claude, ChatGPT, and other AI assistants.

Getting Started

Royal MCP enables AI platforms like Claude, ChatGPT, and Google Gemini to securely interact with your WordPress content through the Model Context Protocol (MCP). This allows AI assistants to read your posts, create content, manage media, and understand your site structure.

What is MCP?

Model Context Protocol (MCP) is an open standard developed by Anthropic for connecting AI assistants to external data sources. It provides a secure, standardized way for AI platforms to read and interact with your applications.

Key Benefits

No more copy-pasting content to AI. With Royal MCP, AI assistants access your WordPress content directly in real-time.

Requirements

  • WordPress 5.8 or higher
  • PHP 7.4 or higher
  • HTTPS enabled (required for Claude Desktop integration)

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

Basic Setup

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 like Claude, OpenAI, etc. Enter their API keys.

Test Connection

Click "Test Connection" on each platform card to verify setup.

Note

Your WordPress API key is different from platform API keys. The WordPress key authenticates requests TO your site, while platform keys authenticate requests FROM your site to AI services.

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

Claude Desktop Integration

Royal MCP includes a native OAuth connector for Claude Desktop. When you add your site as a connector, Claude handles the entire authentication flow automatically — no API keys or config files needed.

Setup Steps

1. Enable Royal MCP

In your WordPress admin, go to Royal MCP → Settings and toggle "Enable Royal MCP Integration" on. This activates the MCP endpoint and OAuth server that Claude needs to connect.

2. Copy your Remote MCP Server URL

Scroll down to "Claude Connector Settings" and copy the Remote MCP Server URL. It will look like: https://yoursite.com/wp-json/royal-mcp/v1/mcp

3. Add the connector in Claude Desktop

Open Claude Desktop, go to Settings → Connectors, click "Add custom connector", enter a name (e.g., "My WordPress Site"), paste the URL, and click "Add".

4. Authorize in your browser

Claude Desktop will open your browser to your WordPress site. Log in with your WordPress credentials if prompted, then you'll see an authorization screen asking to allow Claude to connect. Click "Authorize".

Royal MCP OAuth Authorization Screen

The OAuth consent screen — click "Authorize" to grant Claude access to your WordPress site

5. Return to Claude Desktop

After authorizing, your browser will prompt you to open Claude Desktop. Click "Open Claude" (or similar) to return to the app. Claude will complete the connection automatically and your site's 37+ MCP tools will be available immediately.

HTTPS Required

Claude Desktop requires a publicly accessible HTTPS URL on port 443. Localhost URLs, custom ports, and self-signed certificates will not work.

Cloudflare Users

If your site uses Cloudflare, you must turn off "Block AI Bots" in Security settings before connecting. This setting blocks Anthropic's MCP backend and is enabled by default on new Cloudflare domains. See the troubleshooting section below for details.

Claude Desktop MCP Configuration

Claude Desktop showing Royal MCP connector with all 37 WordPress tools and permission controls

Alternative: Connect via Config File

If the Connectors method doesn't work, you can connect Claude Desktop directly using the config file with your API key. This bypasses OAuth entirely and connects immediately.

1. Find your config file

Windows: %APPDATA%\Claude\claude_desktop_config.json

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

Create the file if it doesn't exist.

2. Add your server config

Open the file in a text editor and add the following (replace the URL and API key with your own from Royal MCP settings):

{
  "mcpServers": {
    "my-wordpress-site": {
      "url": "https://yoursite.com/wp-json/royal-mcp/v1/mcp",
      "headers": {
        "X-Royal-MCP-API-Key": "your-api-key-here"
      }
    }
  }
}

3. Restart Claude Desktop

Fully quit and reopen Claude Desktop. Your WordPress site should now appear as a connected MCP server with all 37 tools available.

Tip

If you already have other MCP servers in your config file, add the new entry inside the existing "mcpServers" object rather than creating a new one.

Example Commands

Once connected, try asking Claude:

  • "Summarize my last 10 blog posts"
  • "List all draft posts on my site"
  • "Create a new post about [topic]"
  • "What categories do I have?"
Claude MCP Working Verification

Real proof of Royal MCP working with Claude - successful site info retrieval

Supported AI Platforms

Royal MCP supports multiple AI platforms. Each can be configured independently.

Platform Connection Type Notes
Claude (Anthropic) Native MCP Full MCP support with Claude Desktop
OpenAI (GPT-4) REST API Via custom GPT or API integration
Google Gemini REST API Via API integration
Mistral AI REST API Via API integration
Perplexity REST API Via API integration
Groq REST API High-speed inference

Platform Resources & Documentation

Official documentation and developer resources for each supported AI platform:

MCP Protocol Resources

Learn more about the Model Context Protocol standard:

Managing API Keys

WordPress API Key

This key authenticates requests to your WordPress site from AI platforms.

  • Auto-generated when plugin is activated
  • Click "Regenerate" to create a new key (invalidates the old one)
  • Keep this key secure - anyone with it can access your site via API

Platform API Keys

These keys authenticate requests from your site to AI services.

  • Obtain from each platform's developer console
  • Enter in the corresponding platform card in settings
  • Keys are stored securely in your WordPress database
Security Best Practice

Regenerate your WordPress API key periodically, especially if you suspect it may have been compromised.

MCP Tools Reference

Royal MCP exposes 37 tools to AI platforms, organized by category.

Posts

wp_get_posts
List posts with optional filtering
wp_get_post
Get single post by ID
wp_create_post
Create new post
wp_update_post
Update existing post
wp_delete_post
Delete post
wp_count_posts
Get post counts by status

Pages

wp_get_pages
List pages
wp_get_page
Get single page
wp_create_page
Create new page
wp_update_page
Update existing page

Media

wp_get_media
List media items
wp_get_media_item
Get single media item
wp_delete_media
Delete media
wp_count_media
Get media counts

Taxonomies

wp_get_categories
List categories
wp_get_tags
List tags
wp_create_term
Create category or tag
wp_delete_term
Delete term

Site & System

wp_get_site_info
Get site configuration
wp_search
Search all content
wp_get_plugins
List installed plugins
wp_get_themes
List installed themes

API Reference

Endpoints

Endpoint Method Description
/wp-json/royal-mcp/v1/mcp POST Main MCP endpoint for messages
/wp-json/royal-mcp/v1/mcp GET MCP stream endpoint
/wp-json/royal-mcp/v1/posts GET REST endpoint for posts
/wp-json/royal-mcp/v1/pages GET REST endpoint for pages
/wp-json/royal-mcp/v1/media GET REST endpoint for media

Authentication

All API requests require authentication via the WordPress API key:

Authorization: Bearer YOUR_WORDPRESS_API_KEY

Activity Log

Royal MCP logs all API interactions for security and debugging purposes.

Accessing the Log

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

Log Information

  • Timestamp - When the request occurred
  • MCP Server - Which AI platform made the request
  • Action - The MCP tool that was called
  • Status - Success or error
  • Request/Response - Detailed data (expandable)
Royal MCP Activity Log

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

Troubleshooting

Claude Desktop won't connect

Most Common Issue

Claude Desktop requires HTTPS. If your site uses HTTP or is on localhost, Claude cannot connect. Use a tool like ngrok for local development.

OAuth flow fails after "Open Claude" prompt

If the browser authentication completes but Claude Desktop reports "Authorization with the MCP server failed" (often with an ofid_ reference code), the most common cause is Cloudflare blocking Anthropic's backend requests.

Why this happens

Claude Desktop's connector flow routes MCP traffic through Anthropic's servers — not your browser. The OAuth steps (login, consent) work fine because they run in your browser. But the final MCP connection comes from Anthropic's backend, and Cloudflare's "Block AI Bots" setting blocks it with HTTP 403 before it ever reaches your WordPress site. This setting is enabled by default on new Cloudflare domains.

How to check (two quick methods)

Method 1 — Fastest: In your Cloudflare dashboard, go to AI Crawl Control → Crawlers. If you see crawlers listed as blocked, Cloudflare is blocking AI traffic including Anthropic's MCP requests. Cloudflare will walk you through how to turn it off from there.

Method 2 — Verify Anthropic specifically: Go to AI Crawl Control and look for the Anthropic card. Click on it and check how many requests have been allowed vs blocked. If you see 0 (or nearly 0) allowed out of dozens or hundreds of total requests, that confirms the issue.

How to fix

  1. Log into your Cloudflare dashboard
  2. Go to Security → Settings
  3. Turn off "Block AI Bots" completely
  4. Retry the connector in Claude Desktop (delete the old one first and add it fresh)

Important: You must turn off "Block AI Bots" entirely. Allowing Anthropic individually in AI Crawl Control is not enough — the master toggle catches Anthropic's MCP backend requests separately from the per-crawler settings. This is a Cloudflare limitation.

This also applies to other WAFs and security plugins (Sucuri, Wordfence, etc.) that may block bot-like traffic from reaching your REST API endpoints. If you use SiteGround, WP Engine, or another host that bundles Cloudflare, check their security panel for similar AI bot blocking settings.

See our WordPress.org forum post for more details and community discussion on this issue. For a deeper dive, read our blog post: How Cloudflare's "Block AI Bots" Breaks MCP Connections.

Alternative: Config file method (bypasses Cloudflare entirely)

If you can't turn off "Block AI Bots" (e.g., company policy), use the config file method instead. This connects directly from your machine and never goes through Anthropic's proxy, so Cloudflare doesn't interfere:

  1. Open your config file: Windows: %APPDATA%\Claude\claude_desktop_config.json / Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  2. Add your server with the MCP URL and API key from Royal MCP settings (see the config file setup guide above)
  3. Restart Claude Desktop

API key not working

  • Ensure you're using the WordPress API key, not a platform key
  • Check that the key hasn't been regenerated
  • Verify the plugin is activated and integration is enabled

Connection test fails

  • Verify the platform API key is correct
  • Check that your server can make outbound HTTPS requests
  • Some hosts block external API calls - contact your host if needed

Tools not appearing in Claude

  • Disconnect and reconnect the MCP connector in Claude Desktop
  • Ensure your site's SSL certificate is valid
  • Check the Activity Log for any error messages

Frequently Asked Questions

Is my data secure?

Yes. All API endpoints require authentication via API key. Activity logging tracks every request. No data is sent to external services without your explicit configuration. HTTPS is required for production use.

Can AI assistants modify my content?

Yes, with proper authentication. The plugin provides tools for creating, updating, and deleting content. All write operations require valid API credentials and are logged.

Does this slow down my site?

No. Royal MCP only activates when an AI platform makes an API request. It does not affect front-end performance or page load times for regular visitors.

Can I use multiple AI platforms?

Yes. You can add and configure as many AI platforms as needed. Each has independent settings and can be enabled/disabled individually.

What happens if I deactivate the plugin?

Your settings are preserved when you deactivate. AI platforms will no longer be able to access your site until you reactivate. Uninstalling completely removes all settings and logs.

Community Support

Connect with other Royal MCP users, ask questions, and share tips on the WordPress.org support forums.

Visit WordPress.org Forums

Need more help?

Search our knowledge base, submit a ticket, or chat with our support team.

Visit Support Portal