{"record":{"id":"233bbce67771108f","repo":"warpdotdev/warp","slug":"mcp-server-name-field-warp-id-must-be-a-uuid","errorCode":null,"errorMessage":"MCP server '{name}' field 'warp_id' must be a UUID","messagePattern":"MCP server '(.+?)' field 'warp_id' must be a UUID","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/config_file.rs","lineNumber":126,"sourceCode":"///   the server owns the set of recognized ids and unknown ids are skipped at resolution.\n/// - Entries with `command`/`url` remain as inline JSON (`MCPSpec::Json`) containing the unwrapped server map.\npub fn mcp_specs_from_mcp_servers(\n    mcp_servers: &Map<String, Value>,\n) -> anyhow::Result<Vec<MCPSpec>> {\n    let mut uuids: Vec<uuid::Uuid> = Vec::new();\n    let mut well_known: Vec<String> = Vec::new();\n    let mut json_map: Map<String, Value> = Map::new();\n\n    for (name, config) in mcp_servers {\n        let obj = config\n            .as_object()\n            .ok_or_else(|| anyhow::anyhow!(\"MCP server '{name}' config must be a JSON object\"))?;\n\n        if let Some(warp_id) = obj.get(\"warp_id\").and_then(Value::as_str) {\n            if let Ok(uuid) = uuid::Uuid::parse_str(warp_id) {\n                uuids.push(uuid);\n            } else if !FeatureFlag::WellKnownMcpIds.is_enabled() {\n                return Err(anyhow::anyhow!(\n                    \"MCP server '{name}' field 'warp_id' must be a UUID\"\n                ));\n            } else if warp_id.trim().is_empty() {\n                return Err(anyhow::anyhow!(\n                    \"MCP server '{name}' field 'warp_id' must be non-empty\"\n                ));\n            } else {\n                well_known.push(warp_id.to_string());\n            }\n        } else {\n            json_map.insert(name.clone(), config.clone());\n        }\n    }\n\n    uuids.sort();\n    uuids.dedup();\n    well_known.sort();\n    well_known.dedup();","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/config_file.rs#L108-L144","documentation":"Thrown when an MCP server entry has a `warp_id` field that fails Uuid::parse_str and the WellKnownMcpIds feature flag is disabled. warp_id is the mechanism for referencing a Warp-registered MCP server by UUID; when the flag is off, only strict UUIDs are accepted and anything else is a config error.","triggerScenarios":"A config entry like {\"my-server\": {\"warp_id\": \"github\"}} or a mistyped/copy-truncated UUID (\"550e8400-e29b-...\"), parsed while FeatureFlag::WellKnownMcpIds is not enabled — the parse fails and the flag check routes it to this error instead of the well-known bucket.","commonSituations":"Users writing human-readable server slugs into warp_id expecting them to resolve; configs produced for a newer Warp build (where well-known ids exist) run on an older build without the flag; or copy/paste losing UUID characters.","solutions":["Replace the warp_id value with the server's full UUID from `warp mcp list` (or wherever the registered id is shown).","If you meant an inline server, remove warp_id and specify command/url fields instead — entries without warp_id stay inline JSON.","If you intended a well-known slug, run a build where the WellKnownMcpIds feature flag is enabled."],"exampleFix":"// before\n\"mcp_servers\": { \"websearch\": { \"warp_id\": \"websearch\" } }\n\n// after\n\"mcp_servers\": { \"websearch\": { \"warp_id\": \"7f2d0e4a-1b9c-4f5e-9a2b-3c8d6e1f0a55\" } }","handlingStrategy":"validation","validationCode":"if let Some(warp_id) = obj.get(\"warp_id\").and_then(Value::as_str) {\n    if uuid::Uuid::parse_str(warp_id).is_err() && !FeatureFlag::WellKnownMcpIds.is_enabled() {\n        anyhow::bail!(\"warp_id '{warp_id}' is not a UUID and well-known ids are disabled\");\n    }\n}","typeGuard":"fn is_uuid(s: &str) -> bool {\n    uuid::Uuid::parse_str(s).is_ok()\n}","tryCatchPattern":"let specs = mcp_specs_from_mcp_servers(&mcp_servers).map_err(|err| {\n    if err.to_string().contains(\"must be a UUID\") {\n        user_friendly_config_error(err) // 'fix warp_id or remove it for inline config'\n    } else { err }\n})?;","preventionTips":["Copy warp_id values verbatim from `warp mcp list` output — never hand-type slugs unless the flag is on.","Add a config lint step that Uuid::parse_str's every warp_id.","Remember inline command/url servers need no warp_id at all."],"tags":["mcp","configuration","uuid","feature-flag","rust"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}