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

@@ -679,20 +679,26 @@ export function useWorkflowHelpers(options: { router: ReturnType<typeof useRoute
function getWebhookUrl(
webhookData: IWebhookDescription,
node: INode,
showUrlFor?: string,
showUrlFor: 'test' | 'production',
): string {
const { isForm, restartWebhook } = webhookData;
const { nodeType, restartWebhook } = webhookData;
if (restartWebhook === true) {
return isForm ? '$execution.resumeFormUrl' : '$execution.resumeUrl';
}
let baseUrl;
if (showUrlFor === 'test') {
baseUrl = isForm ? rootStore.formTestUrl : rootStore.webhookTestUrl;
} else {
baseUrl = isForm ? rootStore.formUrl : rootStore.webhookUrl;
return nodeType === 'form' ? '$execution.resumeFormUrl' : '$execution.resumeUrl';
}
const baseUrls = {
test: {
form: rootStore.formTestUrl,
mcp: rootStore.mcpTestUrl,
webhook: rootStore.webhookTestUrl,
},
production: {
form: rootStore.formUrl,
mcp: rootStore.mcpUrl,
webhook: rootStore.webhookUrl,
},
} as const;
const baseUrl = baseUrls[showUrlFor][nodeType ?? 'webhook'];
const workflowId = workflowsStore.workflowId;
const path = getWebhookExpressionValue(webhookData, 'path', true, node.name) ?? '';
const isFullPath =