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

Connecting Royal MCP to Claude

Three ways to connect: claude.ai in your browser, Claude Desktop, and Claude Code in your terminal. Browser and Desktop now use the identical connector flow — same UI, same steps, one video covers both. Each surface supports OAuth (the recommended default) and an API key fallback for sites where OAuth is blocked by Cloudflare, a managed-host WAF, or a security plugin. Pick your surface and follow the matching section.

First — Install and Enable Royal MCP

Before connecting anything to Claude, Royal MCP needs to be running on your WordPress site. Three small steps:

Install the plugin

In wp-admin, go to Plugins → Add New, search for Royal MCP, and click Install Now. Or download the latest version from wordpress.org/plugins/royal-mcp/ and upload the zip.

Activate

On the Plugins page, click Activate under Royal MCP. A new Royal MCP item appears in your wp-admin sidebar.

Enable the integration + flush Permalinks

Go to Royal MCP → Settings → General Settings and turn on the Enable Royal MCP Integration toggle (it’s off by default after activation). Then go to Settings → Permalinks and click Save Changes once — this flushes WordPress’s rewrite rules so the OAuth endpoints resolve. Don’t skip this; the connectors below won’t work until rewrites are flushed and Permalinks must not be set to “Plain.”

Quick sanity check before moving on

Open https://example.com/.well-known/oauth-authorization-server in any browser. If you see a JSON response listing issuer, authorization_endpoint, and scopes_supported, Royal MCP is live and the connectors below will work. If you see a 404 or an HTML page, jump to the troubleshooting checklist — something is intercepting your request before it reaches WordPress.

Choose Your Surface

Pick where you’ll be using Claude. The setup steps differ by surface, but the underlying connection is the same Royal MCP server in all three cases.

Surface Best for Visual / text Jump to
claude.ai (browser) The most common path. Open Claude in any browser, click Connect. Visual Browser + Desktop section ↓
Claude Desktop The native macOS / Windows app. Identical setup to the browser. Visual Browser + Desktop section ↓
Claude Code (CLI) Terminal-native workflows, VS Code, JetBrains integrations. Text Terminal section ↓
You can connect more than one

Many users run Royal MCP in both claude.ai web AND Claude Code at the same time — same site, two surfaces. There’s no conflict, no extra license, no per-device limit. Pick whichever you start with, add the others later.

claude.ai (Browser) and Claude Desktop — Identical Setup

Anthropic has unified the connector flow across claude.ai in the browser and the Claude Desktop app. The UI is identical, the steps are identical, and the OAuth handshake is identical. Whichever you use, follow the same instructions below.

Installing Claude Desktop on Windows? Use claude.ai/download, NOT the Microsoft Store

Download Claude Desktop from claude.ai/download. The Microsoft Store version is sandboxed and reads its config from a non-standard path under %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\ instead of the standard %APPDATA%\Claude\ that every Anthropic doc and our own walkthroughs reference — any config-file edits you make at the documented path will be silently ignored. If you already installed from the Store, uninstall it first, then install from claude.ai/download. (macOS users: no equivalent issue — install from claude.ai/download as you would any other app.)

The first time you connect, you’ll see the OAuth consent screen. Every time after that — on the same Claude account — Claude reconnects silently in the background, no consent prompt, no extra clicks. The two videos below cover both cases.

First-time setup — OAuth consent flow

This is what you’ll see the first time you add Royal MCP to a fresh Claude account: paste the URL, click Connect, approve the one-time consent screen.

Claude Desktop — first-time OAuth setup, end to end. Same flow in claude.ai web.

Open Settings → Connectors in Claude

In claude.ai (browser): click your profile in the bottom-left → Settings → Connectors. In Claude Desktop: Settings (gear icon) → Connectors. Both land on the same screen.

Click “Add custom connector”

At the top of the Connectors list, click Add custom connector. A small panel opens asking for a name and a URL.

Paste your MCP server URL

Name it whatever you like (e.g. My Site MCP). For the URL, paste your WordPress site’s MCP endpoint:

https://example.com/wp-json/royal-mcp/v1/mcp

Leave the Advanced Settings (Client ID / Client Secret) completely empty. That signals Claude to use auto Dynamic Client Registration, which is the recommended path.

Click Connect — approve consent

Claude opens the OAuth consent screen from your WordPress site. You’ll see your site name and the requested scope (mcp:full). Click Authorize. Claude exchanges the code for a token, stores it, and marks the connector as Connected.

Verify in a new chat

Open a new conversation. Click the + button next to the input box → Connectors and confirm your Royal MCP connector toggle is on. Then ask Claude: “Do we have an open connector to example.com?” (replace with your actual site). Claude will call wp_get_site_info against that specific connector and reply with the site’s URL and name. Anchoring on your specific domain is better than a generic “list my recent posts” — if you have multiple sites connected, the generic question will list every connector or pick one ambiguously.

Claude Desktop showing the + menu opened with Connectors highlighted, and the Connectors submenu listing several Royal MCP connectors with toggle switches. Manage connectors and Add connector options at the bottom.

Claude → + button → Connectors. Toggle Royal MCP on per-conversation. Same flow in claude.ai web and Claude Desktop.

Tip: keep WP Admin open while you connect

Open Royal MCP → Activity Log in a separate browser tab before you click Connect. You’ll see live entries fire as the OAuth dance progresses (oauth:registeroauth:authorizeoauth:token). If something goes wrong, the Activity Log shows you which step failed and the exact reason — that’s the single most useful diagnostic Royal MCP gives you.

Coming back later — silent reconnect

Once you’ve completed the consent screen once, Claude stores the OAuth token. Every subsequent reconnect on the same Claude account skips the consent step entirely — you click the connector, it goes Connected, you’re back in business. This is what you’ll see day-to-day.

Reconnecting after the first-time setup — the OAuth token is already stored, so no consent screen appears.
When the silent reconnect stops being silent

If Claude shows the consent screen again on a reconnect, the stored token has expired or been invalidated. That’s normal — OAuth tokens have lifespans, and revoking a WordPress user account or changing OAuth client config in Royal MCP will invalidate existing tokens. Click Authorize once and you’re back to silent reconnects.

Fallback: connect via API key (when OAuth is blocked by your host)

The OAuth flow above works for the vast majority of customers. The exception is hosts that block Anthropic’s OAuth backend — usually Cloudflare Bot Fight blocking python-httpx, cPanel ModSecurity returning 406, Imunify360 returning 429, or a managed-host WAF. In those cases the OAuth dance fails at the server-to-server token exchange and you need a different path.

Only use this if OAuth is failing

OAuth is the default for a reason — one-time consent, no key management, no copy/paste errors. Only switch to the API key path if you’ve already tried OAuth and it’s failing at the same step every time. Our troubleshooting checklist will tell you whether your issue is one OAuth can recover from or one where the API key bypass is the right answer.

Copy your API key from WordPress

Go to WP Admin → Royal MCP → Settings → General Settings. The WordPress API Key field has the key pre-generated and visible — click Copy. If you want a fresh key (or the field is empty), click Regenerate first; that immediately invalidates the old one. Also confirm the Enable Royal MCP Integration toggle is on.

Royal MCP Settings page in WordPress admin showing the Enable Royal MCP Integration toggle, the WordPress API Key field with Copy and Regenerate buttons, and the REST API Base URL.

WP Admin → Royal MCP → Settings → General Settings. Copy the WordPress API Key value, or click Regenerate for a fresh one.

Add the connector with API key auth

In Claude (browser or Desktop), open Settings → Connectors → Add custom connector. Paste your MCP server URL (same as the OAuth path). In the Advanced / Authentication section, choose API Key (or paste it into the Custom Headers field as Authorization: Bearer your-api-key, substituting your actual 32-character key from step 1, depending on which version of the Claude UI you’re on).

Click Connect — no consent screen

Because you’re using an API key, there’s no OAuth dance, no consent prompt, no browser redirect. Claude tests the key against your MCP endpoint and marks the connector Connected.

Verify in a new chat

Same as the OAuth path — open a new conversation, enable the connector, ask Claude to do something WordPress-related.

Looking for the Claude Desktop + mcp-remote wrapper path?

If your version of Claude Desktop doesn’t expose the custom-headers field directly, you can use the mcp-remote npm wrapper to inject the Authorization: Bearer header from a config file. Full instructions: Connect Claude Desktop via API Key (mcp-remote setup).

Claude Code (Terminal / CLI)

Claude Code is the official Anthropic CLI that runs in your terminal, VS Code, or JetBrains IDE. Connecting Royal MCP to it is a single command. No browser config, no Settings UI — everything happens at the command line.

Don’t have Claude Code installed?

Get it from claude.com/claude-code. Available as a standalone CLI, a Mac/Windows desktop app, a web app at claude.ai/code, and as a VS Code or JetBrains extension. All of them share the same MCP connector config.

With OAuth (recommended)

Add the Royal MCP server as a connector with one command. Claude Code will pop open your default browser for the one-time OAuth consent, then store the token in your local config for future sessions.

claude mcp add --transport http royal-mcp https://example.com/wp-json/royal-mcp/v1/mcp

Replace example.com with your actual WordPress site. Then start a Claude Code session, and on the first MCP call your browser will open with the OAuth consent screen. Click Authorize. The terminal session receives the token and the connector becomes active.

Without OAuth — API key path

Same as the browser case — use this when OAuth is blocked by your host. Copy your API key from WP Admin → Royal MCP → Settings → General Settings → WordPress API Key, then pass it via the --header flag:

claude mcp add --transport http royal-mcp https://example.com/wp-json/royal-mcp/v1/mcp \
    --header "Authorization: Bearer your-api-key-here"

No browser, no consent screen, no OAuth state. Claude Code attaches the header to every request.

Verify your connection with /mcp

