Skip to content

Latest commit

 

History

History
1180 lines (876 loc) · 38 KB

File metadata and controls

1180 lines (876 loc) · 38 KB

Changelog

All notable changes to the MCP Code Execution project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


0.7.0 - 2026-04-21

Added

  • --dry-run flag for generate command: Preview files that would be generated without writing to disk. Outputs file list with sizes and total size in all supported formats (pretty/text/json). Server connection still runs to produce accurate previews based on real tool definitions.

Fixed

  • mcp-execution-server: Replaced .map(...).unwrap_or(0) with .map_or(0, ...) on Result to satisfy clippy::map_unwrap_or (pedantic group). Suppressed dead_code warning on tool_router field, which is required by the #[tool_router] macro but not read directly.

Changed

  • MSRV: raised from 1.89 to 1.91
  • mcp-execution-files: replaced Path::with_extension("tmp") with Path::with_added_extension("tmp") for atomic writes — more precise semantics (appends suffix rather than replacing the last extension)
  • Dependencies: Updated to latest stable versions
    • rmcp: 0.16.0 → 1.5.0 (official Rust MCP SDK — major version, stable API)
    • clap / clap_complete: 4.5.x → 4.6.1
    • tokio: 1.49.0 → 1.52.0
    • rayon: 1.11 → 1.12
    • rand: 0.10.0 → 0.10.1
    • toml, uuid, chrono, tracing-subscriber, which (minor/patch updates)
  • CI: Updated codecov/codecov-action v5→v6, lewagon/wait-on-check-action 1.5→1.6.1, actions/upload-artifact v6→v7, actions/download-artifact v7→v8

[0.6.7] - 2026-04-21

Added

  • --dry-run flag for generate command: Preview files that would be generated without writing to disk. Outputs file list with sizes and total size in all supported formats (pretty/text/json). Server connection still runs to produce accurate previews based on real tool definitions.

Fixed

  • mcp-execution-server: Replaced .map(...).unwrap_or(0) with .map_or(0, ...) on Result to satisfy clippy::map_unwrap_or (pedantic group). Suppressed dead_code warning on tool_router field, which is required by the #[tool_router] macro but not read directly.

Changed

  • Dependencies: Updated to latest stable versions
    • rmcp: 0.16.0 → 1.4.0 (official Rust MCP SDK — major version, stable API)
    • clap / clap_complete: 4.5.x → 4.6.1
    • tokio: 1.49.0 → 1.50.0
    • rand: 0.10.0 → 0.10.1
    • toml, uuid, chrono, tracing-subscriber, which (minor/patch updates)
  • CI: Updated codecov/codecov-action from v5 to v6, lewagon/wait-on-check-action from 1.5.0 to 1.6.1, actions/upload-artifact from v6 to v7, actions/download-artifact from v7 to v8

0.6.6 - 2026-02-22

Summary

Dependency Updates

This patch release updates core dependencies to latest stable versions.

Changed

  • Dependencies: Updated to latest stable versions
    • rmcp: 0.14.0 → 0.16.0 (official Rust MCP SDK)
    • toml: 0.9 → 1.0
    • uuid: 1.20.0 → 1.21.0
    • Multiple transitive dependency updates (anyhow, bitflags, bumpalo, bytes, cc)

0.6.5 - 2026-01-27

Summary

Dependency Updates & CI Improvements

This patch release updates core dependencies and improves CI automation with dependabot automerge workflow.

Key Changes:

  • Updated rmcp to 0.14.0 (latest official MCP SDK)
  • Updated uuid to 1.20.0
  • Upgraded Cargo resolver to version 3
  • Added dependabot automerge workflow
  • Added codecov badges with per-crate coverage flags

Changed

  • Dependencies: Updated to latest stable versions

    • rmcp: 0.12.0 → 0.14.0 (official Rust MCP SDK)
    • uuid: 1.19.0 → 1.20.0
    • cc: 1.2.52 → 1.2.54
    • clap_lex: 0.7.6 → 0.7.7
    • find-msvc-tools: 0.1.7 → 0.1.8
    • js-sys: 0.3.83 → 0.3.85
    • proc-macro2: 1.0.105 → 1.0.106
    • process-wrap: 9.0.0 → 9.0.1
    • quote: 1.0.43 → 1.0.44
    • rand_core: 0.9.3 → 0.9.5
    • rustc-demangle: 0.1.26 → 0.1.27
    • wasm-bindgen: 0.2.106 → 0.2.108
    • web-sys: 0.3.83 → 0.3.85
    • windows: 0.61.3 → 0.62.2
    • Multiple other transitive dependency updates
  • Cargo resolver: Upgraded to version 3 (Rust 2024 edition)

    • Better dependency resolution
    • Improved build times

Added

  • CI/CD: Dependabot automerge workflow (.github/workflows/dependabot-automerge.yml)

    • Automatically merges minor and patch dependency updates
    • Reduces manual PR review overhead
    • Ensures dependencies stay up-to-date
  • Documentation: Added codecov badges with per-crate coverage flags

    • Individual coverage tracking for each workspace crate
    • Better visibility into test coverage

Dependencies

Complete dependency update list:

  • Core: rmcp 0.12.0 → 0.14.0, uuid 1.19.0 → 1.20.0
  • Build: cc, find-msvc-tools, rustc-demangle (minor updates)
  • WASM: wasm-bindgen, js-sys, web-sys, wasip2 (minor updates)
  • Windows: windows 0.61.3 → 0.62.2 and related crates
  • Other: Multiple transitive dependency updates for security and performance

0.6.4 - 2026-01-04

Summary

crates.io Release Preparation

This patch release prepares all workspace crates for publishing to crates.io with the mcp-execution- prefix and adds trusted publishing workflow.

Key Changes:

  • Renamed all crates to mcp-execution-* prefix for crates.io namespace
  • Added GitHub Actions workflow for trusted publishing (OIDC)
  • Fixed circular dev-dependency between codegen and files crates
  • Updated all README files with crates.io badges and installation instructions

Changed

  • Crate Renames: All crates now use mcp-execution- prefix for crates.io

    • mcp-coremcp-execution-core
    • mcp-introspectormcp-execution-introspector
    • mcp-codegenmcp-execution-codegen
    • mcp-filesmcp-execution-files
    • mcp-skillmcp-execution-skill
    • mcp-servermcp-execution-server
    • mcp-execution-cli (unchanged)
  • README Updates: All crate READMEs now include:

    • crates.io and docs.rs badges
    • Installation instructions via cargo add
    • Collapsible sections for alternative installation methods (root README)

Added

  • Trusted Publishing Workflow: .github/workflows/release.yml
    • OIDC-based authentication with crates.io
    • Automatic publishing on GitHub releases
    • Uses rust-lang/crates-io-auth-action for secure token management
    • 5-second delay between crate publications for dependency resolution

Fixed

  • Circular Dependency: Removed mcp-execution-files from mcp-execution-codegen dev-dependencies
    • This was blocking crates.io publishing due to circular dependency
    • VFS-related benchmarks removed from codegen crate

Documentation

  • Root README.md: Added "From crates.io" as primary installation method
  • All crate READMEs: Added installation section with cargo add command
  • Made pre-built binaries and source installation collapsible in root README

0.6.3 - 2026-01-03

Summary

CLI Enhancement: Config-Based Introspection

This patch release adds --from-config support to the introspect command, enabling users to load server configurations from ~/.claude/mcp.json instead of specifying manual arguments.

Key Achievements:

  • New --from-config flag for introspect command
  • Security improvements to error messages
  • 556 tests passing (100% pass rate)
  • Dependency updates (rmcp 0.12, tokio 1.49)

Added

  • --from-config for introspect command: Load server configuration from ~/.claude/mcp.json by name
    • mcp-execution-cli introspect --from-config github instead of manual docker/npx args
    • Matches existing --from-config in generate command
    • Configuration Modes section in help text
    • 3 new integration tests for config loading

Changed

  • Error messages: Improved security by removing information disclosure
    • Removed server list from "not found" errors (prevents enumeration)
    • Use ~/.claude/mcp.json instead of full filesystem path
  • Logging: Changed config loading logs from info! to debug! level
  • Help text: Added Configuration Modes section with recommended usage

Dependencies

  • rmcp: 0.10 → 0.12
  • tokio: 1.48 → 1.49
  • handlebars: 6.3 → 6.4
  • schemars: 1.1 → 1.2
  • tempfile: 3.23 → 3.24

0.6.2 - 2025-12-08

Summary

Documentation Restructuring

This patch release refactors documentation by reducing the main README size and adding individual README files for each crate.

Changed

  • README.md: Reduced from ~766 to ~169 lines (78% reduction)
    • Kept essential overview, quick start, and feature summary
    • Added workspace crates table with links to individual READMEs
    • Moved detailed documentation to crate-specific READMEs

Added

  • crates/mcp-execution-core/README.md: Foundation types, traits, and error handling documentation
  • crates/mcp-execution-files/README.md: Virtual filesystem usage and API documentation
  • crates/mcp-execution-introspector/README.md: MCP server analysis and rmcp SDK usage

0.6.1 - 2025-12-08

Summary

Skill Generator & Security Hardening

