Expand description
Library half of xianyun-mcp: the allowlist/annotation/middleware
configuration (config) and the clap::Command tree-building logic
shared between the real xianyun-mcp binary (src/main.rs) and this
crate’s tests (golden-file snapshot, guardrail, in-process protocol).
See src/main.rs’s module doc comment for the full story on why the
binary routes argv between the mcp subtree and real xianyun
command dispatch, and why mounted_root un-globals Cli::command()’s
global arguments before mounting brontes::command onto it.
Modules§
- config
- Builds the [
brontes::Config] that governs whichxianyunsubcommands become MCP tools, how they’re annotated, and which ones require explicit client confirmation before they run.
Constants§
- MCP_
GROUP - Group name
brontes::commandmounts its subtree under; matchesbrontes’s own default (seebrontes::Config::command_name, which this crate does not override).
Functions§
- is_
mcp_ invocation truewhenargv[1]is exactly"mcp", orargvcarries no arguments beyond the binary name (the no-arguments-given default).- mounted_
root - Builds the full
xianyuncommand tree withbrontes::commandmounted onto it, after un-globalingCli::command()’s own global arguments so they don’t collide withbrontes’s own--log-levelflag on its mounted subcommands. See the crate-level doc comment for the full story.