n8n-io/n8n · error · NodeOperationError
No MCP OAuth2 credential type found
Error message
No MCP OAuth2 credential type found
What it means
getCredentialType scans the node's configured credentials for one whose type is an MCP OAuth2 type (the only supported kind here) and finds none — the node is missing a (valid) MCP OAuth2 credential while an authenticated operation was attempted.
Solutions
- Attach an MCP OAuth2 credential to the node
- Re-select the credential in the node so it is stored under a supported type
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpRegistryClientTool/McpRegistryClientTool.node.ts:206 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/8399506fc8b2cb07.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpRegistryClientTool/McpRegistryClientTool.node.ts:206
mode: ctx.getNodeParameter('include', itemIndex) as McpToolIncludeMode,
includeTools: ctx.getNodeParameter('includeTools', itemIndex, []) as string[],
excludeTools: ctx.getNodeParameter('excludeTools', itemIndex, []) as string[],
},
};
}
function getCredentialType(
ctx: Pick<ILoadOptionsFunctions | ISupplyDataFunctions | IExecuteFunctions, 'getNode'>,
): McpAuthenticationOption {
const node = ctx.getNode();
const credentials = node.credentials ?? {};
const credentialType = Object.keys(credentials).find(
// for now we support only OAuth2
(credentialType) => isMcpOAuth2Authentication(credentialType),
);
if (!credentialType) {
throw new NodeOperationError(node, 'No MCP OAuth2 credential type found');
}
return credentialType;
}
View on GitHub (pinned to 5ac6606e81)