Skip to content

Conversation

@Liooo
Copy link

@Liooo Liooo commented Dec 10, 2025

Deny undefined for json-rpc error response id, make it spec compliant.

https://www.jsonrpc.org/specification#response_object

id
This member is REQUIRED.
It MUST be the same as the value of the id member in the Request Object.
If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.

Fix for the change in: #1242.
Related: modelcontextprotocol/modelcontextprotocol#1939

How Has This Been Tested?

unit tests, type checking

Breaking Changes

undefined won't be allowed as id

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@Liooo Liooo requested a review from a team as a code owner December 10, 2025 14:09
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 10, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1281

commit: df0dc31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant