Skip to content

fix: report pre-init metadata errors - #1160

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix-1157-preinit-meta-error
Open

fix: report pre-init metadata errors#1160
DaleSeo wants to merge 1 commit into
mainfrom
fix-1157-preinit-meta-error

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Aug 9, 2026

Copy link
Copy Markdown
Member

Fixes #1157

Motivation and Context

Previously, a malformed 2026 inline-lifecycle opener caused serve() to fail before sending any bytes to the client. As a result, stdio clients could wait without receiving a diagnostic, even though the same malformed metadata was reported as invalid params after negotiation. The server now reports any missing or malformed _meta keys with -32602 before returning the existing initialization error.

How Has This Been Tested?

Add tests.

Breaking Changes

None.

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

@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes T-service Service layer changes labels Aug 9, 2026
@DaleSeo
DaleSeo marked this pull request as ready for review August 9, 2026 18:59
@DaleSeo
DaleSeo requested a review from a team as a code owner August 9, 2026 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-service Service layer changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

stdio server: malformed-_meta 2026 request as first message gets no error response (connection wedges silently)

1 participant