Describe the problem/error/question
Hello Team,
I am experiencing a critical bug with the MCP Client Tool node (@n8n/n8n-nodes-langchain) that prevents the AI Agent functionality from working. The error occurs during the “tool discovery” phase and when executing simple requests, despite verified connectivity and correct credentials.
I copy and paste the sumary after a 4/5 hours of debugging with Gemini:
Testing Results (Critical Proof)
I have performed thorough testing that confirms the root cause lies within the n8n node’s code, not the Go High Level (GHL) API or the infrastructure.
| Test Performed | Result | Conclusion |
|---|---|---|
External Connectivity (nc -vz) |
Connection... succeeded! |
The VPS can successfully reach the GHL server. Infrastructure is OK. |
| API Key in External Tool (Claude Desktop) | Works correctly. | The Subaccount API Key is valid and has the correct permissions. |
| API Key Type | Subaccount-level key is being used. | GHL authentication requirement is met. |
| Test with HTTP Request Node in n8n | Fails with a -32603 error or similar. |
The failure originates in how n8n encodes the outbound request (JSON-RPC). |
3. Log Evidence (Stack Trace)
The error consistently occurs when the AI Agent attempts to initialize the tool:
...
2025-10-07T18:25:39.416Z | error | MCP error -32603: Cannot convert undefined or null to object {"file":"error-reporter.js","function":"defaultReport"}
...
"messages":[],"message":"Error in sub-node MCP Client","stack":"NodeOperationError: Error in sub-node MCP Client\n at ExecuteContext.getInputConnectionData ...\n at getConnectedTools ...\n at getTools ...\n...
Final Diagnosis: The JSON-RPC message body sent by the McpClientTool node to https://services.leadconnectorhq.com/mcp/ during the schema discovery phase is malformed (it omits or initializes a mandatory field to null/undefined), causing the GHL server to return a data-integrity error.
I kindly request the development team review the JSON-RPC serialization code for this specific node.
What is the error message (if any)?
MCP error -32603: Cannot convert undefined or null to object
Please share your workflow
Share the output returned by the last node
[ERROR: Error in sub-node mcp_client]
Information on your n8n setup
- n8n version:1.115.0
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main):mail
- Running n8n via (Docker, npm, n8n cloud, desktop app): Self-hosted with Docker on VPS with Reverse Proxy (EasyPanel)
-
Operating system: