-
|
Hi all, I was able to easily implement the new MCP streamable server by integrating my FastAPI app with FastMCP, manually exposing my tools like this:
It works very well locally. However, I'd like to use it within an AWS Lambda setup, which has the aws_lambda_adapter in front of the Lambda function URL. The issue arises when the first GET request arrives—it keeps the connection open using text/event-stream. Then, when a second request comes in, it doesn't find the session ID because a new Lambda instance is started. In some cases, a session isn’t even needed—for example, when exposing APIs as tools. Could it be a viable solution to allow passing the event_store during the creation of the http_app to allow the new request to search for a stored session id? Also, is there a way to avoid keeping the connection open and make it fully stateless? Or is that not possible due to protocol requirements? Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Checking well the code I found stateless_http setting, going to test it |
Beta Was this translation helpful? Give feedback.
Checking well the code I found stateless_http setting, going to test it