n8n-io/n8n · error

OAuth2 authentication requires mcp trigger node v2.0 or…

Error message

OAuth2 authentication requires mcp trigger node v2.0 or higher

What it means

MCP Trigger webhook guard: authentication is set to n8n OAuth2 but the node's typeVersion is below 2, which predates OAuth2 support. The webhook answers 401 with this text instead of attempting unsupported authentication.

Solutions

  1. Upgrade the MCP Trigger node to typeVersion 2 or higher
  2. Or switch authentication to a mode supported by the current node version
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpTrigger.node.ts:175 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


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

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpTrigger.node.ts:175

				httpMethod: 'DELETE',
				responseMode: 'onReceived',
				isFullPath: true,
				path: '={{$parameter["path"]}}',
				nodeType: 'mcp',
				ndvHideMethod: true,
				ndvHideUrl: true,
			},
		],
	};

	async webhook(context: IWebhookFunctions): Promise<IWebhookResponseData> {
		const webhookName = context.getWebhookName();
		const req = context.getRequestObject();
		const resp = context.getResponseObject() as unknown as CompressionResponse;

		if (context.getNodeParameter('authentication') === 'n8nOAuth2') {
			if (context.getNode().typeVersion < 2) {
				resp.writeHead(401);
				resp.end('OAuth2 authentication requires mcp trigger node v2.0 or higher');
				return { noWebhookResponse: true };
			}
			const authResult = await n8nOAuth2Auth(context, { realm: 'n8n MCP Server' });
			if (authResult === 'handled') {
				return { noWebhookResponse: true };
			}
			await context.establishTriggerIdentity(authResult.token, authResult.resource);
		} else {
			try {
				await validateWebhookAuthentication(context, 'authentication');
			} catch (error) {
				if (error instanceof WebhookAuthorizationError) {
					resp.writeHead(error.responseCode);
					resp.end(error.message);
					return { noWebhookResponse: true };
				}
				throw error;

View on GitHub (pinned to 5ac6606e81)