You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Say why a request was refused (401/403) instead of the generic message #398
When a request is refused, MCP Adapter returns core's generic rest_forbidden message: "Sorry, you are not allowed to do that." Missing credentials, a wrong password and an unknown user all get the same 401 and message, so owners and agents can't tell what's wrong. Core's own endpoints at least say "You are not currently logged in." in the same case.
The cause is that HttpTransport::check_permission() (includes/Transport/HttpTransport.php) returns false, so core writes the message.
Suggested change: return a WP_Error with a specific code and message, keeping the same status codes:
Not signed in (401): for example, "This request isn't signed in as a WordPress user. Check the username and Application Password, or the sign-in plugin you use." Link the site-owner guide.
Signed in without access (403): name the capability the user lacks.
Sites that use an OAuth or JWT plugin also reach this check, so the message shouldn't assume Application Passwords. The adapter shouldn't add a WWW-Authenticate header: it has no OAuth metadata to point to, and clients like claude.ai start an OAuth sign-in when they see one.
Activity