MCP node error / Can't connect external MCP server

Describe the problem/error/question : I can’t know if it’s a n8n limitation or non anticipated usage of this node MCP Client, but I can’t figure it out.

I see al the docs about n8n MCP Client and understand that the one thing works is that create a workflow as a MCP Client which I can connect to different tools and then the MCP Client node connecter to the AI Agent node, will work, YES. But it’s not my need.

I really need to connect Tally MCP Server or any other external server to my AI Agent. And idk if it’s possible :confused:

What is the error message (if any)?

{
  "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,
    "itemIndex": 0,
    "time": "08/07/2025 16:27:30",
    "n8nVersion": "1.99.1 (Self Hosted)",
    "binaryDataMode": "default",
    "stackTrace": [
      "NodeOperationError: Error in sub-node MCP Client",
      "    at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/utils/get-input-connection-data.ts:207:11)",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at ExecuteContext.getInputConnectionData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/node-execution-context/execute-context.ts:160:10)",
      "    at getConnectedTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_90fd06b925ebd5b6cf3e2451e17cc4b6/node_modules/@n8n/n8n-nodes-langchain/utils/helpers.ts:195:5)",
      "    at getTools (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_90fd06b925ebd5b6cf3e2451e17cc4b6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/common.ts:303:17)",
      "    at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_90fd06b925ebd5b6cf3e2451e17cc4b6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:40:16)",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_90fd06b925ebd5b6cf3e2451e17cc4b6/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:168:10)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1187:9)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1536:27",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2100:11"
    ]
  }
}

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.99.1
  • Database (default: SQLite): PostgreSQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): heroku n8n app
  • Operating system:

Hi @Pierre_R1

According to your error, your n8n instance (v1.99.1, self-hosted) is failing at a node called “MCP Client”, specifically from the @n8n/n8n-nodes-langchain.mcpClientTool package. The error is:

"Could not connect to your MCP server"

The stack trace points to a LangChain-based agent node, and the failure occurs when it tries to connect tools (in this case, the MCP Client) within the agent.


What This Suggests

This is not a basic network connection issue alone — the node might:

  • Be misconfigured (e.g., wrong host, missing auth),
  • Be not receiving input as expected from a previous node,
  • Or, the tool loading logic in the LangChain agent is failing due to a missing or invalid configuration.

What You Should Check

1. MCP Client Configuration

Open the MCP Client node and verify:

  • Host/IP Address of your MCP Server is correct.
  • Port is accessible (try curl, telnet, or ping from your n8n server).
  • Authentication details, if required, are filled in.

If the server is on a private network, make sure your n8n server can reach it.

2. Node Inputs

getInputConnectionData

implies that the node is trying to access input data or a connection from an earlier node, but failing. Make sure:

  • The MCP Client node is connected properly to a previous node that provides input (if required).
  • If used inside a LangChain agent, ensure the tool is correctly initialized with all required parameters.

3. LangChain Agent Node (ToolsAgent or AgentV2)

Since this is part of a ToolsAgent or AgentV2, make sure:

  • The agent node includes the MCP Client in its tools list.
  • The MCP Client is correctly configured before the agent tries to use it.

4. Firewall/Network Isolation

Ensure that:

  • No firewalls (e.g., UFW, iptables, security groups) are blocking outbound requests from n8n.
  • If inside Docker, MCP host is accessible from the container:
docker exec -it <n8n-container> ping <mcp-host>

5. Test Standalone MCP Client Node

Try dragging the MCP Client node into a simple test workflow:

  • Trigger → MCP Client (with some sample input)
  • See if it fails outside the LangChain agent. This helps isolate whether the issue is the MCP client or LangChain agent config.

Hi there, I already check all of that and nothing changes. Ty for the help !

Hello there, have you tried to update the n8n?
Latest n8n have some changes with MCP :smiley:

Hi there, nope, this isn’t the solution and I think the MCP server I want to use isn’t SSE compatible.

ahhh I got it. Currently, official MCP Client tool only support with SSE. For your case, you can try with mcp community node that I found from github.
You can see it here.
It has tutorial for installing the community node too, lemme know if it helps.