Skip to content

Fix invalid initialize request handling#1709

Open
lntutor wants to merge 1 commit into
modelcontextprotocol:mainfrom
lntutor:fix/invalid-initialize-params-788
Open

Fix invalid initialize request handling#1709
lntutor wants to merge 1 commit into
modelcontextprotocol:mainfrom
lntutor:fix/invalid-initialize-params-788

Conversation

@lntutor

@lntutor lntutor commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • validate initialize request parameters before creating an HTTP session
  • return HTTP 400 with JSON-RPC InvalidParams and the original request ID
  • cover a missing clientInfo.version payload

Testing

  • dotnet build
  • ASP.NET Core test suite on net8.0, net9.0, and net10.0

Fixes #788

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.

Passing a malformed body throws a 500 error instead of 400. Very hard to figure out what is incorrect in the request being issued by the caller

1 participant