WordPress Plugins
Free Tools
Claude Skills
Resources
Pricing Support My Account Cart
Support / Royal MCP / Direct-Connect Threat Model

Royal MCP Direct-Connect Threat Model

Royal MCP is a direct-connect MCP server: AI clients authenticate against your WordPress install, not a third-party relay. This document explains the authentication boundary on each of Royal MCP’s three transports (MCP OAuth 2.1, WordPress Abilities API adapter, WP REST API), lists the threat scenarios covered and the mitigations in place, and gives your security or agency team a production-readiness checklist to run before enabling AI access on a customer-facing site.

TL;DR — the 60-second version

Royal MCP authenticates AI clients on your WordPress install — no third party sits between the client and your site. The MCP transport uses OAuth 2.1 with Dynamic Client Registration and PKCE-S256; access tokens last 24 hours by default (you can choose 1 hour, 8 hours, 24 hours or 7 days), refresh tokens rotate on every use and last 30 days, and every authorized client is bounded by the WordPress capabilities of the user who authorized it. By default only administrators can connect an AI client. As of 1.4.38 the same tools are also exposed via the WordPress REST API using WP-native authentication (Application Passwords or cookie+nonce); every REST call still passes through the same per-tool capability check that gates the MCP transport, and by default only administrators can use the tools that way. Before enabling AI access on a production site: serve the site over HTTPS only, decide which WordPress users may connect AI clients, decide your Application Password policy, put a backup and error-log monitoring plan in place, and call the royal_mcp_connection_health tool from your AI client to confirm live configuration. The detailed threat scenarios and mitigations follow below.

What “direct-connect” means for your site

An MCP server can be reached in one of two shapes. Some products run a relay-based architecture: the AI client talks to the vendor’s relay service, and the relay talks to your WordPress site on your behalf. Auth happens on the relay, not on your site. Convenient to set up, but every call in and out passes through a third-party trust boundary you don’t operate. Others — Royal MCP included — run direct-connect: the AI client authenticates against your WordPress install itself, and every subsequent call reaches WordPress with no intermediary.

The direct-connect trade-off is straightforward. You keep every request inside a trust boundary you already own. Your capability model, your audit trail, your rate limits, your incident response. Nothing is metered by anyone else. In exchange, you accept full responsibility for the auth surface on your own site — the same responsibility you already carry for the WordPress admin panel and the WP REST API. This document describes what that surface looks like on Royal MCP so your team can evaluate it against your existing security posture.

The three transports Royal MCP exposes

There are three distinct paths a caller can use to reach a Royal MCP tool. All three routes converge on the same set of tool handlers and the same per-tool capability checks. The transport-level authentication differs, and the second and third paths are also limited to the WordPress users you allow in Royal MCP → Settings (administrators by default).

TransportAuth mechanismTypical caller
MCP server
/wp-json/royal-mcp/v1/mcp
OAuth 2.1 with Dynamic Client Registration + PKCE-S256 (all clients), or the site’s long-lived API key sent as Authorization: Bearer (Claude Desktop, Claude Code, and raw REST callers only — claude.ai web does not accept custom headers). If you switch on browser agents (WebMCP), a logged-in WordPress session with a REST nonce also works. Claude Desktop, Claude Code, Claude.ai web, ChatGPT MCP connector, any MCP-compatible client
WordPress Abilities API
(via WP MCP Adapter, /wp-json/royal-mcp-server/v1/mcp)
The adapter’s own authentication, which uses the WordPress REST login (Application Passwords, or cookie + nonce). Royal MCP then only serves users you allow in Settings. Sites running the WP MCP Adapter plugin alongside Royal MCP; ecosystem clients that speak to the adapter
WordPress REST API
/wp-json/wp-abilities/v1/abilities/royal-mcp/{name}/run
WP-native: Application Passwords, cookie + nonce for logged-in browsers. Limited to the users you allow in Settings. Custom scripts, WP-CLI, automation platforms, existing REST clients

The same tool (say, wp_get_posts) is reachable via all three transports as of 1.4.38. What changes between them is who authenticates and how — not what the tool does or which WordPress capabilities are required to run it. A caller who reaches wp_create_post via the REST endpoint still needs the edit_posts capability on the WordPress user attached to their Application Password, exactly as an MCP-transport caller would, and that user must also be allowed under Who can use tools through other MCP servers and browser agents in Royal MCP → Settings.

