Repository navigation
fix(examples): support draft protocol in SDK-backed fixtures - #596
Open
aniket-r2Dev2 wants to merge 1 commit into
Open
aniket-r2Dev2 wants to merge 1 commit into
aniket-r2Dev2 wants to merge 1 commit into
Conversation
aniket-r2Dev2
marked this pull request as ready for review
November 22, 2026 05:56
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #568
Summary
The published v1 MCP TypeScript SDK correctly rejects the in-progress
2026-07-28draft protocol version. Three conformance example servers relied on that transport, so they could not respond to draftserver/discoverandtools/listrequests.This PR extracts the existing pre-transport draft validation and discovery logic into a shared helper and reuses it in the example fixtures, while keeping their legacy SDK transport paths.
Changes
examples/servers/typescript/helpers/draft-protocol.tsfor draft request classification, header/_meta checks, discovery, result envelopes and method-not-found responses.everything-server.ts, replacing its duplicated draft preflight and discovery handler.server/discoverandtools/listin the three negative fixtures:invalid-tool-names.ts,no-dns-rebinding-protection.tsandsep-2106-stripped-schema.ts.Validation
Locally verified:
Not yet validated with the actual repository dependencies: container network access prevents cloning the complete repository and downloading npm packages. The smoke checks use stubs and do not establish an actual SDK integration pass.
npm cinpm test -- examples/servers/typescript/helpers/draft-protocol.test.ts src/scenarios/server/negative.test.tsnpm run typechecknpm run lintnpm run buildnpm testOpening as a draft until full CI checks are green and any integration failures are addressed.
AI assistance
AI assistance was used to prepare this change, analyze upstream code, draft tests, and check the patch. The GitHub diff and available isolated tests were inspected before publishing.