feat(mcp): adopt the 2026-07-28 protocol (go-sdk v1.6.1 -> v1.7.0) #403

Merged
hexajon merged 2 commits from issue-387-mcp-protocol-2026-07-28 into main 2026-08-17 08:45:53 +00:00
Owner

Summary

Bump the MCP go-sdk to v1.7.0 so madtea serve advertises 2026-07-28 as its latest protocol while still negotiating down to 2025-11-25 for older clients (every current client, including Claude Code). The server code was source-compatible; this is the dependency move plus test-fixture reconciliation.

  • Add TestCleanRoomProtocolVersionNegotiation: a 2025-11-25 client negotiates down; a modern client gets 2026-07-28. mcp-conformance stays green at the untouched 2025-11-25 harness (the TS SDK does not yet speak 2026-07-28).
  • Client-visible wire change (deliberate): the SDK folds the resource-not-found error code from -32002 into invalid-params (-32602) for ALL clients, per SEP-2164. The escape hatch is itself deprecated, so this is the forward outcome. Not-found assertions and comments updated.
  • repoguard: SEP-2577 deprecates roots and the SDK refuses server-initiated roots/list on >= 2026-07-28 sessions, so the roots-based wrong-repo write guard degrades to no-signal for modern clients. No current client speaks 2026-07-28, so no live exposure; documented, with the roots test pinned to a wire-level 2025-11-25 client. Tracked forward in #402 (adopt the SEP-2322 replacement).
  • Raise the tool-schema byte budget to 240000: v1.7.0 always emits the readOnly/idempotent hints (~1.5KB), on top of ~14.4KB of pre-existing description drift that had silently consumed the old cap. The diet-vs-recalibrate decision is #401.
  • Regenerate THIRD-PARTY-LICENSES.md (adds golang.org/x/time).

Closes #387

## Summary Bump the MCP go-sdk to v1.7.0 so `madtea serve` advertises 2026-07-28 as its latest protocol while still negotiating down to 2025-11-25 for older clients (every current client, including Claude Code). The server code was source-compatible; this is the dependency move plus test-fixture reconciliation. - Add TestCleanRoomProtocolVersionNegotiation: a 2025-11-25 client negotiates down; a modern client gets 2026-07-28. mcp-conformance stays green at the untouched 2025-11-25 harness (the TS SDK does not yet speak 2026-07-28). - Client-visible wire change (deliberate): the SDK folds the resource-not-found error code from -32002 into invalid-params (-32602) for ALL clients, per SEP-2164. The escape hatch is itself deprecated, so this is the forward outcome. Not-found assertions and comments updated. - repoguard: SEP-2577 deprecates roots and the SDK refuses server-initiated roots/list on >= 2026-07-28 sessions, so the roots-based wrong-repo write guard degrades to no-signal for modern clients. No current client speaks 2026-07-28, so no live exposure; documented, with the roots test pinned to a wire-level 2025-11-25 client. Tracked forward in #402 (adopt the SEP-2322 replacement). - Raise the tool-schema byte budget to 240000: v1.7.0 always emits the readOnly/idempotent hints (~1.5KB), on top of ~14.4KB of pre-existing description drift that had silently consumed the old cap. The diet-vs-recalibrate decision is #401. - Regenerate THIRD-PARTY-LICENSES.md (adds golang.org/x/time). Closes #387
Bump the MCP go-sdk to v1.7.0 so `madtea serve` advertises 2026-07-28 as
its latest protocol while still negotiating down to 2025-11-25 for older
clients. The server code was source-compatible; the change is the
dependency move plus test-fixture reconciliation to the v1.7.0 API.

- Add TestCleanRoomProtocolVersionNegotiation: a 2025-11-25 client
  negotiates down, a modern client gets 2026-07-28.
- Client-visible wire change: the SDK folds the resource-not-found error
  code from -32002 into invalid-params (-32602) for all clients, per
  SEP-2164. Update the not-found assertions and their comments.
- repoguard: server-initiated roots/list is refused on >= 2026-07-28
  sessions (SEP-2577), so the roots-based caller-repo cross-check
  degrades to no-signal for modern clients. Documented; the roots test
  is pinned to a wire-level 2025-11-25 client.
- Raise the tool-schema byte budget to 240000: v1.7.0 always emits the
  readOnly and idempotent hint keys (~1.5KB total), and pre-existing
  description growth had already consumed the old cap's headroom.
- Regenerate THIRD-PARTY-LICENSES.md (adds golang.org/x/time).
Merge main into issue-387: reconcile the schema byte-budget with #375
Some checks failed
ci / mcp-conformance (pull_request) Successful in 2m24s
drift / govulncheck (pull_request) Has been skipped
drift / surface-diff (pull_request) Successful in 1m34s
drift / forgejo-smoke (pull_request) Has been skipped
ci / mcp-conformance (push) Has been cancelled
drift / govulncheck (push) Has been cancelled
drift / surface-diff (push) Has been cancelled
drift / forgejo-smoke (push) Has been cancelled
ci / gate (push) Has been cancelled
ci / gate (pull_request) Failing after 30m20s
18745feff4
Both branches raised totalToolByteBudget to 240000. Reconcile the
rationale comment to the accurate combined attribution: the bulk of the
growth is pre-existing main-line description drift (~14.4KB since the
legacy-2007 pin), not the protect_set action (#375, ~196 bytes) or the
go-sdk v1.7.0 always-emitted hints (#387, ~1.5KB). Combined measured
total is 231674. The diet-vs-recalibrate decision is tracked in #401.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea!403
No description provided.