{"record":{"id":"3b2690e0eff0dded","repo":"cline/cline","slug":"mcp-server-settings-toggle-requires-a-server-name-3b2690","errorCode":null,"errorMessage":"MCP server settings toggle requires a server name.","messagePattern":"MCP server settings toggle requires a server name\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdk/packages/core/src/settings/settings-service.ts","lineNumber":586,"sourceCode":"\t\t\t\tconst plugin = listPluginSettings({\n\t\t\t\t\tworkspaceRoot: resolveWorkspaceRoot(input),\n\t\t\t\t}).find((item) => item.path === pluginPath);\n\t\t\t\tif (!plugin) {\n\t\t\t\t\tthrow new Error(`Unknown plugin: ${pluginPath}`);\n\t\t\t\t}\n\t\t\t\tenabled = !plugin.enabled;\n\t\t\t}\n\t\t\tsetDisabledPlugin(pluginPath, !enabled);\n\t\t\treturn {\n\t\t\t\tsnapshot: await this.list(input),\n\t\t\t\tchangedTypes: [\"plugins\"],\n\t\t\t};\n\t\t}\n\n\t\tif (input.type === \"mcp\") {\n\t\t\tconst name = input.name?.trim() || input.id?.trim();\n\t\t\tif (!name) {\n\t\t\t\tthrow new Error(\"MCP server settings toggle requires a server name.\");\n\t\t\t}\n\t\t\tconst filePath = input.path?.trim() || resolveDefaultMcpSettingsPath();\n\t\t\tlet targetEnabled = input.enabled;\n\t\t\tif (targetEnabled === undefined) {\n\t\t\t\tconst current = resolveMcpServerRegistrations({ filePath }).find(\n\t\t\t\t\t(registration) => registration.name === name,\n\t\t\t\t);\n\t\t\t\tif (!current) {\n\t\t\t\t\tthrow new Error(`Unknown MCP server: ${name}`);\n\t\t\t\t}\n\t\t\t\ttargetEnabled = current.disabled === true;\n\t\t\t}\n\t\t\tsetMcpServerDisabled({\n\t\t\t\tfilePath,\n\t\t\t\tname,\n\t\t\t\tdisabled: !targetEnabled,\n\t\t\t});\n\t\t\treturn {","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/cline/cline/blob/491b30b806fdb8c93513f821f2b87d63a61542f5/sdk/packages/core/src/settings/settings-service.ts#L568-L604","documentation":"Error \"MCP server settings toggle requires a server name.\" thrown in cline/cline.","triggerScenarios":"Thrown at sdk/packages/core/src/settings/settings-service.ts:586 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"}