Why we expose all three

The MCP transport is the primary path for AI clients. The Abilities API path lets Royal MCP co-exist with the emerging WordPress MCP Adapter ecosystem so buyers who standardize on the adapter can use our tools without changing tooling. The REST path lets existing automation (WP-CLI, custom scripts, third-party workflow tools) call the same tools without needing to speak MCP. Same authorization gate on all three — three transports, one capability model. If you don’t need the second and third paths, switch off Register tools with the WordPress Abilities API in Royal MCP → Settings and only the MCP transport remains.

The OAuth 2.1 model on the MCP transport

Royal MCP implements the OAuth 2.1 draft profile (draft-ietf-oauth-v2-1) with the extensions the MCP specification requires. The relevant properties for a security review:

A separate long-lived API key path is available for callers that can’t complete an interactive OAuth flow (headless CI, scheduled scripts, Claude Desktop when OAuth is host-blocked). Each site has one API key, managed in Royal MCP → Settings and tied to the WordPress user who generated it. Royal MCP stores only a SHA-256 hash of the key. The key itself is shown once, on the settings screen, right after it is created or regenerated (it is held for at most 15 minutes until that screen is opened); if you lose it, regenerate it. Regenerating replaces the old key immediately. The key carries the same capability boundary as OAuth-issued tokens — it doesn’t bypass any check. The API-key path requires a client that can send a custom header (Authorization: Bearer); this covers Claude Desktop (config file or Custom Headers field), Claude Code CLI, curl / scripts, and any raw REST caller. It does not cover claude.ai’s browser custom-connector dialog, which only exposes OAuth Client ID / Client Secret fields with no custom-header input.

The REST-transport authentication model

The REST endpoints WordPress exposes for Royal MCP’s tools as of 1.4.38 use the WordPress-native REST authentication stack. This is deliberate: WordPress’ REST auth is well-understood by the WordPress security ecosystem, has been reviewed for over a decade, and any Application Password or cookie-auth issue is already handled by every WordPress security plugin your customers may already run.

The OAuth 2.1 flow stays MCP-scoped

Royal MCP’s OAuth 2.1 layer authenticates MCP-transport callers only. It does not participate in REST-transport auth, and the MCP endpoint does not accept Application Passwords. This is by design — keeping the two auth stacks separate means each transport uses the mechanism the WordPress ecosystem already expects, and neither becomes a bypass path around the other. If your organization’s policy prohibits Application Passwords, disable them site-wide via the wp_is_application_passwords_available filter; Royal MCP’s MCP transport will continue to work unaffected.

Connections Royal MCP makes from your site

Royal MCP does not send telemetry or your content to Royal Plugins. Your site does make outbound requests in the cases below, and each one is limited to the job it does.

Royal MCP Pro adds tools that connect out for their own tasks, and it checks its license and updates with Royal Plugins.

Threat scenarios and mitigations

The scenarios below cover the classes of attack a security team commonly asks about when evaluating a direct-connect MCP server. For each scenario we describe the attack shape, the mitigation Royal MCP already applies, and the residual risk you should be aware of.

1. AI client compromised, live tokens stolen

An attacker gains access to the AI client (compromised laptop, malware, insider) and extracts live access + refresh tokens from the client’s storage.

Mitigation

Access tokens expire after the session length you chose (24 hours by default), so a stolen access token stops working when it expires. Refresh tokens rotate on every use, and a refresh token presented again after it has been used ends the whole connection: if the attacker and the legitimate client both refresh, the connection is cut and the user has to sign in again, which alerts them. Every tool call still runs the WordPress capability check on the owning user, so the blast radius is bounded by that user’s capabilities. A stolen editor-scoped token cannot escalate to admin actions.

Residual risk

Until the access token expires, the attacker can invoke any tool the token’s user is authorized to invoke, within the connection’s access level. On high-value sites, choose a shorter session length. Standard WordPress incident response applies: revoke the client on Royal MCP → Connected Clients, which ends its access immediately, rotate the user’s password if the compromise was broader (changing a password does not end AI connections on its own, so revoke them as well), and review the Activity Log.

