From e5d4aa98368f480e6c4a73a57ae8dcdff1f73eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Braulio=20Gonz=C3=A1lez=20Valido?= Date: Fri, 5 Jun 2026 08:33:13 +0100 Subject: [PATCH] fix(ai-builder): Get the agent-with-notion-mcp eval case running (no-changelog) (#31788) Co-authored-by: Claude Opus 4.8 (1M context) --- .../data/workflows/agent-with-notion-mcp.json | 9 +++++++-- .../src/modules/instance-ai/eval/workflow-analysis.ts | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/@n8n/instance-ai/evaluations/data/workflows/agent-with-notion-mcp.json b/packages/@n8n/instance-ai/evaluations/data/workflows/agent-with-notion-mcp.json index 456ea970662..22df36f10cc 100644 --- a/packages/@n8n/instance-ai/evaluations/data/workflows/agent-with-notion-mcp.json +++ b/packages/@n8n/instance-ai/evaluations/data/workflows/agent-with-notion-mcp.json @@ -1,8 +1,13 @@ { - "prompt": "Build a workflow with a chat-triggered AI agent that can search my Notion workspace to answer questions about ongoing projects. The agent should use the Notion connection from n8n's built-in service connections (the one optimized for agent tool use), not the standard Notion action node. Configure all nodes as completely as possible and don't ask me for credentials, I'll set them up later.", + "conversation": [ + { + "role": "user", + "text": "Build a workflow with a chat-triggered AI agent that can search my Notion workspace to answer questions about ongoing projects. The agent should use the Notion connection from n8n's built-in service connections (the one optimized for agent tool use), not the standard Notion action node. Configure all nodes as completely as possible and don't ask me for credentials, I'll set them up later." + } + ], "complexity": "medium", "tags": ["build", "agent", "ai-tool", "mcp-registry", "notion"], - "scenarios": [ + "executionScenarios": [ { "name": "happy-path", "description": "User asks about a project; agent uses the Notion MCP registry node to find the answer", diff --git a/packages/cli/src/modules/instance-ai/eval/workflow-analysis.ts b/packages/cli/src/modules/instance-ai/eval/workflow-analysis.ts index 33f7dcc87aa..5345d4b5c8e 100644 --- a/packages/cli/src/modules/instance-ai/eval/workflow-analysis.ts +++ b/packages/cli/src/modules/instance-ai/eval/workflow-analysis.ts @@ -69,6 +69,11 @@ function isVendorLlmSubNode(nodeType: string): boolean { return nodeType.startsWith('@n8n/n8n-nodes-langchain.lm'); } +/** MCP registry nodes talk via the MCP SDK's own transport, not n8n's HTTP helper — the mock can't reach them, so their root must stay pinned. */ +function isMcpRegistryNode(nodeType: string): boolean { + return nodeType.startsWith('@n8n/mcp-registry.'); +} + /** Non-empty `options.baseURL` on the LangChain OpenAI node beats credentials.url — credential rewrite isn't enough. */ function hasUnsafeBaseUrlOverride(node: INode): boolean { if (node.type === '@n8n/n8n-nodes-langchain.lmChatOpenAi') { @@ -495,6 +500,7 @@ function categorizeSubNodeIncompatibility( sharedSupportedSubNodes: Set, ): AutoPinReason | null { if (PROTOCOL_BINARY_SUB_NODE_TYPES.has(sourceNode.type)) return 'protocol_binary'; + if (isMcpRegistryNode(sourceNode.type)) return 'protocol_binary'; if (SUPPORTED_VENDOR_LLM_SUB_NODE_TYPES.has(sourceNode.type)) { if (sharedSupportedSubNodes.has(sourceNode.name)) return 'shared_vendor_llm_subnode'; return hasUnsafeBaseUrlOverride(sourceNode) ? 'unsafe_baseurl_override' : null;