cline/cline · error
Unknown MCP server: ${serverName}
Error message
Unknown MCP server: ${serverName} What it means
Error "Unknown MCP server: ${serverName}" thrown in cline/cline.
Source
Thrown at sdk/packages/core/src/extensions/mcp/config-loader.ts:864
options: LoadMcpSettingsOptions = {},
): McpServerOAuthState | undefined {
const config = loadMcpSettingsFile(options);
if (!Object.hasOwn(config.mcpServers, serverName)) {
return undefined;
}
return normalizeMcpServerOAuthState(config.mcpServers[serverName]?.oauth);
}
function buildOAuthStateMutator(
serverName: string,
updater: (current: McpServerOAuthState) => McpServerOAuthState,
options: UpdateMcpServerOAuthStateOptions,
): McpSettingsMutator<McpServerOAuthState> {
return (settings) => {
const servers = settings.mcpServers as Record<string, unknown>;
const server = getOwnServerRecord(servers, serverName);
if (!server) {
throw new Error(`Unknown MCP server: ${serverName}`);
}
if (options.expectedOAuthClient !== undefined) {
const parsedClient = oauthClientSchema.safeParse(server.oauthClient);
const currentClient = parsedClient.success
? parsedClient.data
: undefined;
const expectedClient = options.expectedOAuthClient ?? undefined;
if (
currentClient?.clientId !== expectedClient?.clientId ||
currentClient?.clientSecret !== expectedClient?.clientSecret
) {
throw new McpOAuthClientChangedError(serverName);
}
}
const current = validateOauthState(server.oauth) ?? {};
const updated = normalizeMcpServerOAuthState(updater(current));
if (updated) {View on GitHub (pinned to 491b30b806)
When it happens
Trigger: Thrown at sdk/packages/core/src/extensions/mcp/config-loader.ts:864 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cline/cline@491b30b806 (2026-08-25).
Data as JSON: /api/errors/f0675d77f2964ab3.
Report an issue: GitHub.