Noizu.MCP.Protocol.Version (Noizu MCP v0.1.3)

Copy Markdown View Source

Protocol version negotiation.

This library targets MCP revision 2025-11-25 and negotiates down to 2025-06-18. Earlier revisions (2025-03-26 and the 2024-11-05 HTTP+SSE transport) are intentionally unsupported — they require JSON-RPC batching, which current revisions forbid.

Summary

Functions

Server-side negotiation: echo the requested version when supported, otherwise reply with our latest (the client then decides whether to proceed).

Functions

latest()

@spec latest() :: String.t()

negotiate(requested)

@spec negotiate(String.t() | nil) :: String.t()

Server-side negotiation: echo the requested version when supported, otherwise reply with our latest (the client then decides whether to proceed).

supported()

@spec supported() :: [String.t()]

supported?(version)

@spec supported?(String.t()) :: boolean()