Repository navigation
Align vMCP with the final MCP 2026-07-28 spec - #7032
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7032 +/- ##
==========================================
+ Coverage 80.53% 80.57% +0.03%
==========================================
Files 856 856
Lines 87374 87378 +4
==========================================
+ Hits 70366 70402 +36
+ Misses 17003 16971 -32
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
Co-authored-by: Mecatl <[email protected]>
Comments and docs cited the go-sdk and toolhive-core versions next to every SDK behaviour they described. Those pins go stale on the next bump, and the real version already lives in go.mod. Name the behaviour and the SDK type instead. Where a version marked a threshold, the wording now says "current" or "earlier" rather than naming the release. Co-authored-by: Mecatl <[email protected]>
fa20080 to
d4cd7b6
Compare
|
@reyortiz3 rebased this onto current main, the conflicts were in the Modern dispatch/envelope code and the vMCP arch docs. Also took your go-sdk version question: dropped the version pins from the comments and docs in this PR (separate commit d4cd7b6), since the real version lives in go.mod. I also grepped the rest of the repo, there are about 40 more pins on main in files this PR doesn't touch, so I left those for a follow-up. |
rdimitrov
left a comment
There was a problem hiding this comment.
LGTM. The only runtime change is the status switch in writeModernCodedError. In today's code, the only coded error that reaches it after dispatch is the rate limiter's, which keeps HTTP 200. Classification errors and -32021 were already 400. Legacy clients are unaffected, and the new go-sdk test covers session recovery after a 400. Everything else is comments and docs.
Summary
The 2026-07-28 MCP revision is final, but vMCP still returned HTTP 200 for several errors and its comments and documentation described the revision or go-sdk behavior as outdated. This PR aligns the Modern error statuses with the final spec and refreshes the related compatibility notes.
-32601and HTTP 400 for-32602,-32020,-32021, and-32022.Type of change
Test plan
task testattempted; did not pass:TestNewClientWithSocketPathPodmanandTestCheckHealth_UnixSocket_Successfailed withbind: invalid argumentwhile binding Unix sockets under the current test temp path. A retry withTMPDIR=/tmpwas canceled before tests completed.)task test-e2e)task lint-fix; passed with 0 issues)Changes
pkg/vmcp/server/modern_dispatch.go,modern_envelope.go, and testspkg/mcp/,pkg/runner/,pkg/transport/proxy/streamable/, andpkg/vmcp/docs/arch/03-transport-architecture.md,docs/arch/10-virtual-mcp-architecture.md,docs/arch/16-vmcp-mrtr.md,docs/remote-mcp-authentication.mdtest/e2e/Does this introduce a user-facing change?
Yes. Before, the Modern server returned HTTP 200 for these protocol errors. Now
-32601returns 404 and-32602,-32020,-32021, and-32022return 400, as required by the final MCP spec. Authorization denials remain HTTP 403; unrelated coded errors, including the vMCP-owned-32603unsupported-MRTR response, remain HTTP 200.Implementation plan
Approved implementation plan
Special notes for reviewers
The status change is intentionally limited to the specified error codes; it does not alter authorization-denial or unrelated application-error handling. The review also noted a few non-blocking comment wording clarifications around the pagination
SHOULDlanguage and the current scope of Modern push-stream handling.