Inside any Claude Code session, type /mcp and press Enter. You’ll see the Manage MCP servers screen — every connector you have registered, grouped by scope (Project MCPs, User MCPs, claude.ai), with each one showing its connection state and tool count.

Claude Code /mcp output in a VS Code terminal: Manage MCP servers panel listing 14 servers under Project MCPs, User MCPs, and claude.ai groupings. Each entry shows a status icon (green checkmark connected, yellow warning needs authentication, red X failed) and tool count.

Claude Code /mcp output: every registered connector with status, grouped by scope.

Use the up/down arrow keys to navigate. Each connector shows one of these states:

Hover over any connector (green ✓ or red × or yellow ▵) and press Enter to get connector-specific options like Authenticate or Disable. Esc backs out at any level.

If you prefer a non-interactive view, you can also list servers from the shell:

claude mcp list
Use /mcp as your first diagnostic

If a tool isn’t working, type /mcp first. The screen tells you whether the server is connected, whether the tool list refreshed since you last used it, and whether the OAuth token has gone stale. About 80% of “reads work, writes don’t” reports from terminal users turn out to be a stale OAuth token that /mcp → Authenticate fixes — see the next section.

Re-authenticate a stale connector

When a connector shows ▵ needs authentication or × not authenticated, you don’t need to remove and re-add it. Just refresh the OAuth token in place:

  1. Run /mcp in any Claude Code session.
  2. Arrow down to the affected connector and press Enter.
  3. You’ll see the connector detail screen with Status, Auth state, URL, Config location, and options:
Claude Code /mcp connector detail screen: Royal Plugins MCP Server with Status: needs authentication, Auth: not authenticated, plus URL and Config location. Two options listed: 1. Authenticate (currently selected) and 2. Disable.

Per-connector options when a connector needs re-authentication. Arrow down to Authenticate and press Enter.

  1. Select Authenticate and press Enter.
  2. Claude Code opens your default browser for the OAuth consent screen — same flow as the initial setup. Click Authorize.
  3. The terminal receives the fresh token and the connector flips back to ✓ connected.
Why tokens go stale

OAuth access tokens have a lifespan. Royal MCP’s default is long-lived, but tokens can be invalidated early by: revoking a user account in WordPress, regenerating the OAuth client config, the user changing their WP password (depending on configuration), or simply the token aging out. The fix is always the same — re-authenticate in place via the steps above.

After You Connect — First Things to Try

Royal MCP exposes the full WordPress data model to Claude: posts, pages, media, users, comments, taxonomies, WooCommerce products and orders (if WooCommerce is active), plus the Royal Plugins-specific tools (GuardPress security data, SiteVault backups, ForgeCache controls, etc.) for any premium plugins you have installed.

Try a few of these in your first conversation. Anchor each prompt with your site domain — if you have multiple sites connected, this tells Claude exactly which connector to use:

If a request fails, the first place to look is WP Admin → Royal MCP → Activity Log. Every Claude request lands there with the exact tool name, parameters, and result — that’s your single source of truth for what happened on the server.

If Something Goes Wrong

If a connector won’t connect or a tool keeps failing, work through this short list before opening a support thread:

  1. Run the Step 0 30-second edge probe. Almost every “Claude won’t connect” issue traces back to your hosting edge (Cloudflare, managed-host WAF, ModSecurity, SiteGround nginx). Step 0 tells you in 30 seconds whether the problem is your host or your plugin.
  2. Check your Activity Log. If you see oauth:authorize rows but no oauth:token, the token exchange is failing — usually a host blocking python-httpx. If you see nothing at all, the request isn’t reaching WordPress.
  3. Confirm plugin version. The latest Royal MCP includes fixes for several common setup issues. Check Plugins → Updates for a newer version before troubleshooting further.
  4. Restart your Claude surface. Stale OAuth tokens are the second-most-common cause of “suddenly stopped working.” Sign out of claude.ai / quit Claude Desktop / restart your terminal session, then reconnect.

For deeper diagnostics including curl probes you can run yourself, see the curl deep-dive guide.

Still Stuck? Two Support Paths

If you’ve worked through the checklist and your connection still fails:

Community Support (free) — wp.org Plugin Forum

Post a new thread at wordpress.org/support/plugin/royal-mcp/. The Royal Plugins team monitors the forum regularly. Include the diagnostic info below.

Premium Support (paid) — direct one-on-one help

For priority response (24-hour SLA) and hands-on diagnostic help, our Premium Support tier is $149/year. Direct email, full refund if we can’t resolve your issue.

Information to include in your post or ticket

  • Which surface you’re trying to connect from (claude.ai web / Claude Desktop / Claude Code CLI).
  • OAuth or API key path, and which step failed (consent screen never appeared, consent appeared but Claude reports failure, etc.).
  • Screenshot of the Activity Log with the most recent oauth:* rows visible, View Details expanded on the failing row.
  • The exact error message Claude shows, including any reference codes (ofid_*, cf-ray, etc.).
  • Your hosting provider and whether Cloudflare is in front of the site.