-
Notifications
You must be signed in to change notification settings - Fork 310
Open
Labels
T-bugBug fixes and error correctionsBug fixes and error corrections
Description
Following up on a bug tracked on the rmcp-actix-web crate:
https://gitlab.com/lx-industries/rmcp-actix-web/-/issues/15#note_2699030396
This bug also affects the offficial axum implementation. So I'm creating this issue to make sure we agree on the expected behavior.
Describe the bug
The session is automatically destroyed when the SSE streaming connection ends in the HTTP streamable implementation.
- Session Creation: Client POSTs → Session ID returned ✅
- SSE Connection: Client GETs SSE stream ✅
- Service Task: Spawned task calls
service.waiting().await
- Critical Issue: When SSE connection drops,
service.waiting()
completes - Auto Cleanup: Session gets automatically destroyed 💥
- Failure: Next request with same session ID → 401: Session not found
To Reproduce
Steps to reproduce the behavior:
- run the
composition_streamable_http_example
example - open MCP inspector
- call "List Tools" twice or call List Tools then the
sum
tool
Expected behavior
Calling "List Tools" twice or calling multiple tools should work.
Logs
Not available yet. Will add ASAP.
Additional context
stateful_mode = false
solves the problem. But many (most?) tools - such as sum
- are stateful.
Metadata
Metadata
Assignees
Labels
T-bugBug fixes and error correctionsBug fixes and error corrections