Repository navigation
Route and refuse MCP 2026-07-28 requests as the specification requires - #54
Open
JanGoebelsBot wants to merge 4 commits into
Open
JanGoebelsBot wants to merge 4 commits into
JanGoebelsBot wants to merge 4 commits into
Conversation
Measured with the official conformance suite (@modelcontextprotocol/conformance, --requirements 2026-07-28): - A request was treated as MCP 2026-07-28 only when params._meta carried the protocol version. A request with a 2026-07-28 MCP-Protocol-Version header but without _meta was handled as legacy and answered -32601 with HTTP 200. Read MCP Request Metadata.vi now also decides by that header (a modern version only, so legacy clients are unaffected) and by the method server/discover. Check Modern MCP Request.vi refuses a missing _meta or protocol version first, with HTTP 400 and -32602, as the specification requires. - initialize is not a method of the 2026-07-28 era: a modern initialize is answered 404 with -32601. A legacy initialize works as before. - Refusals made before the body is handled (unsupported MCP-Protocol-Version 400/-32022, Origin 403, 401, 405) had id null. Process HTTP Request.vi passes them through Restore Request ID.vi, so they carry the request id. - A 2026-07-28 resources/read of an unknown resource (-32602) now carries data.uri (Remap Resource Not Found.vi, Complete Handler Result.vi, Complete Modern MCP Result.vi). - The IG HTTP Server closes the connection after every response without saying so, which made HTTP/1.1 clients reuse a closed socket (ECONNRESET in the conformance suite). Every response now carries Connection: close. New inputs: protocol version header on Read MCP Request Metadata.vi, uri on Remap Resource Not Found.vi and Complete Handler Result.vi. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The era is now also decided by the MCP-Protocol-Version header and by server/discover; missing _meta fields, removed methods such as initialize, request ids on refusals and Connection: close are described. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New tests, wired into Test_MCP_Server.vi after Test 65: - Test 66 (test modern missing meta.vi): a 2026-07-28 request without _meta or without its protocol version is refused with 400 and -32602 and its id, also when only the header marks it as 2026-07-28. - Test 67 (test modern initialize.vi): a 2026-07-28 initialize gets 404 and -32601; a legacy initialize still works. - Test 68 (test unsupported version id.vi): -32022 for an unsupported MCP-Protocol-Version carries the request id, number or string. - Test 69 (test resource not found uri.vi): an unknown resource in the 2026-07-28 era gives -32602 with data.uri, and the answer says Connection: close. Tests 61 and 62 change on purpose: the 403 and 401 refusals now carry the request id (611) instead of null, as MCP requires for every error answer. Against the toolkit before this change Test 61 fails on exactly that assertion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
TestsSuite not run on the merge commit itself; the same VIs passed on #53 (243 assertions) and on #55 (282). VI changesVIs: 11 modified, 4 added, 0 deleted 5 more modified VIsAdded VIs (4)
Produced locally (the pull request workflow has not run: the self-hosted runner is offline). VI comparison: LabVIEW 2026 32-bit. Report for commit 9b34dd0. |
JanGoebelsBot
marked this pull request as ready for review
November 26, 2026 11:20
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Update: base branch mergedNew commit: 9b34dd0, a merge of the review fixes of #53 (
Tests: Suite not run on the merge commit itself; the same VIs passed on #53 (243 assertions) and on #55 (282). Still open: nothing on this pull request. |
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.















