Describe the problem/error/question
I have connected an MCP server to an AI agent I am using. The MCP server client works great in Claude, ChatGPT, and other services, but n8n seems to be very inconsistent on its connection. I routinely get the following error:
Streamable HTTP error: Error POSTing to endpoint: {“error”:{“code”:-32001,“message”:“Session not found”},“id”:“”,“jsonrpc”:“2.0”}
Anyone have suggestions on how to work around this or is it just not a reliable node in n8n?
What is the error message (if any)?
Streamable HTTP error: Error POSTing to endpoint: {“error”:{“code”:-32001,“message”:“Session not found”},“id”:“”,“jsonrpc”:“2.0”}
Please share your workflow
Information on your n8n setup
- n8n version: 2.15.0 (Cloud)
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system:
1 Like
Hi @CurtisB Welcome! Have you tried using a HTTP request to interact with your MCP server? I dont know what MCP you are using cause i also use MCP servers and i never faced issues like that so i would recommend trying the HTTP request node.
Im using an MCP server service called “StackJack”. I havent tried the HTTP request node. I’ve jsut been using the MCP client tool. I’d say the MCP client tool works 25% of the time.
1 Like
@CurtisB on a production scale that 25% is very bad, i think you should switch to HTTP node and tweak your flow to work with that HTTP request.
I appreciate the response and suggestions. So to confirm, you do not use the MCP client node for AI agents and just use the HTTP Request node instead? Do you also have inconsistent results from the MCP client node?
I do
It depends. Did you define the MCP tool schema in your prompt?
yeah we ran into this before — mcp client sometimes doesnt recover well from session timeouts. either add retry logic in the http request node, or switch to http request directly like @Anshul_Namdev said. the http approach is way more reliable in production. whats the mcp server version youre using?
the “Session not found” is a known issue with stateful MCP servers and n8n specifically — the MCP client node doesnt persist the session token between requests the way Claude desktop or ChatGPT do, so if the server expects the same session across multiple tool calls it breaks.
two things that help: first check if your MCP server supports stateless mode (some have a flag for it). if not, the SSE transport is generally more stable in n8n than Streamable HTTP for this exact reason — try switching the connection type in the MCP Client Tool node settings.
yeah that’s a great breakdown — the session persistence gap is exactly why it works in claude/chatgpt but not n8n. stateless mode is definitely the cleanest fix if the server supports it
This is a known session management issue with the MCP Client Tool node. The ‘-32001 Session not found’ error typically means the HTTP session has collapsed between workflow steps — the node doesn’t handle session recovery automatically.
A few approaches that tend to work better in production:
- Add retry logic around the MCP call in your workflow
- Switch to the HTTP Request node with direct JSON-RPC handling — you control the session lifecycle, much more reliable
- If you’re behind a reverse proxy, make sure it’s not resetting connections between calls
The stateful session design in the MCP Client Tool can be fragile once you’re running workflows at any volume. HTTP Request + manual JSON-RPC gives you full control. What MCP server are you connecting to?