cc_cli API← API reference · Generated from the source by cargo run -p api_doc; edit the doc comments, not this page.
ccad: ConstructCraft without a GUI. Runs engine commands from the
command line, from scripts, or for AI agents as an MCP server; all three
use the engine’s one command catalog, plus the commands of the plugins
loaded with --plugins.
| Module | Items | Summary |
|---|---|---|
cc_cli |
0 | ccad: ConstructCraft without a GUI. |
cc_cli::mcp |
3 | A Model Context Protocol server over standard input/output: JSON-RPC 2.0 messages, one per line. |
cc_clicrates/cc_cli/src/main.rs
cc_cli::mcpcrates/cc_cli/src/mcp.rs
A Model Context Protocol server over standard input/output: JSON-RPC 2.0 messages, one per line. Every engine command is an MCP tool with the same name, description and input schema; one session (one open project) lives as long as the server.
Items: MAX_LINE · serve · handle
MAX_LINEpub const MAX_LINE: usize
Longest message line read, in bytes; a longer one is skipped and answered with a parse error.
servepub fn serve(session: Session, input: impl BufRead, output: impl Write) -> std::io::Result<()>
Serve until standard input closes.
handlepub fn handle(session: &mut Session, message: Value) -> Option<Value>
The reply to one message (none for notifications).