Skip to content

simple-streamablehttp-stateless example will not return data if id=0 #1218

@howardjohn

Description

@howardjohn

Initial Checks

Description

I ran the simple-streamablehttp-stateless example, then connected via curl.

If I send:

curl localhost:3000/mcp/ --json '{"jsonrpc":"2.0","id":0,"method":"tools/call","params":{"_meta":{"progressToken":0},"name":"start-notification-stream","arguments":{"interval":0.1,"count":5,"caller":""}}}' -H "Accept: application/json, text/event-stream"

it does NOT work; there are no notifications sent.

If I send (changing only the id):

curl localhost:3000/mcp/ --json '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"_meta":{"progressToken":0},"name":"start-notification-stream","arguments":{"interval":0.1,"count":5,"caller":""}}}' -H "Accept: application/json, text/event-stream"

I do get notifications.

If I run the same example in the typescript SDK, it works with both id.

Log:

Sending notification 1/5 from caller:
2025-07-30 13:14:04,335 - root - DEBUG - Request stream _GET_stream not found
                                for message. Still processing message as the client
                                might reconnect and replay.
Sending notification 2/5 from caller:
2025-07-30 13:14:04,435 - root - DEBUG - Request stream _GET_stream not found
                                for message. Still processing message as the client
                                might reconnect and replay.
Sending notification 3/5 from caller:
2025-07-30 13:14:04,536 - root - DEBUG - Request stream _GET_stream not found
                                for message. Still processing message as the client
                                might reconnect and replay.
Sending notification 4/5 from caller:
2025-07-30 13:14:04,637 - root - DEBUG - Request stream _GET_stream not found
                                for message. Still processing message as the client
                                might reconnect and replay.
Sending notification 5/5 from caller:
2025-07-30 13:14:04,737 - root - DEBUG - Request stream _GET_stream not found
                                for message. Still processing message as the client
                                might reconnect and replay.

Example Code

Python & MCP Python SDK

latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featurebugSomething isn't workingready for workEnough information for someone to start working on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions