mcp-execution-cli
Command-line interface for MCP Code Execution progressive loading. Achieves 98% token savings by generating one TypeScript file per MCP tool.
Installation
Pre-built binaries
Download from GitHub Releases:
# macOS (Apple Silicon)
|
# macOS (Intel)
|
# Linux (x86_64)
|
From crates.io
From source
[!IMPORTANT] Requires Rust 1.89 or later for building from source.
Usage
Generate Progressive Loading Files
# From config file (recommended)
# With manual configuration
[!TIP] Use
--from-configto load server configuration from~/.claude/mcp.json.
Discover Available Tools
# List available servers
# List tools in a server
# Load one tool (98% token savings!)
Shell Completions
# Bash
# Zsh
# Fish
Commands
generate
Generate TypeScript files with progressive loading:
Options:
--from-config <NAME>: Load config from mcp.json--arg <ARG>: Server command argument (repeatable)--env <KEY=VALUE>: Environment variable (repeatable)--progressive-output <PATH>: Custom output directory--format <FORMAT>: Output format (json, text, pretty)
Examples:
# From config
# Docker container
introspect
Analyze MCP servers and discover capabilities:
Configuration Modes:
-
Load from
~/.claude/mcp.json(recommended): -
Manual configuration:
Options:
--from-config <NAME>: Load config from mcp.json--arg <ARG>: Server command argument (repeatable)--env <KEY=VALUE>: Environment variable (repeatable)--detailed: Show full input/output schemas--format <FORMAT>: Output format (json, text, pretty)--http <URL>: Use HTTP transport--sse <URL>: Use SSE transport
Examples:
# From config with detailed schemas
# Manual with Docker
# HTTP transport
skill
Generate Claude Code skill files (SKILL.md) from progressive loading tools:
Options:
--server, -s <ID>: Server identifier (required)--servers-dir <PATH>: Custom servers directory--output, -o <PATH>: Custom output path--skill-name <NAME>: Custom skill name--hint <HINT>: Use case hints (repeatable)--overwrite: Overwrite existing SKILL.md
Examples:
# Generate skill for GitHub server
# With custom output and hints
# Overwrite existing skill
[!TIP] For optimal results, prefer using the MCP server (
mcp-execution-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.
stats
View cache statistics:
completions
Generate shell completions:
[!NOTE] Supported shells: bash, zsh, fish, powershell
Features
- Progressive Loading: One TypeScript file per MCP tool
- Type-Safe: Full TypeScript interfaces from MCP schemas
- Multiple Transports: stdio, HTTP, SSE, Docker
- Shell Completions: bash, zsh, fish, PowerShell
- Fast: ~2-3ms generation time per server
Token Savings
| Approach | Tokens | Savings |
|---|---|---|
| Traditional (all tools) | ~30,000 | - |
| Progressive (1 tool) | ~500-1,500 | 98% |
Security
- No Code Execution: Generated TypeScript is for type information only
- Command Injection Prevention: All user input validated
- Path Validation: Rejects malicious paths
- Template Security: Handlebars escapes all user input
[!WARNING] Never pass untrusted input directly to
--argor--envoptions.
Related Crates
This crate is part of the mcp-execution workspace:
mcp-execution-core- Foundation typesmcp-execution-introspector- MCP server analysismcp-execution-codegen- TypeScript code generationmcp-execution-files- Virtual filesystemmcp-execution-skill- Skill generationmcp-execution-server- MCP server
MSRV Policy
Minimum Supported Rust Version: 1.89
MSRV increases are considered minor version bumps.
License
Licensed under either of Apache License 2.0 or MIT license at your option.