#claude #mcp #agent #terminal

kodegen_bundler_autoconfig

KODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents

17 releases (4 breaking)

Uses new Rust 2024

0.10.10 Jan 2, 2026
0.10.9 Dec 26, 2025
0.9.0 Dec 8, 2025
0.5.0 Nov 29, 2025

#2280 in Development tools


Used in 3 crates (2 directly)

Apache-2.0 OR MIT

51KB
1K SLoC

Kodegen AI Banner

KODEGEN.ᴀɪ Client Auto-Configuration

Automatic configuration system for MCP clients (Claude Desktop, Windsurf, Cursor, etc.) to seamlessly integrate with KODEGEN.ᴀɪ.

Overview

This service automatically detects when MCP-compatible AI tools are installed on your system and configures them to use KODEGEN.ᴀɪ - no manual setup required.

Supported Clients

  • Claude Desktop - Windows, macOS
  • Windsurf - Windows, macOS, Linux
  • Cursor - Windows, macOS, Linux
  • Zed - macOS, Linux
  • Roo Code (VSCode extension) - Windows, macOS, Linux

How It Works

  1. Continuous Monitoring: Watches for MCP client installation directories
  2. Instant Detection: Detects when a new AI tool is installed
  3. Automatic Configuration: Injects KODEGEN.ᴀɪ server configuration
  4. Zero User Intervention: Everything happens transparently in the background

Configuration Formats

Each client uses a slightly different configuration format, but we handle all the complexity:

Standard Format (Claude, Windsurf, Cursor)

{
  "mcpServers": {
    "kodegen": {
      "command": "kodegen",
      "args": ["--stdio"],
      "env": {}
    }
  }
}

Zed Format

{
  "context_servers": {
    "kodegen": {
      "command": {
        "path": "kodegen",
        "args": ["--stdio"]
      },
      "settings": {}
    }
  }
}

HTTP Transport (Roo Code)

{
  "mcpServers": {
    "kodegen": {
      "type": "streamable-http",
      "url": "https://kodegen.kodegen.dev:8443"
    }
  }
}

Architecture

The auto-configuration system uses:

  • File System Watching: Efficient monitoring with notify and watchexec
  • Debouncing: Prevents duplicate processing of rapid file changes
  • Backup Creation: Always backs up existing configs before modification
  • Idempotency: Won't re-inject if KODEGEN.ᴀɪ is already configured

Development

Adding Support for New Clients

  1. Create a new file in src/clients/your_client.rs
  2. Implement the ClientConfigPlugin trait:
pub struct YourClientPlugin;

impl ClientConfigPlugin for YourClientPlugin {
    fn client_id(&self) -> &str { "your-client" }
    fn client_name(&self) -> &str { "Your Client" }
    fn watch_paths(&self) -> Vec<PathBuf> { /* ... */ }
    fn config_paths(&self) -> Vec<ConfigPath> { /* ... */ }
    fn is_installed(&self, path: &PathBuf) -> bool { /* ... */ }
    fn inject_kodegen(&self, config: &str, format: ConfigFormat) -> Result<String> { /* ... */ }
}
  1. Add to src/clients/mod.rs:
pub mod your_client;

pub fn all_clients() -> Vec<Arc<dyn ClientConfigPlugin>> {
    vec![
        // ... existing clients
        Arc::new(your_client::YourClientPlugin),
    ]
}

Testing

# Run tests
cargo test

# Run with debug logging
RUST_LOG=debug cargo run

# Test specific client
RUST_LOG=kodegen_client_autoconfig=trace cargo run

Security Considerations

  • Only modifies configuration files in user-accessible directories
  • Creates backups before any modifications
  • Never modifies system files or requires elevated privileges
  • All operations are idempotent and reversible

Performance

  • Written in Rust for minimal resource usage
  • Efficient file watching with debouncing
  • Typically uses < 10MB RAM while monitoring
  • Near-zero CPU usage when idle

Dependencies

~27–46MB
~654K SLoC