Skip to main content

ringo_mcp/
lib.rs

1//! `ringo-mcp` — an MCP server over stdio that exposes ringo SIP agents
2//! (user agents) to LLM agents for telephony.
3//!
4//! Architecture: one `ringo-agent` worker *process* per configured account
5//! (each worker is one baresip UA, driven over its framed stdio protocol),
6//! managed by a [`hub::Hub`]. Agents start **lazily** — the hub spawns a
7//! worker on the first tool call that touches an agent (single-flight), and a
8//! dead worker is respawned the same way. The MCP tool surface in [`server`]
9//! is a thin layer over the per-agent [`ringo_agent::ProcessClient`] handles.
10//!
11//! The binary re-invokes itself as `ringo-mcp agent` for the worker processes
12//! (see `ProcessClient::spawn`, which spawns `current_exe` with the `agent`
13//! argument), so this crate is both the MCP server and the worker host.
14
15#![warn(missing_docs)]
16
17pub mod config;
18pub mod hub;
19mod server;
20mod state;
21pub mod trace;
22
23pub use server::{event_name, resolve_disabled_tools, serve, total_tool_count};