FastestMCP.Protocol (fastest_mcp v0.1.2)

Copy Markdown View Source

Central protocol version and capability helpers. Keep the active MCP protocol baseline in one place so server responses, client handshakes, and tests do not drift.

This module keeps one focused piece of FastestMCP behavior in a dedicated place so builders, runtimes, transports, and providers can share the same rules without duplicating logic.

Unless you are extending FastestMCP itself, you will usually meet this module indirectly through higher-level APIs rather than calling it first.

Summary

Functions

Reads one capability value from a capability map.

Returns whether the given capability flag is enabled.

Returns the active MCP protocol version supported by the library.

Normalizes capability input into a stable map.

Returns the protocol version string for the given input.

Functions

capability(capabilities, path, default \\ nil)

Reads one capability value from a capability map.

capability?(capabilities, path)

Returns whether the given capability flag is enabled.

current_version()

Returns the active MCP protocol version supported by the library.

normalize_capabilities(capabilities)

Normalizes capability input into a stable map.

version(metadata_or_server, default \\ "2025-11-25")

Returns the protocol version string for the given input.