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
use clap::Subcommand;
#[derive(Debug, Subcommand)]
pub enum ServeCommand {
/// Start MCP server for AI agent integration
Start {
/// Allow write operations (generate, new, fix). DEFAULT: false (read-only mode)
#[arg(long, default_value = "false")]
allow_writes: bool,
/// Automatically find an available port if the specified port is in use
#[arg(long)]
auto_port: bool,
/// Bind address
#[arg(long, default_value = "127.0.0.1")]
bind: String,
/// Optional name for this server instance
#[arg(short, long)]
name: Option<String>,
/// Server port
#[arg(long, default_value = "3000")]
port: u16,
/// Enable file watching for live updates
#[arg(short, long)]
watch: bool,
/// Enable WebSocket support for real-time notifications
#[arg(long)]
websocket: bool,
},
/// List all running MCP server instances
List {},
/// Stop a running MCP server instance
Stop {
/// Port number of the server to stop
port: u16,
},
}