{"record":{"id":"29bd809b5f24da05","repo":"cline/cline","slug":"invalid-mcp-server-name-details","errorCode":null,"errorMessage":"Invalid MCP server \"${name}\": ${details}","messagePattern":"Invalid MCP server \"(.+?)\": (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/packages/core/src/extensions/mcp/config-loader.ts","lineNumber":782,"sourceCode":"\n/**\n * Parses one raw MCP settings entry without requiring sibling entries to be\n * valid. Hosts with an editable settings UI can use this to keep healthy and\n * repairable entries visible when a hand-edited sibling is malformed.\n */\nexport function parseMcpServerRegistration(\n\tname: string,\n\tvalue: unknown,\n): McpServerRegistration {\n\tconst result = mcpRegistrationBodySchema.safeParse(value);\n\tif (!result.success) {\n\t\tconst details = result.error.issues\n\t\t\t.map((issue) => {\n\t\t\t\tconst path = issue.path.join(\".\");\n\t\t\t\treturn path ? `${path}: ${issue.message}` : issue.message;\n\t\t\t})\n\t\t\t.join(\"; \");\n\t\tthrow new Error(`Invalid MCP server \"${name}\": ${details}`);\n\t}\n\treturn toMcpServerRegistration(name, result.data);\n}\n\n/** Resolves one configured server without requiring sibling entries to parse. */\nexport function resolveMcpServerRegistration(\n\tserverName: string,\n\toptions: LoadMcpSettingsOptions = {},\n): McpServerRegistration | undefined {\n\tconst filePath = options.filePath ?? resolveDefaultMcpSettingsPath();\n\tconst settings = readJsonObject(filePath);\n\tconst serversValue = settings.mcpServers;\n\tif (\n\t\t!serversValue ||\n\t\ttypeof serversValue !== \"object\" ||\n\t\tArray.isArray(serversValue)\n\t) {\n\t\treturn undefined;","sourceCodeStart":764,"sourceCodeEnd":800,"githubUrl":"https://github.com/cline/cline/blob/491b30b806fdb8c93513f821f2b87d63a61542f5/sdk/packages/core/src/extensions/mcp/config-loader.ts#L764-L800","documentation":"Error \"Invalid MCP server \"${name}\": ${details}\" thrown in cline/cline.","triggerScenarios":"Thrown at sdk/packages/core/src/extensions/mcp/config-loader.ts:782 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"491b30b806fdb8c93513f821f2b87d63a61542f5","analyzedAt":"2026-08-25T13:45:22.367Z","schemaVersion":2},"datasetVersion":"2026-08-25T21:54:21.419Z"}