Reimplement fast-time-server on the official rmcp SDK - #17
Merged
Conversation
Replace the hand-rolled JSON-RPC/session/protocol-negotiation layer with rmcp 3.0.0 (StreamableHttpService + tool macros). The server now runs dual-era only: legacy 2025-11-25 sessionful and modern 2026-07-28 stateless traffic are served concurrently by the SDK transport, and the --strict/--protocol flags are removed. All seven existing tools keep their names, schemas, and behavior, joined by a new verify-protocol tool that reports the protocol version active for the current request (per-request _meta on the modern era, negotiated session version on the legacy era). REST benchmark routes, /health, and /version are unchanged. rust-version bumps to 1.88 for the SDK MSRV. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Jonathan Springer <jps@s390x.com>
README now documents the dual-era-only rmcp SDK server, the verify-protocol tool, and SSE streaming as it actually works on /mcp (replacing the stale /sse section and the --strict/--protocol flag docs). The locustfile SSE parser skips the SDK's empty priming data event on legacy responses. Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> Signed-off-by: Jonathan Springer <jps@s390x.com>
Signed-off-by: Jonathan Springer <jps@s390x.com>
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
Replaces fast-time-server's hand-rolled MCP protocol layer (~560 lines of manual JSON-RPC, session management, and dual-era version negotiation) with the official rmcp SDK 3.0.0, and adds a
verify-protocoltool that reports the protocol version active for the current request.What changed
StreamableHttpService(defaultlegacy_session_mode) serves legacy2025-11-25sessionful traffic and modern2026-07-28stateless traffic concurrently on/mcp.supported_protocol_versions()advertises exactly the two eras;initialize()/server/discoveruse SDK defaults.--strict/--protocolare gone — the server is dual-era only.verify-protocoltool: returns the active protocol version — from per-request_metaon the modern era (stateless), from the initialize-negotiated session version on the legacy era (session) — as text +structuredContentwith an auto-generatedoutputSchema.#[tool]macros and schemars-derived input schemas./api/echo,/api/time),/health,/versionunchanged.rust-version1.85 → 1.88 (SDK MSRV);uuid,async-stream,futures-utildropped./ssesection replaced with accurate SSE-on-/mcpdocs. locustfile SSE parser handles the SDK's priming event.Behavioral deltas (SDK defaults, documented in README)
text/event-stream) rather than plain JSON.initializeechoes known older protocol versions instead of forcing2025-11-25.Mcp-Method/Mcp-Nameheaders per SEP-2243.Verification
cargo fmt --check,cargo clippy --all-targets(0 warnings),cargo test— 30/30 pass.verify-protocol=2025-11-25/session; DELETE → 202. Modernserver/discoveradvertises exactly both eras; statelessverify-protocol=2026-07-28/stateless. REST endpoints verified.Note: MCP-path benchmarks should be re-baselined — the protocol path now carries SDK overhead;
/api/*REST numbers remain directly comparable.