Skip to main content

Commands

Enum Commands 

Source
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

  1. Load from ~/.claude/mcp.json (recommended):

    mcp-execution-cli introspect --from-config github
  2. 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: ServerFlags

Server selection, transport, and timeout flags (shared with generate)

§detailed: bool

Show detailed tool schemas

§

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 --overwrite

Fields

§server: String

Server identifier (e.g., “github”)

Must match a directory in servers_dir containing generated TypeScript files.

§servers_dir: Option<PathBuf>

Base directory for generated servers

Default: ~/.claude/servers

§output: Option<PathBuf>

Custom output path for SKILL.md file

Default: ~/.claude/skills/{server}/SKILL.md

§skill_name: Option<String>

Custom skill name

Default: {server}-progressive

§hints: Vec<String>

Use case hints for skill generation

Multiple hints can be provided to generate more relevant documentation. Examples: “managing pull requests”, “code review”, “CI/CD automation”

§overwrite: bool

Overwrite existing SKILL.md file

§

Generate

Generate progressive loading code from MCP server.

Introspects an MCP server and generates TypeScript files for progressive tool loading.

§Configuration Modes

  1. Load from ~/.claude/mcp.json (recommended):

    mcp-execution-cli generate --from-config github
  2. 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_xxx

Fields

§flags: ServerFlags

Server 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)

§progressive_output: Option<PathBuf>

Custom output directory for progressive loading files (default: ~/.claude/servers/)

§dry_run: bool

Preview files that would be generated without writing to disk

§

Server

Manage MCP server connections.

List, validate, and manage configured MCP servers.

Fields

§action: ServerAction

Server 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 complete
§

Completions

Generate shell completions.

Generates completion scripts for various shells that can be sourced or saved to enable tab completion for this CLI.

Fields

§shell: Shell

Target shell for completion generation

Trait Implementations§

Source§

impl Debug for Commands

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more