Skip to main content

kaizen/mcp/
mod.rs

1// SPDX-License-Identifier: AGPL-3.0-or-later
2//! Model Context Protocol (stdio) — most CLI workflows as MCP tools (see `docs/mcp.md` for shell-only commands).
3
4mod handler;
5
6use anyhow::Result;
7pub use handler::KaizenMcp;
8use rmcp::ServiceExt;
9use rmcp::transport::stdio;
10
11/// Run the MCP server on stdin/stdout until the client disconnects.
12pub async fn run_stdio_server() -> Result<()> {
13    let (r, w) = stdio();
14    let _ = KaizenMcp.serve((r, w)).await?.waiting().await?;
15    Ok(())
16}