Skip to main content

Module protocol

Module protocol 

Source
Expand description

§mcpr-protocol

MCP specification layer: JSON-RPC 2.0, MCP message taxonomy, schema capture primitives, and session lifecycle. Zero coupling to HTTP frameworks or proxy logic — this module describes what MCP is, not how mcpr proxies it.

§Module layout

protocol/
+-- jsonrpc.rs         JSON-RPC 2.0 envelope, id, error, lazy typed views
+-- mcp.rs             MCP 2025-11-25 message taxonomy + classify_client/server
+-- schema.rs          Pagination merge/diff + is_schema_method
+-- schema_manager/    Per-upstream versioned schema snapshots
+-- session.rs         Session lifecycle, SessionStore trait, MemorySessionStore

§Dependencies

Minimal: serde, serde_json, chrono, dashmap. No HTTP framework deps.

Modules§

jsonrpc
Shallow JSON-RPC 2.0 envelope.
mcp
MCP message taxonomy (spec v2025-11-25).
schema
MCP schema capture: types, pagination merging, and diff logic.
schema_manager
Schema manager: the top-level per-upstream view of an MCP server.
session