-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Summary
Using the demo calculator app generated by npx frontmcp create, I’m seeing inconsistent reconnect behavior with Streamable HTTP in the official MCP Inspector depending on whether I connect:
- directly to the FrontMCP server
- or through the Inspector proxy
The main differences are around session termination (DELETE) and what happens when clicking Connect / Reconnect afterward.
Setup
Generated demo app from:
npx frontmcp createUsing Streamable HTTP with the official MCP Inspector.
Observed behavior
1) Direct connection to FrontMCP
From the HAR:
initializesucceeds and returnsMCP-Session-Idnotifications/initializedreturns202- SSE listener
GETopens successfully logging/setLevelsucceedsDELETEreturns204- after that, Inspector sends another
initializewith the old deletedMCP-Session-Idstill attached - FrontMCP returns
404 Session not found - then Inspector retries with a fresh
initializewithout session ID - new session is created successfully
So in direct mode, it looks like the server deletes the session correctly, but the reconnect flow still tries once with the stale session ID before doing a clean init.
2) Proxy connection through MCP Inspector
From the HAR:
initializesucceeds and returns a session IDnotifications/initializedreturns202logging/setLevelsucceedsDELETEreturns500- despite that, reconnect then starts a fresh session and succeeds
So with proxy mode, the reconnect flow eventually works, but the DELETE request itself fails with 500.
Why this looks inconsistent
The same server/setup behaves differently depending on whether Inspector is using proxy mode or direct mode:
- direct mode:
DELETEreturns204, but reconnect briefly reuses the deleted session ID and gets404 - proxy mode:
DELETEreturns500, but reconnect still recovers
This makes it unclear whether:
- FrontMCP should handle session termination / reconnect differently for Inspector proxy traffic
- or the Inspector proxy/direct flows are not aligned in how they clear or reuse
MCP-Session-Id
Expected behavior
Based on the MCP Streamable HTTP spec:
- clients that no longer need a session should send
DELETEwithMCP-Session-Id - after session termination, requests with that session ID should return
404 - when a client receives
404for a terminated session, it should start a new session by sending a newinitializewithout a session ID
Because of that, I would expect one consistent behavior:
Expected option A
DELETEsucceeds consistently (for example204or405if unsupported)- reconnect clears the old session ID before sending a new
initialize
Expected option B
- if Inspector intentionally retries once with the old session, the behavior should still be consistent between direct and proxy paths, and proxy should not return
500forDELETE
Questions
- Is
DELETE 500through the Inspector proxy expected here, or is that a FrontMCP interop bug? - Should FrontMCP do anything special to make reconnect behavior more compatible with Inspector proxy/direct modes?
- Is there any case where FrontMCP expects a new
initializeto arrive with the previousMCP-Session-Idafter a successfulDELETE? - Should proxy and direct Inspector flows both clear session state before reconnecting?
Reproduction
-
create the demo app with
npx frontmcp create -
run the server with Streamable HTTP
-
connect from official MCP Inspector
-
test both:
- direct connection to the server
- connection through Inspector proxy
-
click disconnect / reconnect (or connect again after session termination)
-
observe
DELETE,initialize, andMCP-Session-Idbehavior in network logs
Attachments
I attached 2 HAR files:
frontmcp-reconnect-direct.harfrontmcp-reconnect-proxy.har
Spec reference
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports