openai/codex · error · anyhow::Error
No MCP server named '{name}' found in configuration.
Error message
No MCP server named '{name}' found in configuration. What it means
Error "No MCP server named '{name}' found in configuration." thrown in openai/codex.
Source
Thrown at codex-rs/cli/src/mcp_cmd.rs:609
server.oauth_resource.as_deref(),
server.oauth_callback_port(config.mcp_oauth_callback_port),
config.mcp_oauth_callback_url.as_deref(),
http_client,
)
.await?;
println!("Successfully logged in to MCP server '{name}'.");
Ok(())
}
async fn run_logout(config: &Config, logout_args: LogoutArgs) -> Result<()> {
let mcp_manager = load_mcp_manager(config).await?;
let mcp_servers = mcp_manager.configured_servers(config).await;
let LogoutArgs { name } = logout_args;
let server = mcp_servers
.get(&name)
.ok_or_else(|| anyhow!("No MCP server named '{name}' found in configuration."))?;
let url = match &server.transport {
McpServerTransportConfig::StreamableHttp { url, .. } => url.clone(),
_ => bail!("OAuth logout is only supported for streamable_http transports."),
};
let credential_name = server.oauth_credential_name(&name);
match delete_oauth_tokens(
credential_name.as_ref(),
&url,
config.mcp_oauth_credentials_store_mode,
config.auth_keyring_backend_kind(),
) {
Ok(true) => println!("Removed OAuth credentials for '{name}'."),
Ok(false) => println!("No OAuth credentials stored for '{name}'."),
Err(err) => return Err(anyhow!("failed to delete OAuth credentials: {err}")),
}
View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/cli/src/mcp_cmd.rs:609 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/59e0d05dd252223e.
Report an issue: GitHub.