{"record":{"id":"4bd22de14ede5d30","repo":"tinyhumansai/openhuman","slug":"mcp-registry-http-remote-server-id-has-empty","errorCode":null,"errorMessage":"[mcp-registry] http_remote server_id={} has empty deployment_url","messagePattern":"\\[mcp-registry\\] http_remote server_id=(.+?) has empty deployment_url","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/mcp/registry/connections.rs","lineNumber":413,"sourceCode":"\n    // Branch on transport variant. Both branches end with `initialize` +\n    // `list_tools` so a misconfigured server fails loudly at connect\n    // instead of silently at first `call_tool`.\n    let client = match &server.transport {\n        Transport::Stdio => {\n            let stdio = Arc::new(McpStdioClient::new(\n                server.command.clone(),\n                server.args.clone(),\n                env,\n                None,\n                identity,\n            ));\n            stdio.initialize().await?;\n            ActiveClient::Stdio(stdio)\n        }\n        Transport::HttpRemote { url } => {\n            if url.is_empty() {\n                anyhow::bail!(\n                    \"[mcp-registry] http_remote server_id={} has empty deployment_url\",\n                    server.server_id\n                );\n            }\n            // Refresh an expired OAuth access token before dialing so the agent\n            // never connects with a stale token (silent refresh-token grant; a\n            // no-op for static-token / no-auth servers).\n            if let Err(e) = super::oauth::refresh_if_expired(config, &server.server_id).await {\n                tracing::warn!(\n                    \"[mcp-registry] oauth refresh failed for server_id={} (using existing token): {e}\",\n                    server.server_id\n                );\n            }\n            // Build static auth from the (possibly just-refreshed) stored env:\n            // each entry is a request header (key = header name, value = the\n            // secret, e.g. `Authorization` -> `Bearer <token>`), from the install\n            // form's declared `remotes[].headers` or a captured OAuth token.\n            let env_now: Vec<(String, String)> = store::load_env_values(config, &server.server_id)","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/mcp/registry/connections.rs#L395-L431","documentation":"The dynamic MCP registry (`mcp_clients`) tried to connect to a server recorded with `Transport::HttpRemote` whose `url` (deployment URL) is an empty string, and bails before dialing. The row exists but its `deployment_url` was never populated — this happens with hand-edited/imported DB rows or a registry write path that recorded the transport without resolving a URL.","triggerScenarios":"`mcp_registry` connect for a server whose `mcp_clients.db` row has `transport = 'http_remote'` and an empty/NULL deployment_url; servers registered from a smithery-style install that failed to record the deployment URL.","commonSituations":"Manually inserted/edited registry rows; partial installs interrupted before the deployment URL was written; restoring a DB backup across versions with schema drift.","solutions":["Re-register the server through the normal install path so the deployment URL is recorded (`mcp_registry` install/connect flows).","Or update the row's deployment_url in `mcp_clients.db` to the real endpoint.","If the URL is genuinely unknown, remove the broken entry and re-add the server by URL.","Check server logs for the interrupted install that left the row half-populated."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before connecting a registered http_remote server:\nif matches!(server.transport, Transport::HttpRemote { ref url } if url.is_empty()) {\n    anyhow::bail!(\"server {} has no deployment_url; re-register it\", server.server_id);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register http_remote servers only through the install path that resolves the deployment URL.","Never hand-edit transport rows in mcp_clients.db.","Validate deployment_url is non-empty right after registration, when the error is easy to fix."],"tags":["mcp","registry","configuration","http-transport"],"backgroundTag":"invalid-configuration","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}