pub enum Commands {
Introspect {
flags: ServerFlags,
detailed: bool,
},
Skill {
server: String,
servers_dir: Option<PathBuf>,
output: Option<PathBuf>,
skill_name: Option<String>,
hints: Vec<String>,
overwrite: bool,
},
Generate {
flags: ServerFlags,
name: Option<String>,
progressive_output: Option<PathBuf>,
dry_run: bool,
},
Server {
action: ServerAction,
},
Setup,
Completions {
shell: Shell,
},
}Expand description
Available CLI subcommands.
§Examples
use mcp_execution_cli::cli::{Cli, Commands};
use clap::Parser;
let args = Cli::parse();
match args.command {
Commands::Introspect { .. } => println!("Introspect command"),
Commands::Generate { .. } => println!("Generate command"),
Commands::Server { .. } => println!("Server command"),
Commands::Skill { .. } => println!("Skill command"),
Commands::Setup => println!("Setup command"),
Commands::Completions { .. } => println!("Completions command"),
}Variants§
Introspect
Introspect an MCP server and display its capabilities.
Connects to an MCP server, discovers its tools, and displays detailed information about available capabilities.
§Configuration Modes
-
Load from ~/.claude/mcp.json (recommended):
mcp-execution-cli introspect --from-config github -
Manual configuration:
mcp-execution-cli introspect github-mcp-server --arg=stdio
§Examples
# Load GitHub server config from mcp.json
mcp-execution-cli introspect --from-config github
# Load with detailed schemas
mcp-execution-cli introspect --from-config github --detailed
# Manual: Simple binary
mcp-execution-cli introspect github-mcp-server
# Manual: With arguments
mcp-execution-cli introspect github-mcp-server --arg=stdio
# Manual: Docker container
mcp-execution-cli introspect docker --arg=run --arg=-i --arg=--rm \
--arg=ghcr.io/github/github-mcp-server \
--env=GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx
# HTTP transport
mcp-execution-cli introspect --http https://api.githubcopilot.com/mcp/ \
--header "Authorization=Bearer ghp_xxx"Fields
flags: ServerFlagsServer selection, transport, and timeout flags (shared with generate)
Skill
Generate Claude Code skill file from progressive loading tools.
Scans generated progressive loading TypeScript files and creates an instruction skill (SKILL.md) for Claude Code integration.
§Note
For optimal results, prefer using the MCP server (mcp-server) for skill generation.
The MCP server can leverage LLM capabilities to summarize tool descriptions and reduce
context size, resulting in more concise and effective skill files.
§Examples
# Generate skill for GitHub server
mcp-execution-cli skill --server github
# With custom output path
mcp-execution-cli skill --server github --output ~/.claude/skills/github/SKILL.md
# With use case hints
mcp-execution-cli skill --server github \
--hint "managing pull requests" \
--hint "reviewing code changes"
# Overwrite existing skill
mcp-execution-cli skill --server github --overwriteFields
server: StringServer identifier (e.g., “github”)
Must match a directory in servers_dir containing generated TypeScript files.
output: Option<PathBuf>Custom output path for SKILL.md file
Default: ~/.claude/skills/{server}/SKILL.md
Generate
Generate progressive loading code from MCP server.
Introspects an MCP server and generates TypeScript files for progressive tool loading.
§Configuration Modes
-
Load from ~/.claude/mcp.json (recommended):
mcp-execution-cli generate --from-config github -
Manual configuration:
mcp-execution-cli generate docker --arg=run --arg=-i --arg=--rm \ --arg=ghcr.io/github/github-mcp-server \ --env=GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxx \ --name=github
§Examples
# Load GitHub server config from mcp.json
mcp-execution-cli generate --from-config github
# Manual Docker container
mcp-execution-cli generate docker --arg=run --arg=-i --arg=--rm \
--arg=-e --arg=GITHUB_PERSONAL_ACCESS_TOKEN \
--arg=ghcr.io/github/github-mcp-server \
--env=GITHUB_PERSONAL_ACCESS_TOKEN=ghp_xxxFields
flags: ServerFlagsServer selection, transport, and timeout flags (shared with introspect)
name: Option<String>Custom server name for directory (e.g., ‘github’ instead of ‘docker’) (default: uses server command name)
Server
Manage MCP server connections.
List, validate, and manage configured MCP servers.
Fields
action: ServerActionServer management action
Setup
Validate runtime environment for MCP tool execution.
Checks that the system is ready to execute generated MCP tools:
- Verifies Node.js 18+ is installed
- Checks MCP configuration exists
- Makes TypeScript files executable (Unix only)
§Examples
# Validate environment
mcp-execution-cli setup
# Output:
# ✓ Node.js v20.10.0 detected
# ✓ MCP configuration found
# ✓ Runtime setup completeCompletions
Generate shell completions.
Generates completion scripts for various shells that can be sourced or saved to enable tab completion for this CLI.
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand