docs/oauth-extra-params.md
MCPProxy supports manual extra_params for OAuth providers requiring non-standard parameters. Manual params override auto-detected values.
{
"mcpServers": [
{
"name": "runlayer-slack",
"url": "https://oauth.runlayer.com/api/v1/proxy/abc123def/mcp",
"protocol": "http",
"enabled": true,
"oauth": {
"scopes": ["mcp"],
"pkce_enabled": true,
"extra_params": {
"resource": "https://oauth.runlayer.com/api/v1/proxy/abc123def/mcp"
}
}
}
]
}
{
"mcpServers": [
{
"name": "enterprise-mcp",
"url": "https://api.example.com/mcp",
"protocol": "http",
"enabled": true,
"oauth": {
"scopes": ["mcp:read", "mcp:write"],
"pkce_enabled": true,
"extra_params": {
"resource": "https://api.example.com/mcp",
"audience": "mcp-api",
"tenant": "org-456"
}
}
}
]
}
For Azure AD and other providers with custom OAuth endpoints, MCPProxy automatically discovers endpoints via the server's .well-known/oauth-authorization-server metadata (RFC 8414).
{
"mcpServers": [
{
"name": "azure-mcp",
"url": "https://mcp.azure.example.com/api",
"protocol": "http",
"enabled": true,
"oauth": {
"scopes": ["https://mcp.azure.example.com/.default"],
"pkce_enabled": true,
"extra_params": {
"resource": "https://mcp.azure.example.com"
}
}
}
]
}
Note: OAuth authorization and token URLs are auto-discovered from the server's metadata. If the server doesn't provide discovery metadata, you may need to configure the MCP server itself to expose proper OAuth endpoints.
client_id, client_secret, redirect_uri, code, state, code_verifier, code_challenge, code_challenge_method) are rejected at config load timeinternal/oauth/masking.go)# View OAuth configuration including extra_params
mcpproxy auth status --server=runlayer-slack
# Test OAuth flow with debug logging
mcpproxy auth login --server=runlayer-slack --log-level=debug
# Check for OAuth-related issues
mcpproxy doctor
RoundTripper wrapper pattern (RFC 2616) for transparent request interceptionextra_params configuredinternal/oauth/transport_wrapper.go for wrapper implementation