n8n-io/n8n · error · NodeOperationError

MCP Server returned no tools

Error message

MCP Server returned no tools

What it means

Error "MCP Server returned no tools" thrown in n8n-io/n8n.

Source

Thrown at packages/@n8n/nodes-langchain/nodes/mcp/shared/runtime.ts:203

/**
 * Connect to the MCP server and return the client + filtered tools, or throw a
 * `NodeOperationError` on connection failure or an empty tool list. The
 * `connectOrThrow` counterpart to {@link connectAndGetTools}.
 */
async function connectOrThrow(
	ctx: IExecuteFunctions,
	config: ResolvedMcpConfig,
	itemIndex: number,
): Promise<{ client: Client; mcpTools: McpTool[] }> {
	const node = ctx.getNode();
	const { client, mcpTools, error } = await connectAndGetTools(ctx, config);

	if (error) {
		throw new NodeOperationError(node, error.error, { itemIndex });
	}
	if (!mcpTools?.length) {
		await client.close();
		throw new NodeOperationError(node, 'MCP Server returned no tools', { itemIndex });
	}

	return { client, mcpTools };
}

/**
 * Run the tool named in `item.json.tool` against the connected client and push
 * the result onto `returnData`. Shared by the cached and non-cached execute paths.
 */
async function runToolCall(opts: {
	ctx: IExecuteFunctions;
	node: INode;
	item: INodeExecutionData;
	mcpTools: McpTool[];
	client: Client;
	timeout: number;
	itemIndex: number;
	returnData: INodeExecutionData[];

View on GitHub (pinned to 5ac6606e81)

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/shared/runtime.ts:203 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/93fb575eced969db. Report an issue: GitHub.