Hello,
I’m facing a blocking issue when using an AI Agent with an MCP tool inside a workflow triggered by a Webhook.
Behavior depends entirely on the webhook response mode:
-
Response Mode = Respond Immediately
→ The webhook responds instantly and the AI Agent works correctly.
→ The agent executes normally and returns a result in ~2 seconds. -
Response Mode = Using Respond to Webhook node
OR
Response Mode = When last node finishes→ The workflow star but never finish.
→ The AI Agent start execution but no tool call, no logs, no progress.
→ The execution stays “running” for several minutes until manually stopped.
Important detail:
If I desactivate the MCP Client Tool node, the workflow works normally in synchronous mode.
The issue only appears when AI Agent + MCP + non-immediate response are combined.
So this looks like a deadlock or blocking behavior between:
-
webhook synchronous response handling
-
AI Agent
-
MCP connection
Error message
No error message.
The execution just hangs indefinitely.
Here are the logs of MCP Client Tool node :
{
"errorMessage": "Error in sub-node ‘MCP Client’",
"errorDescription": "Could not connect to your MCP server",
"errorDetails": {},
"n8nDetails": {
"nodeName": "MCP Client",
"nodeType": "@n8n/n8n-nodes-langchain.mcpClientTool",
"nodeVersion": 1.2,
"itemIndex": 0,
"time": "22/01/2026 17:27:29",
"n8nVersion": "2.4.4 (Cloud)",
"binaryDataMode": "filesystem",
"stackTrace": [
"NodeOperationError: Error in sub-node MCP Client",
" at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/get-input-connection-data.ts:376:11)",
" at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/node-execution-context/execute-context.ts:180:10)",
" at getConnectedTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_5e964642f84eebe7ab5946b9e3444692/node_modules/@n8n/n8n-nodes-langchain/utils/helpers.ts:209:30)",
" at getTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_5e964642f84eebe7ab5946b9e3444692/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/common.ts:395:17)",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_5e964642f84eebe7ab5946b9e3444692/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:252:18",
" at async Promise.allSettled (index 0)",
" at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_5e964642f84eebe7ab5946b9e3444692/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:326:24)",
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_5e964642f84eebe7ab5946b9e3444692/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:130:10)",
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8)",
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11)",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2297:11"
]
}
}
Step to reproduce
Minimal reproducible workflow:
-
Webhook Trigger
-
Response Mode:
-
Using Respond to Webhook -
When last node finishes -
Respond Immediately (only mode that works)
-
-
-
AI Agent
- Configured with an MCP tool
-
Respond to Webhook (or last node output)
With MCP enabled, the agent never starts unless Respond Immediately is used.
Information on n8n setup
- n8n version: 2.4.4
- Database (default: SQLite): -
- n8n EXECUTIONS_PROCESS setting (default: own, main): -
- Running n8n via (Docker, npm, n8n cloud, desktop app): cloud
- Operating system: -