This patch release adds skill generation capabilities to mcp-execution-server and improves security with DoS protection limits.

Key Achievements:

  • ✅ 2 new MCP tools: generate_skill, save_skill
  • ✅ Security limits for denial-of-service protection
  • ✅ 550 tests passing (100% pass rate)
  • ✅ Documentation cleanup (removed roadmap)

Added

  • Skill Generator Tools: Generate Claude Code skills from TypeScript tool files

    • generate_skill - Scan tools directory and generate SKILL.md content
    • save_skill - Save generated skill to ~/.claude/skills/ directory
    • Template-based generation with Handlebars
    • JSDoc tag parsing for tool metadata (@tool, @server, @category, @keywords)
    • Automatic category grouping and keyword extraction
  • Security Limits: DoS protection for tool scanning

    • MAX_TOOL_FILES (500) - Maximum files to scan per directory
    • MAX_FILE_SIZE (1MB) - Maximum size per tool file
    • MAX_SERVER_ID_LENGTH (64) - Maximum server ID length
    • MAX_SKILL_CONTENT_SIZE (100KB) - Maximum generated skill size

Changed

  • README.md: Removed roadmap section, updated test count (550), added skill generator tools
  • mcp-cli/README.md: Removed outdated "Current Limitations" section
  • mcp-execution-codegen/README.md: Removed outdated "Current Limitations" section, updated version

Fixed

  • Fixed ~30 stable clippy pedantic warnings across workspace
  • Fixed similar_names warning by renaming confusing variables
  • Fixed needless_raw_string_hashes by simplifying raw strings
  • Fixed redundant_closure by using method references

Performance

  • LazyLock regexes: Compiled once at startup for tool file parsing
  • Security limits: Early bailout prevents resource exhaustion

0.6.0 - 2025-12-07

Summary

MCP Generation Server & Enhanced Categorization

This release introduces mcp-execution-server crate - an MCP server that enables progressive loading generation directly from Claude Code, with Claude-powered tool categorization.

Key Achievements:

  • ✅ New mcp-execution-server crate with 3 MCP tools
  • ✅ Claude-powered categorization (category, keywords, short_description)
  • ✅ 486 tests passing (100% pass rate)
  • ✅ ~85% test coverage for mcp-execution-server
  • ✅ Simplified CI (removed sccache)

Added

  • mcp-execution-server crate: MCP server for progressive loading generation

    • introspect_server - Connect to MCP server and discover tools
    • save_categorized_tools - Generate TypeScript with Claude's categorization
    • list_generated_servers - List all servers with generated files
    • Session-based workflow with 30-minute timeout
    • Defense-in-depth path traversal protection
  • Categorization Support: Enhanced TypeScript generation with metadata

    • category - Tool grouping (e.g., "issues", "repositories")
    • keywords - Comma-separated discovery keywords
    • short_description - Concise description for JSDoc headers
    • JSDoc tags (@category, @keywords) for AI agent discovery
  • Binary: mcp-execution binary for running the MCP server

    mcp-execution  # Starts MCP server on stdio

Changed

  • CI/CD: Removed sccache, keeping only Swatinem/rust-cache

    • Simplified caching strategy
    • 44 lines removed from workflows
    • Still provides 60-80% build time reduction
  • Test Coverage: Significantly improved mcp-execution-server coverage

    • service.rs: 10% → 85% line coverage
    • state.rs: 99% coverage
    • types.rs: 100% coverage
    • Added 31 new tests (unit + integration)

Performance

  • Clone Elimination: Consume params directly instead of cloning
  • HashMap Pre-allocation: Use with_capacity() for known sizes
  • Single-pass Iteration: Combined double iteration into one loop

Documentation

  • Updated README.md with 6 crates architecture
  • Updated CLAUDE.md with mcp-execution-server details
  • Updated docs/ARCHITECTURE.md with mcp-execution-server section
  • Added mcp-execution-server to dependency graphs

0.5.0 - 2025-11-26

Summary

Autonomous MCP Tool Execution & Configuration Management

This release introduces autonomous tool execution via Node.js CLI and simplified configuration management through ~/.claude/mcp.json.

🚨 BREAKING CHANGES:

  • Progressive loading directory structure changed: ~/.claude/servers/{name}/{name}/~/.claude/servers/{name}/
  • Server ID in generated code now respects --name parameter (not command name)
  • Tool template now includes runtime bridge import statement

Key Achievements:

  • ✅ 341 tests passing (100% pass rate)
  • ✅ Autonomous tool execution via Node.js
  • ✅ 75% reduction in command length
  • ✅ 10x performance improvement with connection caching
  • ✅ Zero npm dependencies