2. Token leaked via debug log, bug report, or screenshot

A token ends up in a text log, a support conversation, a screenshot posted publicly, or a copy-pasted terminal transcript. An attacker discovers it before the user does.

Mitigation

Same expiry and rotating-refresh properties as scenario 1. Additionally: Royal MCP never writes tokens, authorization codes or the API key to its Activity Log. Sign-in events record only public identifiers, and tool calls record the tool name and the names of its arguments, not their values. Royal MCP stores OAuth tokens, authorization codes, client secrets and the API key only as SHA-256 hashes, so a copy of the database does not contain working credentials. Values that look like credentials are also replaced with [REDACTED] in tool results before they reach the AI client. If a token leaks it’s from the client side or an operator’s environment, not from Royal MCP’s own outputs.

Residual risk

Same window as scenario 1. Recommend the operator revoke the affected OAuth client immediately upon discovery rather than waiting for the token to expire.

3. Token replayed from a different origin

An attacker captures a token and attempts to use it from a different network / device / geographic location than the legitimate client.

Mitigation

Tokens are bearer tokens by design in the OAuth 2.1 profile — they don’t carry origin binding today. Every call still runs the capability check. If your site is behind Cloudflare or a WAF, IP-based or geo-based rules on /wp-json/royal-mcp/v1/* add a layer here at the operator’s discretion.

Residual risk

A leaked token can be used from any origin. Origin-binding is an area of active OAuth extension work (DPoP, mTLS) that Royal MCP will evaluate for future releases; not shipped today.

4. Man-in-the-middle on the token exchange

An attacker positioned on the network path between the AI client and your WordPress site intercepts the OAuth authorization code or the token exchange request.

Mitigation

Royal MCP expects HTTPS and leaves enforcing it to your web server or proxy. The plugin’s own endpoints do not refuse plain HTTP, so local test sites keep working. What the plugin does check: redirect addresses must be HTTPS (or a loopback address or private app scheme for desktop clients), the discovery documents advertise https addresses when the request arrived over TLS, client metadata and media fetches accept HTTPS links only, and the settings screen warns you when your MCP URL is not HTTPS. Hosted AI clients such as claude.ai and ChatGPT only connect to HTTPS servers. PKCE-S256 mitigates the code-interception class specifically — an attacker who captures the authorization code cannot exchange it for a token without also having captured the client’s PKCE code-verifier, which the client sends only with the token request.

Residual risk

If your server also answers plain HTTP without redirecting to HTTPS, a client configured with an http:// address would send codes and tokens unencrypted, so redirect all HTTP traffic to HTTPS at the server. A TLS-terminating MITM (compromised CA, corporate SSL-inspection proxy) can still see the exchange. This is a network-layer concern outside Royal MCP’s trust boundary; addressed by your certificate management practices.

5. Encrypted-traffic sniff / passive network capture

An attacker records encrypted traffic between AI client and site with the intent of decrypting it later.

Mitigation

Once your server sends all traffic over HTTPS, everything is TLS-encrypted in transit, and Royal MCP never downgrades a connection to plain HTTP. Ensure your site’s TLS configuration is 1.2+ with modern cipher suites — use the SSL Checker linked in the checklist below to verify.

Residual risk

Standard TLS-lifecycle concerns (private key compromise, retroactive decryption if a weak cipher was in use). Not Royal MCP-specific.

6. Application Password stolen or leaked

A WordPress Application Password (used for REST-transport calls) is disclosed to an attacker.

Mitigation

Application Passwords are per-user and per-name — the compromised password can be revoked in Users → Profile → Application Passwords without disturbing other passwords the same user has issued. The password’s reach is bounded by the owning user’s WordPress capabilities, and Royal MCP tools refuse it unless that user is one you allow for other MCP servers (administrators by default). All standard WordPress security-plugin monitoring (failed-login alerts, geographic anomalies) applies to Application Password auth.

Residual risk

Application Passwords transmit on every request as a bearer credential. Sites that consider this shape unacceptable can disable the feature site-wide via the wp_is_application_passwords_available filter and rely exclusively on the MCP OAuth 2.1 path.

7. Malicious plugin attempts to register a colliding ability namespace

Another plugin on the site registers an ability with a name in the royal-mcp/ namespace, attempting to intercept calls meant for a Royal MCP tool.

Mitigation

WordPress core’s wp_register_ability() refuses to register duplicates — the first registration wins. Royal MCP registers its ability categories first and its abilities on wp_abilities_api_init at the default priority (10). A plugin that runs later cannot displace an already-registered ability. Royal MCP’s own MCP endpoint calls its tools directly, not through the abilities registry, so it is not affected by what other plugins register there.

Residual risk

A plugin that registers a royal-mcp/ name before Royal MCP does would keep that name, and calls to it through the Abilities API or an adapter would reach that plugin. This is the same trust-your-installed-plugins concern that already applies to WordPress generally: only install plugins you trust.

8. Bulk-scan for open MCP endpoints on the public internet

An attacker sweeps IP ranges or WordPress sites looking for exposed /wp-json/royal-mcp/v1/* endpoints they can call without authentication.

Mitigation

Every tool call requires valid credentials. The MCP endpoint answers unauthenticated requests with a 401 that points to the sign-in documents; there is no anonymous read path and no default-open configuration, and tool names are listed only to authenticated callers. A scanner sees the public discovery documents (the OAuth metadata, which is intentionally public per RFC 8414, plus the MCP server card and agent-skills index) but cannot invoke any tool without completing sign-in (registration, consent by an allowed user, PKCE) or holding the API key. The MCP endpoint also applies per-IP rate limits.

Residual risk

The public discovery documents reveal that Royal MCP is installed, and the server card and agent-skills index list tool categories and counts, which can show which supported plugins are active. This is a fingerprinting concern, not an authorization bypass. Sites that want to reduce it can block the server card and agent-skills paths (/.well-known/mcp.json, /.well-known/mcp/, /.well-known/skills/, /.well-known/agent-skills/ and /wp-json/royal-mcp/v1/discovery/) at their edge (Cloudflare WAF, nginx rule). Blocking /.well-known/oauth-authorization-server or /.well-known/oauth-protected-resource stops AI clients from finding the sign-in flow, so only do that if your clients connect another way.

9. Insider abuse: legitimate admin uses AI to exfiltrate data

A user who is legitimately authorized to use Royal MCP uses their access to exfiltrate content the site owner didn’t intend to share (bulk-download all draft posts, export all user emails, etc.).

Mitigation

This is outside the authentication model — the user is who they say they are, and they hold the capabilities the exfiltration requires. The mitigation is monitoring, not prevention. Royal MCP writes every tool call to the plugin’s Activity Log with the tool name, the names of its arguments (never their values), the result and the time. Changes that can be undone are also listed on Royal MCP → Recent Changes with the WordPress user who made them, for 72 hours by default. Royal MCP Pro adds an audit log that records the user behind each call, with signed export and 90-day retention by default.

Residual risk

Real. Insider abuse is a monitoring and human-controls problem, not an authentication one. Standard mitigations: least-privilege WordPress roles for AI-connected users, Read-only mode or a read-only access level where AI only needs to read, review of the Activity Log on a routine cadence, alerting on unusual bulk-read patterns via a security plugin.

Direct-connect vs relay-based architectures

Direct-connect and relay-based MCP servers make different trade-offs. Neither shape is universally better — each fits different customer profiles. The comparison below is architectural, not product-vs-product.

PropertyDirect-connect (Royal MCP)Relay-based
Auth boundaryYour WordPress installVendor’s relay service
Third-party trust boundary in the call pathNone — client talks straight to your siteVendor’s relay sees every request and response
Rate-limit ownershipYour site’s server + WAF settings, plus Royal MCP’s own per-minute limitsVendor’s tier limits (typically per-day action caps)
Incident responseYou + your hosting providerYou + vendor + your hosting provider
LatencyOne network hop: client → siteTwo hops: client → relay → site
Setup frictionOAuth sign-in with DCR and consent per client by a user you allow (optional admin approval for new clients)Typically vendor account + connector configuration
Auth surface exposed to public internetYes — your WordPress install is the OAuth serverNo — relay handles the public-facing auth
Data residencyEverything stays within your site + client boundaryData traverses the relay, subject to their region + retention policies

Direct-connect fits organizations that already own their WordPress security posture and prefer to keep the AI-agent trust boundary on infrastructure they operate. Relay-based fits organizations that want to offload the auth surface to a vendor and accept the third-party trust and rate-limit trade-offs that come with it. If your compliance framework mandates that authentication for a specific data class must terminate on your infrastructure, direct-connect is likely the required shape.

Before enabling Royal MCP on a production site

Run through this checklist before authorizing an AI client against a customer-facing site for the first time. Everything here is achievable in about 30 minutes on a site that already follows standard WordPress security practice.

Enforce HTTPS site-wide, TLS 1.2+

Every Royal MCP transport (MCP OAuth, Abilities API, REST) should run over HTTPS only. The plugin leaves enforcing this to your web server, so redirect every plain-HTTP request to HTTPS at the server, proxy or CDN. Use the SSL Checker to confirm your site accepts TLS 1.2 or 1.3 and rejects lower versions. If your host still permits TLS 1.0 or 1.1, upgrade before enabling MCP.

Verify the authorizing-user capability boundary

By default only administrators can complete an OAuth consent for a new MCP client; you can widen that under Who can connect AI clients in Royal MCP → Settings. The resulting client inherits the capabilities of the user who authorized it. If you widen the setting, verify this bound holds: authorize a client while logged in as a lower-privilege user, then try to invoke an Administrator-scoped tool (for example wp_update_option) from that client — the call should return a permission error. With the default setting, a non-administrator who tries to connect is told their account is not allowed to connect AI clients. To review new clients before anyone can sign them in, switch on Require approval before new AI clients can connect.

Decide your Application Password policy

WordPress ships Application Passwords enabled by default. If your organization’s policy is to disable them, apply the wp_is_application_passwords_available filter in a must-use plugin. Royal MCP’s MCP transport works with or without Application Passwords — the choice is about which REST-transport callers you want to permit. Who may use Royal MCP tools over REST is set under Who can use tools through other MCP servers and browser agents, and switching off Register tools with the WordPress Abilities API closes the REST and adapter paths entirely.

Put a backup + restore plan in place

MCP-connected AI can create, update, or delete content within the connected user’s capabilities. Ensure you have a recent backup and a tested restore procedure before enabling write-capable tools on a production site. SiteVault or any WordPress backup plugin your team already uses works. While you evaluate, Read-only mode or Drafts only in Royal MCP → Settings limits what connected AI clients can change.

Enable WordPress error-log monitoring

Set WP_DEBUG_LOG or an equivalent logging plugin so that authorization failures, capability errors, and unexpected tool errors are recorded and reviewable. Royal MCP’s built-in Activity Log covers plugin-side events; site-wide logging catches everything else.

Consider WAF rules on the MCP paths

If you run Cloudflare or a WordPress WAF plugin, decide whether you want rate-limit or geo-fencing rules on /wp-json/royal-mcp/v1/* and /wp-json/wp-abilities/v1/abilities/royal-mcp/*. This is optional but useful for sites that expect connections from a known set of geographies or IP ranges.

Call royal_mcp_connection_health from your AI client

Once your first AI client is connected, invoke the royal_mcp_connection_health tool. It returns the MCP endpoint, the authentication method the call used, the time left on the current access token, the connection’s access level, the session ID, and whether OAuth sign-in is available with your permalink settings. It does not report software versions. Screenshot the response for your security review file — it’s the plugin’s own confirmation of what’s live.

Independent security review invitation

If your team runs an internal security review, penetration test, or vendor risk assessment on WordPress plugins, we welcome the report. Reach out via the support form and note that you’re requesting a security-review contact. We’ll route the conversation to someone who can answer follow-up questions on specifics that aren’t covered in this document.

Responsible-disclosure reports are appreciated. Royal Plugins does not currently operate a paid bug-bounty program, but we credit contributors publicly (with your permission) and prioritize confirmed vulnerabilities on the fastest-possible release cadence.

What this document does not cover

The scope of this threat model is the authentication and authorization boundary between an AI client and your WordPress site. Related concerns that sit outside that boundary are called out here so your team knows where to look for them.

See also