1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! The `mcp` clap subtree builder.
//!
//! Registered via [`crate::command`] onto the consumer's CLI; dispatched
//! via [`crate::handle`]. The subtree is structurally:
//!
//! ```text
//! mcp
//! ├── start — serve MCP over stdio
//! ├── tools — export the tool list to ./mcp-tools.json
//! ├── stream — serve MCP over streamable HTTP
//! ├── claude — manage Claude Desktop MCP servers
//! ├── vscode — manage VSCode MCP servers (user + workspace)
//! └── cursor — manage Cursor MCP servers (user + workspace)
//! ```
//!
//! Plus a hidden internal marker subcommand (`MARKER_NAME`) that lets
//! [`crate::handle`] disambiguate "the `mcp` subcommand brontes added" from
//! "a `mcp` subcommand the user happened to register before mounting brontes".
use Command;
/// Hidden marker subcommand name. Its presence under the `mcp` group is the
/// signal [`crate::handle`] uses to confirm the group was minted by brontes
/// rather than by a colliding user-defined subcommand.
///
/// The double-underscore prefix avoids any plausible collision with a real
/// user-facing subcommand; the literal name is documented internally only
/// (consumers never invoke it).
//
// This name is implementation detail and may change without notice; do not
// pattern-match on it externally.
pub const MARKER_NAME: &str = "__brontes_internal_marker";
/// Build the `mcp` subtree (group command + start/tools/stream children).
///
/// `command_name` is the configured group name — defaults to `"mcp"`,
/// overridden by [`crate::Config::command_name`]. The group itself has no
/// runnable body; one of its children must be invoked.