openai/codex · error · anyhow::Error
unknown MCP server
Error message
unknown MCP server '{CODEX_APPS_MCP_SERVER_NAME}' What it means
Bailed in the codex-apps tool path when the built-in Codex Apps MCP server (CODEX_APPS_MCP_SERVER_NAME) is missing from the servers registry during prepare_call/hard-refresh. Indicates the apps server failed to start or was torn down while an apps tool call was in flight.
Solutions
- Ensure Codex Apps/connectors are enabled in config
- Re-login if connector auth expired
- Restart the session so apps tools initialize
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at codex-rs/codex-mcp/src/connection_manager/tool_catalog.rs:362 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/c125f2c1fcd1fcfb.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/codex-mcp/src/connection_manager/tool_catalog.rs:362
view.metadata.clone(),
self.plugin_id_for_mcp_server_name(server_name)
.map(str::to_string),
self.is_selected_plugin_mcp_server(server_name),
))
}
/// Force-refresh Codex Apps tools and publish one new exact catalog revision.
#[expect(
clippy::await_holding_invalid_type,
reason = "catalog publication must remain serialized with captured tool calls"
)]
pub async fn hard_refresh_codex_apps_tools_cache(&self) -> Result<Vec<ToolInfo>> {
let _refresh = self.codex_apps_refresh_lock.lock().await;
let refresh_start = Instant::now();
let view = self
.servers
.get(CODEX_APPS_MCP_SERVER_NAME)
.ok_or_else(|| anyhow!("unknown MCP server '{CODEX_APPS_MCP_SERVER_NAME}'"))?;
let managed_client = view
.connection
.client()
.await
.context("failed to get client")?;
let list_start = Instant::now();
let fetch_ticket =
managed_client
.codex_apps_tools_cache_context
.as_ref()
.map(|cache_context| {
cache_context.begin_fetch(ConnectorRuntimeFetchSource::HardRefresh)
});
let client_tools = list_tools_for_client_uncached(
CODEX_APPS_MCP_SERVER_NAME,
/*is_codex_apps_mcp_server*/ true,
/*codex_apps_refresh_trigger*/ "explicit",View on GitHub (pinned to 339751715c)