Hmbown/CodeWhale · error
OAuth is disabled for plugin-contributed MCP servers; use a…
Error message
OAuth is disabled for plugin-contributed MCP servers; use a reviewed environment-backed header or bearer token
What it means
The interactive OAuth login entry point refuses to start an OAuth flow for MCP servers contributed by a reviewed plugin. Plugin-contributed servers are considered pre-vetted and must authenticate with reviewed environment-backed headers or bearer tokens; the library deliberately does not store OAuth credentials for them.
Solutions
- Configure the plugin server's auth via its reviewed environment-backed header or bearer token (env vars the plugin declares) instead of OAuth
- Reinstall/repair the plugin so its environment-provided credentials are available
- If you need OAuth, define the server directly in your MCP config (not via a plugin) and run login there
- Check the plugin's documentation for the expected auth env vars
Example fix
// before (via /mcp login on plugin server — rejected) /mcp login plugin-server // after: provide credentials through the plugin's environment export MY_PLUGIN_MCP_BEARER_TOKEN=...
Defensive patterns
Strategy: validation
Validate before calling
fn oauth_login_supported(server: &McpServerConfig) -> bool {
server.reviewed_plugin.is_none()
} Type guard
fn is_user_configured_server(server: &McpServerConfig) -> bool {
server.reviewed_plugin.is_none() && server.url.is_some()
} Try / catch
if server.reviewed_plugin.is_some() {
eprintln!("plugin server: configure env-backed credentials instead of OAuth");
return Ok(());
}
perform_oauth_login_for_server(&server).await?; Prevention
- Check server.reviewed_plugin before offering/invoking OAuth login
- Set up the plugin's declared env auth vars when installing a plugin
- Surface the plugin policy in UI so users don't attempt OAuth on plugin servers
When it happens
Trigger: Calling perform_oauth_login_for_server / perform_oauth_login_for_server_with_cancel for an McpServerConfig whose reviewed_plugin field is Some — typically via /mcp login or the model-driven authenticate tool against a plugin-provided server.
Common situations: Trying to /mcp login a server that was installed through a plugin rather than user config; a plugin server that lost its env-provided credentials so a user attempts OAuth as a workaround.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- OAuth storage is disabled for plugin-contributed MCP servers
- invalid MCP OAuth callback port 0
- MCP OAuth setup cancelled after plugin authority changed
- MCP operation on plugin server
- MCP server ' ' already has bearer/static Authorization…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/4db90462a5b61340.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/mcp/oauth.rs:1073
.await
}
/// Run an MCP OAuth login that can be stopped by the caller.
///
/// Cancellation drops the in-flight OAuth future before this function returns,
/// which also closes its callback listener. A caller that replaces one login
/// with another should await the cancelled call before starting the replacement.
pub async fn perform_oauth_login_for_server_with_cancel(
name: &str,
server: &McpServerConfig,
explicit_scopes: Option<Vec<String>>,
callback_port: Option<u16>,
callback_url: Option<&str>,
cancellation_token: CancellationToken,
network_policy: Option<&NetworkPolicyDecider>,
) -> Result<()> {
if server.reviewed_plugin.is_some() {
bail!(
"OAuth is disabled for plugin-contributed MCP servers; use a reviewed environment-backed header or bearer token"
);
}
run_cancellable_oauth(
&cancellation_token,
perform_oauth_login_for_server_inner(
name,
server,
explicit_scopes,
callback_port,
callback_url,
network_policy,
),
)
.await
}
async fn run_cancellable_oauth<F, T>(cancellation_token: &CancellationToken, future: F) -> Result<T>View on GitHub (pinned to 73e0f67d83)