kodegen-tools-config
KODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents.
Configuration management MCP server for AI code generation agents. Part of the KODEGEN.ᴀɪ ecosystem.
Features
- 🔧 Dynamic Configuration Management - Get and set server configuration via MCP tools
- 🔒 Security Controls - Manage blocked commands, allowed/denied directories
- 📊 System Diagnostics - Real-time system information (CPU, memory, platform)
- 🚀 HTTP/HTTPS Support - Flexible transport with optional TLS
- 🎯 Client Tracking - Track and manage MCP client connections
- ⚡ Debounced Persistence - Efficient config writes with 300ms debouncing
Installation
From Source
The compiled binary will be at target/release/kodegen-config.
Prerequisites
- Rust nightly toolchain
- Cargo
Usage
Starting the Server
HTTP (default):
HTTPS with TLS:
Environment Variables
Override security-critical settings via environment variables:
Unix/macOS:
Windows:
$env:KODEGEN_ALLOWED_DIRS="C:\Users\user\projects;C:\Users\user\workspace"
$env:KODEGEN_DENIED_DIRS="C:\Users\user\secrets;C:\Windows"
MCP Tools
get_config
Retrieve complete server configuration including security settings, resource limits, and system diagnostics.
Example Request:
Example Response:
set_config_value
Update a specific configuration value.
Example Requests:
// Change file read limit
// Update blocked commands
// Set allowed directories (empty array = full access)
// Adjust fuzzy search threshold (0-100)
Configuration Keys
| Key | Type | Description | Default |
|---|---|---|---|
blocked_commands |
Array | Commands that cannot be executed | ["rm", "sudo", "format", ...] |
default_shell |
String | Shell for command execution | /bin/sh (Unix) or powershell.exe (Windows) |
allowed_directories |
Array | Directories server can access (empty = full access) | [] |
denied_directories |
Array | Directories server cannot access | [] |
file_read_line_limit |
Number | Max lines for file read operations | 1000 |
file_write_line_limit |
Number | Max lines per file write operation | 50 |
fuzzy_search_threshold |
Number (0-100) | Minimum similarity for fuzzy search | 70 |
http_connection_timeout_secs |
Number | HTTP connection timeout | 5 |
Configuration File
Configuration is persisted to ~/.kodegen/config.json with automatic debounced writes (300ms).
Example config.json:
Development
Build
Run Tests
# All tests
# Specific test
# Integration example
Code Quality
# Format
# Lint
# Check
Architecture
This package implements its own HTTP server because it cannot depend on kodegen_server_http (which depends on this package's ConfigManager - circular dependency).
Key Components:
- ConfigManager: Thread-safe configuration with debounced persistence
- GetConfigTool: Retrieves configuration and live system diagnostics
- SetConfigValueTool: Updates configuration with validation
- HTTP Server: Axum-based MCP transport with CORS and TLS support
License
Dual-licensed under your choice of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Links
Built with ❤️ by KODEGEN.ᴀɪ