Hmbown/CodeWhale · warning

MCP server ' ' is disabled

Error message

MCP server '{name}' is disabled

What it means

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.

Solutions

  1. Enable the server in the MCP configuration (set its enabled flag) and reload the config, then retry.
  2. Choose a different, enabled server name; verify with the endpoint listing servers and their state.
  3. If the server should never run, stop retrying it and remove it from automation target lists.

Example fix

// before (config snippet)
[servers.github]
enabled = false

// after
[servers.github]
enabled = true
Defensive patterns

Strategy: validation

Validate before calling

let cfg = fetch_mcp_config().await?;
if !cfg.servers.get("github").map(|s| s.enabled).unwrap_or(false) {
    return Err("server disabled; retry would fail");
}

Try / catch

match outcome.error {
    Some(e) if e.contains("is disabled") => enable_server_then_retry(name),
    other => handle(other),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

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


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/bb2321e6713c2a01. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/runtime_api.rs:4681

/// `POST /v1/apps/mcp/servers/{name}/reconnect` — retry only this server and
/// return the actual result without replacing healthy sibling connections.
async fn reconnect_mcp_server(
    State(state): State<RuntimeApiState>,
    Path(name): Path<String>,
) -> Result<Json<McpServerActionReceipt>, ApiError> {
    let (config, _) = mcp_management_config(&state)?;
    if !config.servers.contains_key(&name) {
        return Err(ApiError::not_found(format!(
            "MCP server '{name}' not found"
        )));
    }
    let handle = mcp_pool_handle(&state, true)
        .await?
        .ok_or_else(|| ApiError::internal("MCP pool unavailable"))?;
    let mut pool = handle.lock().await;
    let error = if !config.servers[&name].is_enabled() {
        Some(anyhow::anyhow!("MCP server '{name}' is disabled"))
    } else if !pool.config_matches(&config) {
        Some(anyhow::anyhow!(
            "MCP configuration changed; reload it before retrying this server"
        ))
    } else {
        pool.retry_connection(&name).await.err()
    };
    let connection = mcp_connection_outcome(&pool, &name, error.as_ref());
    Ok(Json(McpServerActionReceipt {
        revision: None,
        name,
        action: if error.is_none() {
            "reconnected"
        } else {
            "reconnect_failed"
        },
        ok: error.is_none() && connection.connected,
        connection: Some(connection),

View on GitHub (pinned to 73e0f67d83)