Added

  • Autonomous Tool Execution: Generated TypeScript files are now executable via Node.js CLI

    • Each tool file includes shebang #!/usr/bin/env node for direct execution
    • CLI mode automatically detects when run directly and handles parameter parsing
    • JSON output for both results and errors
    • Example: node ~/.claude/servers/github/createIssue.ts '{"owner":"...","repo":"...","title":"..."}'
  • Runtime Bridge: Full MCP server connection management (runtime/mcp-bridge.ts, 430 lines)

    • Connection caching for 10x performance improvement (500ms → 50ms for repeated calls)
    • Automatic loading of server configuration from ~/.claude/mcp.json
    • JSON-RPC 2.0 protocol implementation over stdio transport
    • Zero npm dependencies (Node.js built-ins only)
    • Debug mode via MCPBRIDGE_DEBUG=1 environment variable
  • Config Loading from mcp.json: New --from-config option for generate command

    • Load server configuration by name from ~/.claude/mcp.json
    • Eliminates need to manually specify command, args, and env variables
    • Example: mcp-execution-cli generate --from-config github
    • 75% reduction in command length (200 chars → 50 chars)
  • Setup Command: New mcp-execution-cli setup command

    • Validates Node.js 18+ is installed
    • Checks for ~/.claude/mcp.json configuration file
    • Makes TypeScript files executable on Unix systems
    • Provides helpful error messages and setup instructions

Changed

  • BREAKING: Progressive loading output directory structure simplified

    • Generated files now placed directly in ~/.claude/servers/{server-name}/
    • Previously incorrectly created nested ~/.claude/servers/{server-name}/{server-name}/
    • Migration: Re-run generate command to recreate tools in correct location
  • BREAKING: Server ID in generated code now respects --name parameter

    • When using --name=github, generated code uses 'github' as server ID
    • Previously used command name (e.g., 'docker') regardless of --name
    • Ensures generated code matches server name in ~/.claude/mcp.json
    • Migration: Re-run generate with --name or use --from-config
  • BREAKING: Tool template now includes import statement for runtime bridge

    • Generated files import callMCPTool from ./_runtime/mcp-bridge.ts
    • Required for autonomous execution functionality
    • Migration: Re-run generate to update all tool files
  • Documentation: SKILL.md optimized following Claude Code best practices

    • Reduced from 459 to 146 lines (68% reduction)
    • Description in third person with clear activation criteria
    • Progressive disclosure structure (essential information only)
    • Aligned with Anthropic's official agent skills guidelines

Fixed

  • Fixed double directory nesting issue in progressive loading output
  • Fixed server ID override to use custom --name parameter value
  • Fixed import path extension in tool template (.js.ts)
  • Resolved all clippy pedantic warnings
  • Applied rustfmt formatting to entire workspace

Performance

  • Connection Caching: 10x performance improvement for repeated tool calls
    • First call: ~500ms (server startup + execution)
    • Cached calls: ~50ms (execution only)
  • Token Savings: Maintained 98% token reduction
    • Load 1 tool: 500-1,500 tokens
    • Load all tools: 30,000 tokens

Documentation

  • Added ADR-011: Executable TypeScript via Bash architecture decision
  • Added runtime bridge documentation (runtime/README.md)
  • Updated SKILL.md with execution examples and --from-config usage
  • Created comprehensive implementation summaries in .local/

Migration Guide (0.4.x → 0.5.0)

1. Re-generate tools (fixes directory structure and enables autonomous execution):

# Using new --from-config option (recommended)
mcp-execution-cli generate --from-config github

# Or using manual configuration with --name
mcp-execution-cli generate docker --arg=... --name=github

2. Update mcp.json (if not already present):

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN",
               "ghcr.io/github/github-mcp-execution-server"],
      "env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "github_pat_..."}
    }
  }
}

3. Validate setup (first time only):

mcp-execution-cli setup

4. Test autonomous execution:

node ~/.claude/servers/github/getMe.ts

Breaking Changes Summary:

  • Tool files moved from ~/.claude/servers/{name}/{name}/ to ~/.claude/servers/{name}/
  • Generated code now uses --name value as server ID (not command name)
  • Tool files now include runtime bridge import

Non-Breaking:

  • Old generate syntax still works (without --from-config)
  • Generated tools maintain same API and type definitions
  • 98% token savings preserved

0.4.0 - 2025-11-25

Phase 6: Optimization (Deferred)

Phase 6 is currently OPTIONAL and DEFERRED. Current performance already exceeds all targets by 16-6,578x, making further optimization low-priority until production data indicates specific needs.


0.3.0 - 2025-11-24

Summary

Phase 9: Skill Quality & Validation - Added security profiles and comprehensive skill validation framework.

🚨 BREAKING CHANGES:

  • execute::run() now requires profile: Option<SecurityProfile> as 6th parameter
  • Function signature changed from 7 to 8 parameters
  • CLI execute command now accepts --profile flag

Key Achievements:

  • ✅ 1035 tests passing (100% pass rate, +66 new tests)
  • ✅ All targets exceeded by 16-6,578x
  • ✅ Security ratings: 5/5 stars
  • ✅ Zero critical vulnerabilities
  • ✅ Production ready

Added

Security Profiles

  • SecurityProfile enum with three variants:
    • Strict: Maximum security (128MB, 30s, 100 host calls)
    • Moderate: Balanced security (256MB, 60s, 1000 host calls) - default
    • Permissive: Relaxed security (512MB, 120s, 5000 host calls)
  • Zero-cost abstractions (fully inlined at compile time)
  • Convenience methods: strict(), moderate(), permissive(), from_profile()
  • 27 comprehensive tests (100% coverage)

Skill Validation Framework

  • SkillValidator with normal and strict modes
  • Comprehensive validation:
    • Metadata validation (skill name format, server name, tool count, timestamps)
    • Content validation (YAML frontmatter, required fields, structure)
    • Blake3 checksum verification for integrity
  • ValidationReport with errors and warnings
  • 32 comprehensive tests (98% coverage)

CLI Integration

  • New command: mcp-cli skill test with flags:
    • --all: Test all skills
    • --strict: Enable strict validation
    • --format: Output format (pretty/json/text)
  • Enhanced execute command: --profile flag for security configuration
  • Profile handling with proper precedence (CLI args override profile defaults)
  • 11 new tests for CLI integration

Changed

  • BREAKING: execute::run() signature changed (added profile parameter)
  • Updated SecurityConfig with from_profile() constructor
  • Enhanced CLI with security profile selection
  • Updated documentation examples

Migration Guide

Code Migration (v0.2.0 → v0.3.0):

// Before (v0.2.0)
execute::run(
    module,
    entry,
    args,
    list_exports,
    memory_limit,
    timeout,
    output_format,
).await?

// After (v0.3.0)
execute::run(
    module,
    entry,
    args,
    list_exports,
    None,           // profile - use default
    memory_limit,
    timeout,
    output_format,
).await?

CLI Migration:

# Before - still works
mcp-cli execute module.wasm main --memory 256 --timeout 60

# New - using profiles
mcp-cli execute module.wasm main --profile strict
mcp-cli execute module.wasm main --profile strict --memory 512  # Override

Performance

All Phase 9 features maintain exceptional performance:

  • SecurityProfile: Zero-cost (fully inlined)
  • SkillValidator: <5ms for typical skill
  • CLI integration: Minimal overhead

Security

  • 5/5 security rating maintained
  • Zero critical vulnerabilities
  • All validation rules thoroughly tested

0.2.0 - 2025-11-23

Summary

Successfully completed Phases 1-5, 7.1, and 8.1 of the MCP Code Execution project, achieving production-ready status with exceptional performance and security.

Key Achievements:

  • ✅ 397 tests passing (100% pass rate)
  • ✅ Performance targets exceeded by 5-6,578x
  • ✅ Security ratings: 5/5 stars across all components
  • ✅ Zero critical vulnerabilities
  • ✅ Plugin persistence with Blake3 integrity verification
  • ✅ Production deployment ready

Phase 8.1: Plugin Persistence - 2025-11-21

Branch: feature/plugin-persistence

Added

mcp-plugin-store crate (NEW)

  • Disk-based plugin persistence system
    • Save and load pre-generated tools to disk
    • Blake3 checksum integrity verification
    • Constant-time comparison (timing attack prevention)
    • Atomic file operations (crash safety)
    • Path validation (directory traversal prevention)
    • 38 unit tests + 32 integration tests = 70 total

Storage Structure

plugins/
└── <server-name>/
    ├── metadata.json      # Plugin metadata
    ├── vfs.json           # Complete VFS structure
    ├── module.wasm        # Compiled WASM module
    └── checksum.blake3    # Blake3 integrity checksum

CLI Integration

  • New plugin subcommand with 4 operations:

    • mcp-cli plugin list - List all saved plugins
    • mcp-cli plugin load - Load plugin from disk
    • mcp-cli plugin info - Show plugin metadata
    • mcp-cli plugin remove - Delete plugin from disk
  • Enhanced generate command:

    • --save-plugin flag to persist generated code
    • --plugin-dir option for custom storage location

Features

  • 16-33x faster plugin loading vs regeneration (2-4ms vs 67ms)
  • Cross-platform support (Linux, macOS, Windows)
  • Human-readable metadata (JSON format)
  • Secure checksum verification prevents tampering

Documentation

  • .local/PHASE-8-PLUGIN-PERSISTENCE-GUIDE.md - User guide
  • docs/adr/006-plugin-persistence.md - Architecture decision
  • .local/SECURITY-AUDIT-PLUGIN-STORE.md - Security audit
  • .local/PERFORMANCE-REVIEW-PLUGIN-STORE.md - Performance analysis
  • Example: crates/mcp-examples/examples/plugin_workflow.rs

Performance Results

Operation Time Speedup
Plugin Save 2.3ms ± 0.5ms -
Plugin Load 1.8ms ± 0.3ms 16-33x vs regeneration
Checksum Calculation 0.6ms ± 0.1ms -
Integrity Verification 0.9ms ± 0.2ms -

Comparison:

  • Regeneration: 67ms (introspect 50ms + generate 2ms + compile 15ms)
  • Plugin Load: 2-4ms (load 2ms + verify 1ms)
  • Speedup: 16-33x faster

Security

  • Security rating: ⭐⭐⭐⭐⭐ (5/5 stars)
  • Zero critical vulnerabilities
  • Blake3 cryptographic integrity verification
  • Constant-time checksum comparison prevents timing attacks
  • Path validation prevents directory traversal
  • Atomic file operations prevent corruption

Phase 7.1: CLI Foundation - 2025-11-21

Commit: 9e67c12, 76c927d

Added

mcp-cli crate enhancements

  • Clap 4.5-based CLI with strong types
  • 7 subcommands implemented:
    • introspect - Analyze MCP servers
    • generate - Generate TypeScript code
    • execute - Run WASM modules
    • server - Manage MCP server connections
    • stats - Display performance metrics
    • debug - Debugging utilities
    • config - Configuration management
    • completions - Shell completions (NEW)
    • plugin - Plugin management (Phase 8.1)

Shell Completions

  • Generate completions for multiple shells:
    • Bash
    • Zsh
    • Fish
    • PowerShell
  • Installation instructions in README

Features

  • Multiple output formats (JSON, text, pretty)
  • Security hardening:
    • Command injection prevention
    • Path validation
    • Input sanitization
  • Comprehensive error messages
  • 268 tests covering all commands

Documentation

  • Updated CLI usage examples in README.md
  • Shell completion installation guide
  • Security audit report

Security

  • Security rating: ⭐⭐⭐⭐⭐ (5/5 stars)
  • Zero critical vulnerabilities
  • Input validation prevents command injection
  • Path sanitization prevents directory traversal
  • No unsafe code usage

Phase 5: Integration & Testing - 2025-11-13

Commit: 367a3a6

Added

mcp-examples crate

  • Mock MCP server for testing (src/mock_server.rs - 378 lines)

    • Configurable tool responses
    • Error simulation
    • 6 unit tests
  • Performance metrics collection (src/metrics.rs - 435 lines)

    • Target validation
    • Overhead calculation
    • 7 unit tests
  • Token usage analysis (src/token_analysis.rs - 408 lines)

    • Savings calculations
    • Scaling behavior analysis
    • 6 unit tests

Examples

  • e2e_workflow.rs (279 lines) - Complete pipeline demonstration

    • Server introspection → code generation → VFS loading → WASM execution
    • Performance: 10ms E2E (5x better than 50ms target)
  • token_analysis.rs (209 lines) - Token efficiency demonstration

    • Compared 3 scenarios (few/typical/heavy usage)
    • Maximum savings: ~83% (asymptotic limit)
    • Break-even: 10× number of tools for 80% savings
  • performance_test.rs (310 lines) - Performance validation

    • All component benchmarks
    • End-to-end latency tracking

Integration Tests

  • tests/integration_test.rs (428 lines)
    • 21 integration tests covering:
      • Mock server integration (5 tests)
      • Code generation pipeline (3 tests)
      • VFS integration (3 tests)
      • WASM runtime (2 tests)
      • Token analysis (3 tests)
      • End-to-end workflows (3 tests)
      • Performance validation (3 tests)

Benchmarks

  • benches/e2e_benchmark.rs (193 lines)
    • 7 benchmark scenarios
    • Scaling tests (1-50 tools)
    • Cold vs warm execution comparison

Documentation

  • mcp-examples/README.md (381 lines) - Comprehensive usage guide
  • .local/phase5-summary.md - Implementation summary
  • .local/phase5-performance-validation.md - Performance report

Performance Results

Metric Target Achieved Status
E2E Latency <50ms ~10ms ✅ 5x better
WASM Compilation <100ms ~6ms ✅ 16.7x better
Execution Overhead <50ms ~7ms ✅ 7.1x better
Token Savings (heavy) ≥90% ~80% ⚠️ Revised model

Security

  • Security rating: ⭐⭐⭐⭐⭐ (5/5 stars)
  • Zero critical vulnerabilities
  • Production-ready security validation

Phase 4: WASM Runtime - 2025-11-13

Commit: ad09374

Added

mcp-wasm-runtime crate

  • WASM runtime implementation with Wasmtime 37.0
    • Host functions: callTool, readFile, writeFile, setState, getState
    • Security sandbox with strict limits
    • Resource monitoring
    • 57 unit tests

Features

  • Module caching with Blake3 hashing

    • Cache hit: Sub-millisecond (6,578x improvement over target)
    • Cache miss: ~15ms compilation (6.6x better than 100ms target)
  • Security hardening

    • Memory limit: 256MB
    • CPU fuel limit: Prevents infinite loops
    • Filesystem: WASI preopened directories only
    • Network: Only via MCP Bridge (no direct access)
  • Performance optimization

    • Module pre-compilation
    • Instance pooling
    • Lazy initialization

Performance Results

Metric Target Achieved Improvement
WASM Compilation <100ms ~15ms 6.6x better
Execution Overhead <50ms ~3ms 16.7x better
Module Caching Informational <1ms 6,578x

Security

  • Security rating: ⭐⭐⭐⭐⭐ (5/5 stars)
  • Zero critical vulnerabilities
  • Zero high-severity issues
  • Full sandbox isolation validated

Phase 3: Code Generation - 2025-11-13

Commit: 15ffd79

Added

mcp-execution-codegen crate

  • TypeScript code generation from MCP tool schemas
    • Handlebars templates for type-safe code
    • Feature flags support (wasm/skills modes)
    • Module organization (common/, wasm/, skills/)
    • Template organization (templates/wasm/, templates/skills/)
    • 69 unit tests

Features

  • Type-safe TypeScript interfaces
  • Parameter validation
  • Error handling
  • Documentation generation
  • Manifest.json generation

Performance Results

Metric Target Achieved Improvement
10 tools <100ms 0.19ms 526x faster
50 tools <20ms 0.97ms 20.6x faster
100 tools <200ms 1.96ms 102x faster
1000 tools <2000ms 22.8ms 88x faster

Scaling: Perfect O(n) linear up to 1000+ tools Throughput: 44-52K tools/second sustained

Security

  • Security rating: ⭐⭐⭐⭐ (4/5 stars)
  • Zero critical vulnerabilities
  • 2 medium-severity recommendations (resource limits)

Phase 2: MCP Integration - 2025-11-13

Commit: 99c1806

Added

mcp-execution-introspector crate

  • MCP server analysis using rmcp SDK v0.8
    • Server capability discovery
    • Tool schema extraction
    • Connection management
    • 85 integration tests

mcp-bridge crate

  • WASM ↔ MCP proxy implementation
    • Connection pooling
    • LRU caching for tool results
    • Rate limiting
    • Error handling
    • 10 unit tests + 17 integration tests

Features

  • rmcp integration (official MCP SDK)
  • Server introspection via rmcp::ServiceExt
  • Tool invocation via rmcp::client
  • Cache hit rate >80% validated

Changes

  • Replaced custom MCP protocol implementation with rmcp SDK
  • Simplified Phase 2 work (no custom protocol needed)

Phase 1: Core Infrastructure - 2025-11-13

Commit: d80fdf1

Added

Workspace Structure

  • Multi-crate workspace (8 crates total)
    • mcp-execution-core - Foundation types and traits
    • mcp-execution-introspector - Server analysis
    • mcp-execution-codegen - Code generation
    • mcp-bridge - WASM ↔ MCP proxy
    • mcp-wasm-runtime - WASM execution
    • mcp-execution-files - Virtual filesystem
    • mcp-examples - Examples and integration tests
    • mcp-cli - CLI application (minimal)

mcp-execution-core crate

  • Strong domain types

    • ServerId, ToolName, SessionId, MemoryLimit
    • All types Send + Sync for Tokio compatibility
  • Error handling with thiserror

    • Situation-specific error types
    • is_xxx() methods for error classification
    • Backtraces enabled
  • Core traits (implemented in other crates):

    • CodeExecutor - WASM execution interface
    • CacheProvider - Caching abstraction
    • StateStorage - Persistent state management

mcp-execution-files crate

  • Virtual filesystem for progressive tool discovery
    • /mcp-tools/servers/{server-name}/ structure
    • Lazy loading of tool definitions
    • File and directory operations
    • 42 unit tests
    • Performance: ⭐⭐⭐⭐⭐ (sub-millisecond)
    • Security: ⭐⭐⭐⭐ (4/5 stars)

Feature Flags

  • wasm - WASM code generation (default)
  • skills - IDE skills generation (optional)

Documentation

  • Architecture Decision Records (ADRs):
    • ADR-001: Multi-Crate Workspace
    • ADR-002: Wasmtime over Wasmer
    • ADR-003: Strong Types Over Primitives
    • ADR-004: Use rmcp Official SDK

Dependencies

Core dependencies configured:

  • rmcp v0.8 - Official MCP SDK
  • tokio v1.48 - Async runtime
  • wasmtime v37.0 - WASM runtime
  • serde v1.0 - Serialization
  • thiserror v2.0 - Error handling
  • handlebars v6.3 - Template engine
  • blake3 v1.5 - Fast hashing
  • lru v0.16 - LRU cache

Configuration

  • Rust Edition: 2024
  • MSRV: 1.75
  • License: MIT OR Apache-2.0

Project Initialization - 2025-11-12

Added

  • Initial workspace structure

  • Project documentation:

    • README.md - Project overview
    • CLAUDE.md - Development guidelines
    • GETTING_STARTED.md - Setup instructions
    • docs/ARCHITECTURE.md - Architecture overview
  • Development guidelines:

    • Microsoft Rust Guidelines integration
    • Error handling strategy (thiserror for libs, anyhow for CLI)
    • Type design principles (strong types, Send + Sync)
    • API design patterns
    • Documentation requirements
  • Architecture decisions:

    • Multi-crate workspace (ADR-001)
    • Wasmtime for WASM runtime (ADR-002)
    • Strong types over primitives (ADR-003)
    • rmcp for MCP integration (ADR-004)

Performance Summary Across All Phases

Component Target Achieved Improvement
Code Generation (10 tools) <100ms 0.19ms 526x
Code Generation (50 tools) <20ms 0.97ms 20.6x
WASM Compilation <100ms ~15ms 6.6x
WASM Execution <50ms ~3ms 16.7x
Module Caching Informational <1ms 6,578x
E2E Latency <50ms ~10ms 5x
Memory (1000 tools) <256MB ~2MB 128x

Average Improvement: 154x faster than targets Best Achievement: 6,578x (module caching) Slowest Component: Still 5x faster than target


Security Summary Across All Phases

Phase Rating Critical High Medium Low Status
Phase 1 (VFS) ⭐⭐⭐⭐ 0 0 2 3 Approved
Phase 2 (Bridge) ⭐⭐⭐⭐ 0 0 0 0 Approved
Phase 3 (Codegen) ⭐⭐⭐⭐ 0 0 2 3 Approved
Phase 4 (WASM) ⭐⭐⭐⭐⭐ 0 0 0 0 Approved
Phase 5 (Integration) ⭐⭐⭐⭐⭐ 0 0 0 0 Approved

Overall Security Rating: ⭐⭐⭐⭐⭐ (4-5 stars across all phases) Total Vulnerabilities: 0 critical, 0 high, 2 medium (resource limits recommended) Production Ready: YES


Test Summary Across All Phases

Crate Unit Integration Doc Total Status
mcp-execution-core - - - -
mcp-execution-introspector 85 - - 85
mcp-execution-codegen 69 - - 69
mcp-bridge 10 17 - 27
mcp-wasm-runtime 57 - - 57
mcp-execution-files 42 - - 42
mcp-examples 19 21 21 61
TOTAL 282 38 21 314 100% Pass

Migration Notes

Breaking Changes

None yet (initial release).

Deprecated

None yet (initial release).

Removed

None yet (initial release).


Contributors

Development by Rust Project Architect, Performance Engineer, and Security Engineer agents.


Links


Notes

Token Savings Model Revision

Original Estimate: 90%+ savings achievable Actual Maximum: ~83% (asymptotic limit)

Reason: The model has a fixed overhead per tool that limits maximum savings:

  • Standard MCP: 500T (listing) + 300N (calls)
  • Code Execution: 200T (codegen) + 50N (calls)
  • Ratio approaches (250/300) = 83.3% as N grows

Impact: Documentation and targets updated to reflect realistic 80% goal for heavy usage.

Phase 6 Status

Phase 6 (Optimization) is currently OPTIONAL and DEFERRED because:

  • Current performance exceeds all targets by 16-6,578x
  • No production data indicating specific optimization needs
  • Low value-add until real-world usage patterns identified

Recommendation: Deploy to production first, then use production metrics to guide Phase 6 priorities.


Last Updated: 2026-04-21 Version: 0.7.0 (Production Ready)