cline/cline · error

Invalid MCP server "${name}": ${details}

Error message

Invalid MCP server "${name}": ${details}

What it means

Error "Invalid MCP server "${name}": ${details}" thrown in cline/cline.

Source

Thrown at sdk/packages/core/src/extensions/mcp/config-loader.ts:782

/**
 * Parses one raw MCP settings entry without requiring sibling entries to be
 * valid. Hosts with an editable settings UI can use this to keep healthy and
 * repairable entries visible when a hand-edited sibling is malformed.
 */
export function parseMcpServerRegistration(
	name: string,
	value: unknown,
): McpServerRegistration {
	const result = mcpRegistrationBodySchema.safeParse(value);
	if (!result.success) {
		const details = result.error.issues
			.map((issue) => {
				const path = issue.path.join(".");
				return path ? `${path}: ${issue.message}` : issue.message;
			})
			.join("; ");
		throw new Error(`Invalid MCP server "${name}": ${details}`);
	}
	return toMcpServerRegistration(name, result.data);
}

/** Resolves one configured server without requiring sibling entries to parse. */
export function resolveMcpServerRegistration(
	serverName: string,
	options: LoadMcpSettingsOptions = {},
): McpServerRegistration | undefined {
	const filePath = options.filePath ?? resolveDefaultMcpSettingsPath();
	const settings = readJsonObject(filePath);
	const serversValue = settings.mcpServers;
	if (
		!serversValue ||
		typeof serversValue !== "object" ||
		Array.isArray(serversValue)
	) {
		return undefined;

View on GitHub (pinned to 491b30b806)

When it happens

Trigger: Thrown at sdk/packages/core/src/extensions/mcp/config-loader.ts:782 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/29bd809b5f24da05. Report an issue: GitHub.