Describe the problem/error/question
I’m experiencing an issue with the MCP (Model Context Protocol) server functionality in my n8n installation. I’ve created a simple MCP server with a calculator tool, but it doesn’t work at all - it’s as if the MCP functionality isn’t present. When attempting to run a workflow that uses the MCP Client node, I receive a connection error.
What is the error message (if any)?
When running the workflow in n8n: Error in sub-node ‘MCP Client’: Could not connect to your MCP server
Please share your workflow
{
"nodes": [
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolCalculator",
"typeVersion": 1,
"position": [
440,
180
],
"id": "e6015157-ddfa-4f48-96f7-d686e62642d9",
"name": "Calculator"
},
{
"parameters": {
"path": "te"
},
"type": "@n8n/n8n-nodes-langchain.mcpTrigger",
"typeVersion": 1,
"position": [
220,
-80
],
"id": "cfd1b8d1-a73e-4cef-8d0b-27a16bb7c253",
"name": "MCP Server Trigger",
"webhookId": "dcdd5a88-481d-4636-baa0-7244b4e4723f"
}
],
"connections": {
"Calculator": {
"ai_tool": [
[
{
"node": "MCP Server Trigger",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "91cb9c1aae5938057abecf7c7c74f18cc4299fba77e8af33cac6f7e368af36a9"
}
}
{
"nodes": [
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"typeVersion": 1.1,
"position": [
-400,
-140
],
"id": "c0b15dff-b22e-4234-a04a-0e25a3bed54a",
"name": "When chat message received",
"webhookId": "412bbb4c-3860-4e9b-8fe0-b06bc76ff907"
},
{
"parameters": {
"options": {
"systemMessage": "du bist ein assistent namens Ulf und antwortest auf fragen des users. nutze den dir zur verfügung stehenden Calculator tool für mathematische fragen."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 1.9,
"position": [
-160,
-140
],
"id": "ed1832d6-876f-4a45-babe-699ce87d3e55",
"name": "AI Agent"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-260,
80
],
"id": "2975a421-9fc9-4de7-a7b1-ac5724237034",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "hc0M7qFJzj4HBatp",
"name": "OpenAi account n8n projekt"
}
}
},
{
"parameters": {
"sseEndpoint": "https://my.automationsdr.com/mcp/te/sse"
},
"type": "@n8n/n8n-nodes-langchain.mcpClientTool",
"typeVersion": 1,
"position": [
120,
100
],
"id": "6be5e937-9bb1-493d-beaf-887b29964085",
"name": "MCP Client"
}
],
"connections": {
"When chat message received": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"MCP Client": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "91cb9c1aae5938057abecf7c7c74f18cc4299fba77e8af33cac6f7e368af36a9"
}
}
Share the output returned by the last node
The workflow fails with the error message: “Error in sub-node ‘MCP Client’: Could not connect to your MCP server”
Information on your n8n setup
- n8n version: 1.92.2
- Database: PostgreSQL
- n8n EXECUTIONS_PROCESS setting: regular
- Running n8n via: Docker (self-hosted) via Coolify on Hetzner Server
- Operating system: Linux (Hetzner Cloud)
Additional details:
- License: Enterprise (production)
- Node.js version: 20.19.0
- Concurrency: -1
- Storage:
- success: all
- error: all
- progress: false
- manual: true
- binaryMode: memory
- Pruning:
- enabled: true
- maxAge: 336 hours
- maxCount: 10000 executions
- Client:
- userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/136.0.0.0 safari/537.36
- isTouchDevice: false
I’ve tried creating a basic MCP server in n8n, but the MCP functionality appears to be non-existent or non-functional. The MCP Client node consistently fails to connect to the server with a generic “Could not connect to your MCP server” error. I’ve tried restarting and redeploying the server, but the issue persists.
Has anyone experienced similar issues with MCP functionality in n8n? Are there specific configurations or prerequisites needed for MCP to work properly in an n8n Enterprise installation? Any insights or troubleshooting steps would be greatly appreciated.