{"record":{"id":"8df03afcad8c35ac","repo":"Kuberwastaken/claurst","slug":"mcp-server-is-configured-as-but-missing","errorCode":null,"errorMessage":"MCP server '{}' is configured as '{}' but missing URL","messagePattern":"MCP server '(.+?)' is configured as '(.+?)' but missing URL","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/mcp/src/connection_manager.rs","lineNumber":124,"sourceCode":"    }\r\n\r\n    /// Connect to all configured servers (env-vars expanded, errors non-fatal).\r\n    pub async fn connect_all(&self) -> anyhow::Result<()> {\r\n        let names: Vec<String> = self.state.iter().map(|e| e.key().clone()).collect();\r\n        for name in names {\r\n            if let Err(e) = self.connect(&name).await {\r\n                error!(server = %name, error = %e, \"MCP server failed to connect during startup\");\r\n            }\r\n        }\r\n        Ok(())\r\n    }\r\n\r\n    async fn connect_expanded_config(name: &str, config: &McpServerConfig) -> anyhow::Result<McpClient> {\r\n        let auth_token = if matches!(config.server_type.as_str(), \"sse\" | \"http\") {\r\n            match config.url.as_deref() {\r\n                Some(server_url) => oauth::get_valid_mcp_access_token(name, server_url).await?,\r\n                None => {\r\n                    anyhow::bail!(\r\n                        \"MCP server '{}' is configured as '{}' but missing URL\",\r\n                        name,\r\n                        config.server_type\r\n                    )\r\n                }\r\n            }\r\n        } else {\r\n            None\r\n        };\r\n        McpClient::connect(config, auth_token).await\r\n    }\r\n\r\n    // -----------------------------------------------------------------------\r\n    // Connect / disconnect / restart\r\n    // -----------------------------------------------------------------------\r\n\r\n    /// Connect to a single server by name, marking status along the way.\r\n    pub async fn connect(&self, name: &str) -> anyhow::Result<()> {\r","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/mcp/src/connection_manager.rs#L106-L142","documentation":"The MCP connection manager rejects connecting to a server whose type is 'sse' or 'http' when the config has no `url` field. These transport types require a remote HTTP endpoint, and the OAuth token acquisition step needs that URL, so a missing URL is a fatal configuration error. The library bails before any network connection is attempted.","triggerScenarios":"Calling connect (via connect_expanded_config) with an McpServerConfig where server_type is \"sse\" or \"http\" and config.url is None.","commonSituations":"Hand-edited .mcp.json or settings entry omitted the url key; a template was copied and the url placeholder removed; a server was switched from stdio (command-based) to sse/http without adding a URL.","solutions":["Add the \"url\" field to the MCP server config entry, e.g. \"url\": \"https://example.com/sse\"","Verify server_type matches the intended transport; if the server is local, use type \"stdio\" with a command instead of sse/http","Re-run provider/config discovery to ensure the expanded config actually contains the URL"],"exampleFix":"// before (.mcp.json)\n{ \"mcpServers\": { \"docs\": { \"type\": \"sse\" } } }\n// after\n{ \"mcpServers\": { \"docs\": { \"type\": \"sse\", \"url\": \"https://docs.example.com/sse\" } } }","handlingStrategy":"validation","validationCode":"fn ensure_remote_config_ok(cfg: &McpServerConfig) -> anyhow::Result<()> {\n    if matches!(cfg.server_type.as_str(), \"sse\" | \"http\") && cfg.url.is_none() {\n        anyhow::bail!(\"server '{}' of type '{}' requires a url\", cfg.name, cfg.server_type);\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate MCP config entries at startup before attempting connections","Use a JSON schema or typed config loader that requires url for sse/http types","Never switch a stdio server entry to sse/http without adding its URL"],"tags":["mcp","config","oauth","url"],"backgroundTag":"missing-required-config-field","analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}