Protocol
Endpoint
Section titled “Endpoint”POST /wp-json/ballesdev/mcp (or /?rest_route=/ballesdev/mcp on sites without pretty permalinks). It uses the MCP Streamable HTTP transport without sessions: each POST gets one JSON response. GET and DELETE return 405.
Authentication
Section titled “Authentication”The endpoint accepts Authorization: Bearer with either:
- An OAuth 2.1 access token (
rmcp_at_…). RealMCP is its own authorization server, following the MCP authorization specification: PKCE with S256, clients identified by Client ID Metadata Documents, no dynamic client registration. Access tokens last 1 hour; refresh tokens (rmcp_rt_…) last 60 days and rotate on every use. The only scope ismcp; other requested scopes are ignored. - A connection token (
rmcp_mt_…) created in RealMCP → Connect. It expires in 30, 90 (the default) or 365 days, or never, as chosen when creating it.
Both only work on this endpoint. WordPress’s own REST authentication (an Application Password over HTTP Basic auth) is accepted too. The user needs the server’s capability, edit_pages by default (Editors and Administrators).
A request without valid credentials gets HTTP 401 with WWW-Authenticate: Bearer resource_metadata="…", which points the client to the Protected Resource Metadata; with an expired or revoked token it also carries error="invalid_token". The authorization server metadata is at /.well-known/oauth-authorization-server, so OAuth needs a permalink structure other than Plain. It lists a revocation_endpoint (RFC 7009) at /wp-json/ballesdev/oauth/revoke: when a client revokes its token, the site disconnects that connection.
Requests with an Origin header are accepted only from the site’s own origin (scheme, host and port), which blocks browser pages on other sites.
Protocol versions
Section titled “Protocol versions”| Version | Methods |
|---|---|
2026-07-28 |
server/discover, tools/list, tools/call |
2025-11-25, 2025-06-18 |
initialize, ping, tools/list, tools/call |
The version is chosen per request: the MCP-Protocol-Version header or params._meta. Requests on 2026-07-28 must send MCP-Protocol-Version, Mcp-Method and Mcp-Name headers that match the body. Other versions get error -32022 with the list of supported ones. Batches aren’t supported.
Errors
Section titled “Errors”- A tool that runs but fails (for example
content_conflict) returns a result withisError: trueand the error code in brackets, so the AI can read it and correct course. - Protocol problems (an unknown tool or method, invalid parameters) return JSON-RPC errors.
- An unexpected failure inside a tool returns a generic message; the details go to WordPress’s
debug.logwhenWP_DEBUGis on.