Skip to main content

bn/commands/
mcp.rs

1//! MCP server command: `bn mcp serve`
2
3use std::path::Path;
4
5use anyhow::Result;
6
7/// Start the MCP server on stdio.
8///
9/// Reads JSON-RPC 2.0 messages from stdin, dispatches to beans operations,
10/// and writes responses to stdout. Designed for use with MCP clients like
11/// Cursor, Windsurf, Claude Desktop, and Cline.
12pub fn cmd_mcp_serve(beans_dir: &Path) -> Result<()> {
13    crate::mcp::server::run(beans_dir)
14}