Summary
The official MCP conformance suite (
@modelcontextprotocol/conformance,--requirements 2026-07-28) found the server routing and refusing some MCP 2026-07-28 requests wrongly. A request marked as 2026-07-28 only by itsMCP-Protocol-Versionheader, but missing_meta, was handled as legacy; a 2026-07-28initializewas answered; early refusals had no request id; and HTTP/1.1 clients got ECONNRESET because the server closed every connection without saying so._meta(or_metawithout protocolVersion)200,-32601400,-32602, request idinitialize200, legacy result404,-32601initialize200200(unchanged)MCP-Protocol-Version(also 401/403/405)"id": nullresources/readof an unknown uri-32602-32602withdata.uriConnectionheader, server closes the socketConnection: closeChanges
Read MCP Request Metadata.vi— modified (regenerated, small generated VI). A request is 2026-07-28 whenparams._metahas the protocol version, or theMCP-Protocol-Versionheader is a 2026-07-28 version, or the method isserver/discover. Theinitializeexception is gone. New inputprotocol version header.Check Modern MCP Request.vi— modified (regenerated). New first check: missing_meta/ protocol version →400,-32602. A 2026-07-28initializenow reaches the existing "method of no era" check →404,-32601.Handle MCP Request.vi,Prepare Request Dispatch.vi— modified in place: pass the header to Read MCP Request Metadata.vi.Process HTTP Request.vi— modified in place: refusals made before the body is handled go throughRestore Request ID.vi(request id instead of null);Set Header.viaddsConnection: closeto every response, the SSE response included.Remap Resource Not Found.vi,Complete Handler Result.vi— modified (regenerated): new inputuri; the-32602for an unknown resource carriesdata: {"uri": ...}.Complete Modern MCP Result.vi— modified in place: passes the uri.test modern missing meta.vi,test modern initialize.vi,test unsupported version id.vi,test resource not found uri.vi), wired intoTest_MCP_Server.vi.test access allowed clients.vi(Test 61) andtest access bearer token.vi(Test 62) asserted that the 403 and 401 bodies haveid: null; they now expect the request id (611). MCP 2026-07-28 requires every error answer to carry the request id.docs/technical-details.md— era rule, missing_meta, removed methods, ids on refusals,Connection: close.Code summary
Read MCP Request Metadata.viserver/discover;initializeis no exception any moreProcess HTTP Request.viConnection: closeCheck Modern MCP Request.vi_metaor protocol version gives400,-32602Handle MCP Request.vi,Prepare Request Dispatch.viMCP-Protocol-Versionheader to Read MCP Request Metadata.viRemap Resource Not Found.vi,Complete Handler Result.vi,Complete Modern MCP Result.vi-32602for an unknown resource carriesdata.uriTest_MCP_Server.viRead MCP Request Metadata.vi— modifiedDecides per request which MCP era it belongs to.
MCP-Protocol-Versionheader is looked up in the modern versions ofSupported Protocol Versions.vi. A legacy version in the header never makes a request modern, so legacy clients are unaffected._metaprotocol version OR modern header OR methodserver/discover. The old "unless the method is initialize" is gone, so a 2026-07-28initializereaches the modern checks and is refused with 404.server/discoverfeeds that OR, so aserver/discoverwithout_metais refused with -32602 instead of being answered "method not found" by the legacy path.Process HTTP Request.vi— modifiedAnswers one HTTP request; edited in place, the layout is otherwise untouched.
Restore Request ID.vigets the refusal payload (401, 403, 405, unsupported version 400) together with the request body, so the error carries the id the client sent instead of null.Set Header.viwritesConnection: closeon the response that goes toSet Response.vi, the SSE response included. The IG HTTP Server closes the socket after every response; without the header HTTP/1.1 clients reused it and got ECONNRESET.Other VIs
Check Modern MCP Request.vi: one more entry at the top of its table of refusals (see the detailed report; the diagram is table-driven).Remap Resource Not Found.vi: setserror.datato the uri when it turns -32002 into -32602;Complete Handler Result.viandComplete Modern MCP Result.vipass the uri to it.Test VIs
test modern missing meta.vi(66),test modern initialize.vi(67),test unsupported version id.vi(68),test resource not found uri.vi(69): one request shape each, as listed under Changes.test access allowed clients.vi(61),test access bearer token.vi(62): expected id changed from null to 611.Verified
http-header-validation14 of 14 (before: 4 ECONNRESET failures),server-stateless21 passed (before 15); the remainingserver-statelessfailures need diagnostic fixture tools (test_missing_capability,test_streaming_elicitation,test_logging_tool) that the Datalogger example does not have. Total 104 passed (before 91).Not verified
requestState(multi-round elicitation),completion/completeand the conformance fixture server follow in the next pull requests.Known rough edges
Read MCP Request Metadata.vithe restored typedef constant shows expanded at the top right.Restore Request ID.vicopies the raw id, so a refusal reads"id":301 ,(space before the comma) — valid JSON, the same spacing as elsewhere.🤖 Generated with Claude Code