feat(MCP Server Trigger Node): Add MCP Server Trigger node to expose tools to MCP clients (#14403)

Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
jeanpaul
2025-04-09 14:45:24 +02:00
committed by GitHub
parent a495d81c13
commit 8360283c6f
36 changed files with 942 additions and 105 deletions

View File

@@ -208,6 +208,20 @@ export async function validateWebhookAuthentication(
// Provided authentication data is wrong
throw new WebhookAuthorizationError(403);
}
} else if (authentication === 'bearerAuth') {
let expectedAuth: ICredentialDataDecryptedObject | undefined;
try {
expectedAuth = await ctx.getCredentials<ICredentialDataDecryptedObject>('httpBearerAuth');
} catch {}
const expectedToken = expectedAuth?.token as string;
if (!expectedToken) {
throw new WebhookAuthorizationError(500, 'No authentication data defined on node!');
}
if (headers.authorization !== `Bearer ${expectedToken}`) {
throw new WebhookAuthorizationError(403);
}
} else if (authentication === 'headerAuth') {
// Special header with value is needed to call webhook
let expectedAuth: ICredentialDataDecryptedObject | undefined;