python-sdk icon indicating copy to clipboard operation
python-sdk copied to clipboard

Q: Duplicate client request IDs?

Open dongyuzheng opened this issue 1 year ago • 3 comments

Is my understanding correct?

Suppose we have 2 clients and 1 server.

Suppose both clients make their first requests.

Then we have 2 request ID 0s?

How would the server disambiguate which request is which?

Thanks

dongyuzheng avatar Mar 22 '25 00:03 dongyuzheng

[Edited]

I think this issue is related: https://github.com/modelcontextprotocol/python-sdk/issues/373 -- you need the client ID

samirbajaj avatar Mar 25 '25 16:03 samirbajaj

I may be wrong but I think we changed the logic of how request IDs are generated and these should be hashes, will check - if so this may no longer apply.

felixweinberger avatar Sep 19 '25 10:09 felixweinberger

Session IDs are being created with UUID4 now by default (see https://github.com/modelcontextprotocol/python-sdk/blob/c260e29a92c38f760985a57fadd64110d2a31d3d/src/mcp/server/streamable_http_manager.py#L223) so I believe this issue should no longer apply.

felixweinberger avatar Sep 23 '25 10:09 felixweinberger