docs/errors/MCPX_OAUTH_DISCOVERY_FAILED.md
MCPX_OAUTH_DISCOVERY_FAILEDSeverity: error Domain: OAuth
When connecting to an HTTP MCP server that requires OAuth, mcpproxy first discovers the authorisation endpoint by fetching one of:
<server>/.well-known/oauth-authorization-server<server>/.well-known/openid-configurationThe fetch failed (network error, 404, malformed JSON, missing required fields, or no advertised auth metadata at all).
.well-known discovery.curl -sS <server-url>/.well-known/oauth-authorization-server | jq .
curl -sS <server-url>/.well-known/openid-configuration | jq .
If both return non-JSON or 404, the server doesn't publish auto-discoverable metadata.
Set the OAuth fields explicitly in the upstream config so mcpproxy doesn't have to discover them:
{
"name": "my-server",
"url": "https://example.com/mcp",
"oauth": {
"authorization_endpoint": "https://example.com/oauth/authorize",
"token_endpoint": "https://example.com/oauth/token",
"client_id": "...",
"scopes": ["openid", "profile"]
}
}
If discovery is blocked at the network layer:
curl -v <server-url>/.well-known/oauth-authorization-server
env | grep -i proxy
See MCPX_NETWORK_PROXY_MISCONFIG if your
proxy variables are wrong.