n8n-io/n8n · error
No sessionId provided
Error message
No sessionId provided
What it means
Fires in McpServer.handleDeleteRequest when an MCP client sends a DELETE request without a session id, so the server cannot identify which streamable-HTTP session to terminate. It is a transport-level guard: the handler rejects the request (responding with an error instead of closing a session) because the MCP streamable HTTP protocol requires the mcp-session-id header/value on deletion requests.
Solutions
- Send the mcp-session-id returned by the initialize response with the DELETE
- Use the session termination flow of a compliant MCP client
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:260 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/654e158cc297bfd8.
Report an issue: GitHub.
Appendix: source
Thrown at packages/@n8n/nodes-langchain/nodes/mcp/McpTrigger/McpServer.ts:260
resp.flush?.();
// A not-ready gate makes the CallTool handler short-circuit (returning the
// actionable response over the transport instead of executing). Report it as
// not a tool call so the node does not also trigger a workflow execution.
const wasGated = !!gateResult && !gateResult.readyToExecute;
return {
wasToolCall: MessageParser.isToolCall(rawBody) && !wasGated,
toolCallInfo,
messageId,
};
}
async handleDeleteRequest(req: express.Request, resp: CompressionResponse): Promise<void> {
const sessionId = this.getSessionId(req);
if (!sessionId) {
resp.status(400).send('No sessionId provided');
return;
}
const transport = this.sessionManager.getTransport(sessionId);
if (transport) {
this.pendingCallsManager.cleanupBySessionId(sessionId);
if (transport instanceof StreamableHttpTransport) {
await transport.handleRequest(req, resp);
return;
}
resp.status(405).send('Method Not Allowed');
return;
}
resp.status(404).send('Session not found');
}View on GitHub (pinned to 5ac6606e81)