| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks for the thorough write-up — this is the first end-to-end design on the table, and promoting McpStatelessAsyncServer matches what's actually in the Java SDK code today. Three flags from a Spring Boot-behind-reverse-proxy deployer's perspective:
Two checks while reviewing: the _meta keys should be the namespaced forms (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities) per the changelog, and the Tasks section should reflect the final extension shape — polling tasks/get, tasks/update, unsolicited task handles, no tasks/list. Happy to help with any of the P1–P2 items if maintainers want to open them up. |
Sorry, something went wrong.
…1089/modelcontextprotocol#990 comments, A2 implemented on fork branch
|
Thanks — all three flags land. D1/Q2: Agreed — one endpoint, era chosen by how the client opens. The modern-only switch is currently an interface override; I'll move it to a builder option and make the header ↔ _meta check (-32020) explicit in D1. SEP-2567: Agreed. I'll add a subsection: state travels as server-minted handles in tool arguments, no SDK-side store, and McpSessionStore (#914, #1048) is legacy/2.x-only. Q5: Yes, ship P1–P2 as a 2.x minor. Happy to take you up on the offer — if you pick up P1–P2 (#1064, #1062, #1053, SEP-2243, SEP-2106), I'll focus on P3–P4. I have a local P1–P2 spike I can share so we don't duplicate. Until a maintainer confirms the direction and 3.0.0 scope — so let's treat the split as proposed until they weigh in. Will post the revised sections once updated. @tzolov , @Kehrlann can you take a look into the propsal ? Thanks |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Adds a design proposal — docs/design/2026-07-28-spec-support.md — for implementing the
2026-07-28 MCP specification
revision in this SDK.
Link for md viewer:
https://github.com/omarmahamid/java-sdk/blob/feat/28-7-mcp-spec/docs/design/2026-07-28-spec-support.md
Docs-only. No production code changes. The intent is to agree the shape of the work
before implementation, per CONTRIBUTING.md:
Why a design document rather than PRs
The SDK currently implements 2024-11-05 through 2025-11-25. Every one of those revisions
shares one structural assumption: an MCP conversation is a session established by an
initialize handshake, over which either party may originate JSON-RPC requests.
2026-07-28 removes that assumption. Six of its nine major changes are removals or
inversions of mechanisms mcp-core models as load-bearing types — McpServerSession,
McpStreamableServerSession, LifecycleInitializer, McpTransportSession,
McpTransportStream, and the client-side request handlers for roots/list,
sampling/createMessage and elicitation/create:
Three properties make piecemeal delivery actively harmful:
unimplementable without the _meta envelope; the envelope is unverifiable without header
mirroring. Landing them independently produces intermediate states that are on no protocol
revision at all.
parallel type hierarchy, or separate modules determines the shape of every subsequent PR.
removals must be batched into one release.
The finding the design rests on
This SDK already ships a stateless server. McpStatelessAsyncServer's own Javadoc:
That is close to a verbatim description of the 2026-07-28 server model. The proposal
therefore does not add a parallel server implementation — it promotes the existing
stateless server to be the canonical modern server, and leaves the session-based classes as
a deprecated legacy path. Two additive SPI extensions are needed: answer one request with a
stream (subscriptions/listen), and answer one request with "I need more input"
(MRTR).
Without that existing asset, 2026-07-28 support would be a ground-up rewrite. This is the
main reason the proposal is tractable.
What the document contains
Structured as a design proposal (Motivation → Public Interfaces → Proposed Changes →
Security → Compatibility/Migration → Test Plan → Rejected Alternatives → FAQ):
additive / structural / wire-format / removal.
ErrorCodes (-32020 / -32021 / -32022), DiscoverResult, InputRequiredResult,
InputRequests / InputResponses, ListRootsRequest, SubscriptionsListenRequest,
CacheableResult, McpRequestContext, McpSubscription, McpSubscriptionSink,
McpRequestStateCodec, McpHeaderCodec, McpParamHeaderExtractor, new exceptions.
coherent protocol revision. P1–P2 are non-breaking and could ship in a 2.x minor.
behaviour.
from the Case A / Case B rules in CONTRIBUTING.md.
Design decisions worth reviewer attention
D3 — MRTR is resolved inside the client session layer. Sampling / elicitation / roots
handler signatures do not change; the same handlers are invoked from a bounded retry loop
instead of from an inbound-request dispatcher. This keeps callTool() returning
CallToolResult rather than a union type, so existing callers recompile unchanged. RA-3
argues the alternative.
D4 — resultType must be a real record component. A default method on Result would not
serialize (Jackson emits record components), so every result the SDK emitted would be
missing a spec-required field. That means ~15 records under the CONTRIBUTING.md Case B
rules. The interface default is still added, for uniform reading across eras.
D1 — era dispatch at the transport front door, not a boolean modern flag on the existing
session types. The spec says a dual-era server "selects its behavior from how the client
opens" — that is a routing decision on the first message and belongs in one place.
D6 — the modern client needs a tool-definition cache, because x-mcp-header mirroring
requires the tool's inputSchema at tools/call time and tools/call does not carry it. The
same cache is what makes ttlMs / cacheScope actionable.
Open questions for maintainers
Deprecated, not Removed, and the feature-lifecycle policy allows a twelve-month window.
The document proposes removal (the release is already breaking) but explicitly flags
deprecate-now / remove-next-major as the conservative option and does not insist.
extension capability?
under CONTRIBUTING.md's "concrete, not speculative" principle, but a real use case would
change that.
critical path, or hold everything for the major?
Known behaviour change
One change cannot be made backward-compatible: on the modern path, notifications/message is
suppressed for requests that omit io.modelcontextprotocol/logLevel. The spec states servers
MUST NOT emit it in that case. It leads the migration guide, and logLevel is settable
once on the client builder to restore log flow with a one-line change.
What this PR does not do
for discussion.
intended to complement it.
Checklist
into this PR or filed as a follow-up, reviewer's preference
(changelog, versioning, MRTR, subscriptions, discover, Streamable HTTP)