mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
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:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user