{"id":35532784,"url":"https://github.com/bug-ops/mcp-execution","last_synced_at":"2026-06-07T22:00:26.227Z","repository":{"id":324005765,"uuid":"1095067150","full_name":"bug-ops/mcp-execution","owner":"bug-ops","description":"🚀 Generate executable TypeScript tools from MCP servers with 98% token savings. Progressive loading pattern for AI agents. Production-ready.","archived":false,"fork":false,"pushed_at":"2026-06-02T03:27:54.000Z","size":1129,"stargazers_count":45,"open_issues_count":4,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T05:13:51.412Z","etag":null,"topics":["ai-agent","ai-tools","anthropic","claude","llm-tools","mcp","rust","skills"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bug-ops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-12T14:47:09.000Z","updated_at":"2026-06-02T03:27:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bug-ops/mcp-execution","commit_stats":null,"previous_names":["bug-ops/mcp-execution"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/bug-ops/mcp-execution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug-ops%2Fmcp-execution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug-ops%2Fmcp-execution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug-ops%2Fmcp-execution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug-ops%2Fmcp-execution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bug-ops","download_url":"https://codeload.github.com/bug-ops/mcp-execution/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bug-ops%2Fmcp-execution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34039495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","ai-tools","anthropic","claude","llm-tools","mcp","rust","skills"],"created_at":"2026-01-04T02:23:20.630Z","updated_at":"2026-06-07T22:00:26.215Z","avatar_url":"https://github.com/bug-ops.png","language":"Rust","funding_links":[],"categories":["MCP Servers \u0026 Integrations"],"sub_categories":["Other IDEs"],"readme":"# MCP Code Execution\n\n[![Crates.io](https://img.shields.io/crates/v/mcp-execution-cli.svg)](https://crates.io/crates/mcp-execution-cli)\n[![docs.rs](https://img.shields.io/docsrs/mcp-execution-core)](https://docs.rs/mcp-execution-core)\n[![CI](https://github.com/bug-ops/mcp-execution/actions/workflows/ci.yml/badge.svg)](https://github.com/bug-ops/mcp-execution/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/bug-ops/mcp-execution/graph/badge.svg?token=2UEW36O9AN)](https://codecov.io/gh/bug-ops/mcp-execution)\n[![MSRV](https://img.shields.io/badge/MSRV-1.91-blue.svg)](https://blog.rust-lang.org/2025/01/23/Rust-1.91.0.html)\n[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](LICENSE.md)\n\nTransform any MCP server into executable, type-safe TypeScript tools using progressive loading pattern. Achieve **98% token savings** by loading only what you need.\n\n\u003e [!TIP]\n\u003e Inspired by [Anthropic's engineering blog post](https://www.anthropic.com/engineering/code-execution-with-mcp) on Code Execution with MCP.\n\n## The Problem\n\nTraditional MCP integration loads ALL tools from a server (~30,000 tokens), even when you only need one or two. This wastes context window space and slows down AI agents.\n\n## The Solution\n\nProgressive loading generates one TypeScript file per tool (~500-1,500 tokens each). AI agents discover and load only what they need via simple `ls` and `cat` commands.\n\n**Result**: **98% token savings** + **autonomous execution** + **type safety**\n\n## Installation\n\n### From crates.io (recommended)\n\n```bash\ncargo install mcp-execution-cli\n```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003ePre-built binaries\u003c/h3\u003e\u003c/summary\u003e\n\nDownload from [GitHub Releases](https://github.com/bug-ops/mcp-execution/releases/latest):\n\n```bash\n# macOS (Apple Silicon)\ncurl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-macos-arm64.tar.gz | tar xz\n\n# macOS (Intel)\ncurl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-macos-amd64.tar.gz | tar xz\n\n# Linux (x86_64)\ncurl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-linux-amd64.tar.gz | tar xz\n\n# Linux (ARM64)\ncurl -L https://github.com/bug-ops/mcp-execution/releases/latest/download/mcp-execution-cli-linux-arm64.tar.gz | tar xz\n\n# Windows (x86_64)\n# Download mcp-execution-cli-windows-amd64.zip from releases page\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eFrom source\u003c/h3\u003e\u003c/summary\u003e\n\n```bash\ngit clone https://github.com/bug-ops/mcp-execution\ncd mcp-execution\ncargo install --path crates/mcp-cli\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003ch3\u003eAs a library\u003c/h3\u003e\u003c/summary\u003e\n\nAdd individual crates to your project:\n\n```bash\ncargo add mcp-execution-core          # Foundation types\ncargo add mcp-execution-introspector  # MCP server analysis\ncargo add mcp-execution-codegen       # TypeScript generation\ncargo add mcp-execution-files         # Virtual filesystem\ncargo add mcp-execution-skill         # SKILL.md generation\n```\n\nOr add to `Cargo.toml`:\n\n```toml\n[dependencies]\nmcp-execution-core = \"0.7\"\nmcp-execution-introspector = \"0.7\"\nmcp-execution-codegen = \"0.7\"\n```\n\n\u003c/details\u003e\n\n\u003e [!IMPORTANT]\n\u003e Requires Rust 1.91 or later for building from source.\n\n## Usage\n\n### Generate TypeScript Tools\n\n```bash\n# 1. Configure MCP server in ~/.claude/mcp.json\n# 2. Generate tools\nmcp-execution-cli generate --from-config github\n\n# Output: ~/.claude/servers/github/\n#   - createIssue.ts\n#   - updateIssue.ts\n#   - ... (one file per tool)\n```\n\n### Progressive Loading\n\n```bash\n# List available tools\nls ~/.claude/servers/github/\n\n# Load only what you need (98% token savings!)\ncat ~/.claude/servers/github/createIssue.ts\n\n# Execute autonomously\nnode ~/.claude/servers/github/createIssue.ts --repo=\"owner/repo\" --title=\"Bug\"\n```\n\n\u003e [!NOTE]\n\u003e Each tool file is self-contained with full TypeScript interfaces and JSDoc documentation.\n\n## Key Features\n\n| Feature | Description |\n|---------|-------------|\n| **98% Token Savings** | Load 1 tool (~500 tokens) vs all tools (~30,000 tokens) |\n| **Autonomous Execution** | Generated files run directly via Node.js CLI |\n| **Type-Safe** | Full TypeScript interfaces from MCP JSON schemas |\n| **Lightning Fast** | 526x faster than target (0.19ms for 10 tools) |\n| **100% MCP Compatible** | Works with all MCP servers via [rmcp SDK](https://docs.rs/rmcp) |\n| **Thoroughly Tested** | 657 tests with 100% pass rate |\n\n## Workspace Crates\n\n| Crate | Description |\n|-------|-------------|\n| [mcp-execution-core](crates/mcp-core) | Foundation types, traits, and error handling |\n| [mcp-execution-introspector](crates/mcp-introspector) | MCP server analysis using rmcp SDK |\n| [mcp-execution-codegen](crates/mcp-codegen) | TypeScript code generation with progressive loading |\n| [mcp-execution-files](crates/mcp-files) | Virtual filesystem for code organization |\n| [mcp-execution-skill](crates/mcp-skill) | SKILL.md generation for Claude Code |\n| [mcp-execution-server](crates/mcp-server) | MCP server for progressive loading generation |\n| [mcp-execution-cli](crates/mcp-cli) | Command-line interface |\n\n**Dependency Graph**:\n\n```text\nmcp-execution-cli → {mcp-execution-codegen, mcp-execution-introspector, mcp-execution-files, mcp-execution-core, mcp-execution-skill}\nmcp-execution-server → {mcp-execution-codegen, mcp-execution-introspector, mcp-execution-files, mcp-execution-core, mcp-execution-skill}\nmcp-execution-codegen → {mcp-execution-introspector, mcp-execution-core}\nmcp-execution-files → mcp-execution-codegen\nmcp-execution-introspector → {rmcp, mcp-execution-core}\nmcp-execution-skill → mcp-execution-core\n```\n\n## CLI Commands\n\nSee [mcp-cli README](crates/mcp-cli) for full reference.\n\n```bash\n# Generate TypeScript tools from config (recommended)\nmcp-execution-cli generate --from-config github\n\n# Preview what would be generated without writing to disk\nmcp-execution-cli generate --from-config github --dry-run\n\n# Introspect MCP server from config\nmcp-execution-cli introspect --from-config github\n\n# Introspect with detailed schemas\nmcp-execution-cli introspect --from-config github --detailed\n\n# Manual configuration (alternative)\nmcp-execution-cli introspect docker --arg=run --arg=-i --env=TOKEN=xxx\n\n# Shell completions\nmcp-execution-cli completions bash\n```\n\n\u003e [!TIP]\n\u003e Use `--from-config` to load server settings from `~/.claude/mcp.json` instead of manual arguments.\n\n## Performance\n\n| Metric | Target | Achieved |\n|--------|--------|----------|\n| 10 tools generation | \u003c100ms | **0.19ms** (526x faster) |\n| 50 tools generation | \u003c20ms | **0.97ms** (20.6x faster) |\n| VFS export | \u003c10ms | **1.2ms** (8.3x faster) |\n| Memory (1000 tools) | \u003c256MB | **~2MB** |\n\n## Documentation\n\n- [Progressive Loading Tutorial](examples/progressive-loading-usage.md) - Complete guide\n- [Claude Code Integration](examples/SKILL.md) - Skill setup\n- [Architecture Decisions](docs/adr/) - ADRs explaining design choices\n\n## Development\n\n```bash\ncargo build --workspace        # Build\ncargo nextest run --workspace  # Test\ncargo clippy --workspace       # Lint\ncargo +nightly fmt --workspace # Format\n```\n\n\u003e [!NOTE]\n\u003e All development follows [Microsoft Rust Guidelines](https://microsoft.github.io/rust-guidelines/).\n\n## MSRV Policy\n\nMinimum Supported Rust Version: **1.91**\n\nMSRV increases are considered minor version bumps.\n\n## License\n\nLicensed under either of [Apache License 2.0](LICENSE.md) or [MIT license](LICENSE.md) at your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbug-ops%2Fmcp-execution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbug-ops%2Fmcp-execution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbug-ops%2Fmcp-execution/lists"}