fastmcp
fastmcp copied to clipboard
Creating jsession id
Enhancement Description
With current endpoint in HTTP streamable protocol -
-
We hit /mcp endpoint, which creates session id and performs a temporary redirect to /mcp/ for actual POST API endpoint. This does not seem very production grade setup
-
If we hit directly /mcp/, then there is no way to find session id
Use Case
Hosting session id creation via API for production application hosting
Proposed Implementation
We can abstract session id creation as an API payload
For example -
For listing tools we have - "method":"tools/list"
For calling tool, we have - "method":"tools/call"
Similarly we can create "method":"create session"
which returns session id