Skip to content

Reimplement fast-time-server on the official rmcp SDK - #17

Merged
jonpspri merged 3 commits into
mainfrom
fast-time-server-2026-07-29
Jul 29, 2026
Merged

Reimplement fast-time-server on the official rmcp SDK#17
jonpspri merged 3 commits into
mainfrom
fast-time-server-2026-07-29

Conversation

@jonpspri

Copy link
Copy Markdown
Collaborator

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-protocol tool that reports the protocol version active for the current request.

What changed

  • SDK-based dual-era server: StreamableHttpService (default legacy_session_mode) serves legacy 2025-11-25 sessionful traffic and modern 2026-07-28 stateless traffic concurrently on /mcp. supported_protocol_versions() advertises exactly the two eras; initialize()/server/discover use SDK defaults.
  • CLI flags removed: --strict/--protocol are gone — the server is dual-era only.
  • New verify-protocol tool: returns the active protocol version — from per-request _meta on the modern era (stateless), from the initialize-negotiated session version on the legacy era (session) — as text + structuredContent with an auto-generated outputSchema.
  • All 7 existing tools preserved with identical names, schemas, and behavior via #[tool] macros and schemars-derived input schemas.
  • REST benchmark routes (/api/echo, /api/time), /health, /version unchanged.
  • rust-version 1.85 → 1.88 (SDK MSRV); uuid, async-stream, futures-util dropped.
  • README rewritten for the dual-era SDK server; stale /sse section replaced with accurate SSE-on-/mcp docs. locustfile SSE parser handles the SDK's priming event.

Behavioral deltas (SDK defaults, documented in README)

  • Legacy-era POST responses are SSE-framed (text/event-stream) rather than plain JSON.
  • initialize echoes known older protocol versions instead of forcing 2025-11-25.
  • Modern-era requests additionally require Mcp-Method/Mcp-Name headers per SEP-2243.
  • Missing-session legacy POST returns 422 (was 400).

Verification

  • cargo fmt --check, cargo clippy --all-targets (0 warnings), cargo test30/30 pass.
  • Live smoke test: legacy initialize → session → verify-protocol = 2025-11-25/session; DELETE → 202. Modern server/discover advertises exactly both eras; stateless verify-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.

jonpspri and others added 3 commits July 29, 2026 15:52
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>
@jonpspri
jonpspri merged commit 9b97731 into main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant