{"record":{"id":"bb2321e6713c2a01","repo":"Hmbown/CodeWhale","slug":"mcp-server-name-is-disabled","errorCode":null,"errorMessage":"MCP server '{name}' is disabled","messagePattern":"MCP server '(.+?)' is disabled","errorType":"http","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"crates/tui/src/runtime_api.rs","lineNumber":4681,"sourceCode":"\n/// `POST /v1/apps/mcp/servers/{name}/reconnect` — retry only this server and\n/// return the actual result without replacing healthy sibling connections.\nasync fn reconnect_mcp_server(\n    State(state): State<RuntimeApiState>,\n    Path(name): Path<String>,\n) -> Result<Json<McpServerActionReceipt>, ApiError> {\n    let (config, _) = mcp_management_config(&state)?;\n    if !config.servers.contains_key(&name) {\n        return Err(ApiError::not_found(format!(\n            \"MCP server '{name}' not found\"\n        )));\n    }\n    let handle = mcp_pool_handle(&state, true)\n        .await?\n        .ok_or_else(|| ApiError::internal(\"MCP pool unavailable\"))?;\n    let mut pool = handle.lock().await;\n    let error = if !config.servers[&name].is_enabled() {\n        Some(anyhow::anyhow!(\"MCP server '{name}' is disabled\"))\n    } else if !pool.config_matches(&config) {\n        Some(anyhow::anyhow!(\n            \"MCP configuration changed; reload it before retrying this server\"\n        ))\n    } else {\n        pool.retry_connection(&name).await.err()\n    };\n    let connection = mcp_connection_outcome(&pool, &name, error.as_ref());\n    Ok(Json(McpServerActionReceipt {\n        revision: None,\n        name,\n        action: if error.is_none() {\n            \"reconnected\"\n        } else {\n            \"reconnect_failed\"\n        },\n        ok: error.is_none() && connection.connected,\n        connection: Some(connection),","sourceCodeStart":4663,"sourceCodeEnd":4699,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/runtime_api.rs#L4663-L4699","documentation":"The MCP server retry endpoint validates the target server before retrying. If config.servers[name].is_enabled() is false, it does not call pool.retry_connection; instead it records 'MCP server \\'<name>\\' is disabled' as the connection outcome, which surfaces to the caller.","triggerScenarios":"Calling the retry endpoint (retry_connection path in runtime_api.rs) for a server name that exists in config.servers but has is_enabled() == false, e.g. disabled in the MCP config file.","commonSituations":"Retrying a server the user previously disabled in MCP settings, retrying under a stale client cache where the server was since disabled, or a script retrying all servers indiscriminately including disabled ones.","solutions":["Enable the server in the MCP configuration (set its enabled flag) and reload the config, then retry.","Choose a different, enabled server name; verify with the endpoint listing servers and their state.","If the server should never run, stop retrying it and remove it from automation target lists."],"exampleFix":"// before (config snippet)\n[servers.github]\nenabled = false\n\n// after\n[servers.github]\nenabled = true","handlingStrategy":"validation","validationCode":"let cfg = fetch_mcp_config().await?;\nif !cfg.servers.get(\"github\").map(|s| s.enabled).unwrap_or(false) {\n    return Err(\"server disabled; retry would fail\");\n}","typeGuard":null,"tryCatchPattern":"match outcome.error {\n    Some(e) if e.contains(\"is disabled\") => enable_server_then_retry(name),\n    other => handle(other),\n}","preventionTips":["Enumerate enabled servers via the API before batch retries","Keep automation target lists filtered to enabled servers","Sync enable/disable flags through one config source"],"tags":["mcp","runtime-api","config"],"backgroundTag":"unsupported-operation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-22T21:17:16.096Z"}