modelcontextprotocol / modelcontextprotocol/typescript-sdk

Client received "no session ID or not initialization request" when server restart

Open
#1,476 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug fix proposed P2 ready for work
Dominant language
TypeScript
Stars
13.4k
Forks
2.2k
Avg merge
3d 15h
Merged PRs (30d)
4

Description

How can the server request the client to re-initialize when server restart?
The client is currently experiencing a recurring server error from "no session ID or not initialization request".

https://github.com/modelcontextprotocol/typescript-sdk/blob/faeb03ec17e96f6f0a343b2aad80e32a098655f4/examples/server/src/simpleStreamableHttp.ts#L589

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/server/src/simpleStreamableHttp.ts at line 589 and trace how the server handles requests after a restart and how the client initializes its session. Reproduce the restart scenario and inspect the related client/server initialization flow. Done means the expected re-initialization behavior is defined and the recurring “no session ID or not initialization request” error is addressed or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.