Skip to main content

Crate bote

Crate bote 

Source
Expand description

§Bote — MCP Core Service

Bote (German: messenger) provides the shared MCP (Model Context Protocol) implementation for the AGNOS ecosystem. JSON-RPC 2.0 protocol, tool registry, schema validation, and dispatch — so individual apps don’t each reimplement the protocol.

§Feature Flags

FlagDescription
httpHTTP transport via axum (POST + SSE streaming)
wsWebSocket transport via tokio-tungstenite
unixUnix domain socket transport
all-transportsEnables http, ws, and unix
auditAudit logging via libro hash-linked chain
eventsEvent publishing via majra pub/sub
bridgeTypeScript bridge with CORS and MCP result formatting
discoveryCross-node tool discovery via majra pub/sub
sandboxTool sandboxing via kavach isolation backends
fullAll transports + audit + events + bridge + discovery + sandbox

None are enabled by default — enable only what you need.

§Modules

  • protocol — JSON-RPC 2.0 types (Request, Response, Error)
  • registry — Tool registry with schema validation, versioning, and discovery
  • schema — JSON Schema compilation and typed validation
  • dispatch — Route tool calls to registered handlers (with dynamic registration)
  • stream — Streaming primitives (progress, cancellation)
  • transport — Transport layer (stdio, HTTP, WebSocket, Unix socket)
  • audit — Audit logging trait and libro integration
  • events — Event publishing trait and majra integration
  • [bridge] — TypeScript bridge with CORS and MCP result formatting
  • [discovery] — Cross-node tool discovery via majra pub/sub
  • [sandbox] — Tool sandboxing via kavach isolation backends

Re-exports§

pub use audit::AuditSink;
pub use audit::ToolCallEvent;
pub use dispatch::DispatchOutcome;
pub use dispatch::Dispatcher;
pub use events::EventSink;
pub use protocol::JsonRpcError;
pub use protocol::JsonRpcRequest;
pub use protocol::JsonRpcResponse;
pub use registry::ToolDef;
pub use registry::ToolRegistry;
pub use registry::ToolSchema;
pub use schema::CompiledSchema;
pub use schema::PropertyDef;
pub use schema::SchemaType;
pub use stream::CancellationToken;
pub use stream::ProgressSender;
pub use stream::ProgressUpdate;
pub use stream::StreamContext;
pub use stream::StreamingToolHandler;

Modules§

audit
Audit logging — record every tool call for compliance and debugging.
dispatch
Tool call dispatcher — route JSON-RPC calls to registered handlers.
events
Event publishing — broadcast tool call and registration events.
protocol
JSON-RPC 2.0 types for MCP.
registry
Tool registry — register, discover, and validate MCP tools.
schema
JSON Schema validation — compile ToolSchema into a typed representation and validate parameters against it.
stream
Streaming primitives — progress notifications, cancellation, and streaming handler support.
transport
Transport layer — codec, stdio, and feature-gated network transports.

Enums§

BoteError

Type Aliases§

Result