Kuberwastaken/claurst · error · anyhow::Error

MCP server ' ' has no command configured

Error message

MCP server '{}' has no command configured

What it means

connect_stdio was asked to start an MCP server config whose `command` field is None — a stdio server entry in settings that has no executable configured (typically a URL-only entry wrongly routed to the stdio path, or a hand-edited config). The transport cannot spawn a process without a command.

Solutions

  1. Add a `command` field to the MCP server entry in settings, or switch the entry to an http/url type
  2. Validate the MCP server config shape before attempting to connect
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:120 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10). Data as JSON: /api/errors/abb9f4de84522d27. Report an issue: GitHub.

Appendix: source

Thrown at src-rust/crates/mcp/src/rmcp_backend.rs:120

    }
}

pub struct RmcpClientBackend {
    snapshot: McpClientSnapshot,
    peer: rmcp::Peer<RoleClient>,
    #[allow(dead_code)]
    running: Mutex<RunningService<RoleClient, RmcpNotificationClient>>,
    notifications_rx: Arc<Mutex<mpsc::UnboundedReceiver<Value>>>,
}

impl RmcpClientBackend {
    pub async fn connect_stdio(
        config: &claurst_core::config::McpServerConfig,
    ) -> anyhow::Result<Self> {
        let command = config
            .command
            .clone()
            .ok_or_else(|| anyhow::anyhow!("MCP server '{}' has no command configured", config.name))?;

        let transport = TokioChildProcess::new(Command::new(&command).configure(|cmd| {
            cmd.args(&config.args);
            cmd.envs(&config.env);
        }))
        .map_err(|e| anyhow::anyhow!("failed to spawn rmcp stdio child for '{}': {}", config.name, e))?;

        let client_info = build_client_info(rmcp_model::ProtocolVersion::default());
        Self::connect_with_transport(config, transport, client_info, "stdio").await
    }

    pub async fn connect_http(
        config: &claurst_core::config::McpServerConfig,
        auth_token: Option<String>,
        protocol_version: rmcp_model::ProtocolVersion,
    ) -> anyhow::Result<Self> {
        let endpoint = config
            .url

View on GitHub (pinned to b0637c97ec)