WreathBrowse
Guides

Protocols and MCP#

Choose the protocol for the caller, then keep the application operation behind it. Identity, authorization and schema should not fork because the transport changed.

CallerBoundary
model or agent clientMCP tool, resource or prompt
browser asking flexible read questionsGraphQL schema
typed internal RPC clientgRPC service and Protobuf messages
another system notifying youverified webhook inbox
your service notifying anotherdurable webhook outbox

Wreath's Protobuf codec declares stable wire numbers directly in Python:

wire.pypython
from wreath.protobuf import decode, encode, field, message


@message
class Position:
    collar_id: int = field(1)
    latitude: float = field(2)
    longitude: float = field(3)


def round_trip(position: Position) -> Position:
    return decode(Position, encode(position))
test_wire.pypython
from wire import Position, round_trip


def test_the_wire_contract_survives_a_round_trip() -> None:
    position = Position(collar_id=7, latitude=-37.81, longitude=144.96)
    assert round_trip(position) == position

Field numbers are the compatibility contract; reorderings do not change the wire. Unknown fields are preserved for version skew. Declarations compile once and the codec runs through Wreath's native implementation.

Next, build a complete MCP server, or inspect every protocol and delivery API.

esc
↑↓ navigate↵ openesc close