rig_mcp/lib.rs
1//! # rig-mcp
2//!
3//! Model Context Protocol bridge for [`rig-compose`](https://crates.io/crates/rig-compose)
4//! tool registries, backed by the official [`rmcp`] SDK.
5//!
6//! Skills cannot tell an [`McpTool`] apart from a `rig_compose::LocalTool`
7//! — both implement the same [`Tool`](rig_compose::tool::Tool) trait.
8//! The same registry can be exposed as an MCP server via [`serve_stdio`]
9//! and consumed by another process via [`StdioTransport::spawn`], with
10//! all spec-level concerns (JSON-RPC framing, capability handshakes,
11//! protocol-version negotiation) delegated to `rmcp`.
12
13#![cfg_attr(
14 test,
15 allow(
16 clippy::unwrap_used,
17 clippy::expect_used,
18 clippy::indexing_slicing,
19 clippy::panic,
20 clippy::panic_in_result_fn,
21 )
22)]
23
24pub mod stdio;
25pub mod transport;
26
27pub use stdio::{StdioTransport, serve_stdio};
28pub use transport::{LoopbackTransport, McpTool, McpTransport};