| Crates.io | kodegen |
| lib.rs | kodegen |
| version | 0.10.15 |
| created_at | 2025-10-29 01:20:05.834897+00 |
| updated_at | 2026-01-02 15:17:48.735754+00 |
| description | KODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents. |
| homepage | https://kodegen.ai |
| repository | https://github.com/cyrup-ai/kodegen |
| max_upload_size | |
| id | 1905907 |
| size | 4,193,093 |
Context-Effecient, Blazing-Fast MCP Dev Tools
KODEGEN.ᴀɪ delivers a blazing-fast Rust-native MCP Server (Model Context Protocol) with 100+ elite auto-coding tools designed for professional, autonomous code generation and predictable high-quality results. Every tool has been thoughtfully hyper-optimized for speed (code it faster) and context efficiency (code it cheaper).
KODEGEN.ᴀɪ is built for context efficient LLM code generation that's fast, reliable and memory-efficient.
14 filesystem tools optimized for coding workflows with atomic operations and concurrent traversal. Read massive files with offsets, batch-process multiple files, search codebases with streaming results, and make surgical edits with diff precision.
20 comprehensive git tools powered by Gitoxide for blazing-fast repository operations. Init, clone, branch, commit, checkout, fetch, merge, and manage worktrees—all with async-first design and production-grade error handling.
Full VT100 pseudoterminal sessions with smart state detection and real-time output streaming. Perfect when AI agents need full system access for running builds, executing tests, or managing deployments.
Stateful thinking sessions with branching, revision, and unlimited context across extended problem-solving. Break down complex problems with actor-model concurrency for lock-free performance.
N-depth agent delegation with full prompt control for hierarchical, coordinated agent pyramids. Spawn specialized Claude sub-agents for deep research, complex code generation, or parallel analysis.
4 tools for autonomous web documentation crawling with full-text search. Background crawling with Tantivy indexing, rate limiting, and multi-format output (Markdown/HTML/JSON). Perfect for building searchable knowledge bases from documentation sites.
16 tools for comprehensive GitHub API integration. Create and manage issues, pull requests, reviews, and comments. Search code across repositories, manage PRs, request Copilot reviews, and automate entire GitHub workflows from your AI agents.
Track tool usage, analyze patterns, and optimize workflows with built-in introspection. Every invocation is tracked for AI self-improvement.
Create and manage reusable prompt templates with Jinja2 rendering and schema validation. Build prompt libraries and standardize agent instructions programmatically.
Install KODEGEN.ᴀɪ with a single command:
curl -fsSL https://kodegen.ai/install | sh
This will:
kodegen binaryThe installer automatically runs kodegen install which configures:
claude_desktop_config.jsonFor manual installation or to build from source:
# Clone the repository
git clone https://github.com/cyrup-ai/kodegen
cd kodegen
# Run installation script (handles all binaries with verification)
./install.sh
The script will:
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"kodegen": {
"command": "kodegen"
}
}
}
Control which tools are active at runtime by passing arguments to the kodegen binary:
Method 1: Comma-Separated List
{
"mcpServers": {
"kodegen": {
"command": "kodegen",
"args": ["--tools", "filesystem,terminal,citescrape"]
}
}
}
Method 2: Multiple Flags
{
"mcpServers": {
"kodegen": {
"command": "kodegen",
"args": [
"--tool", "filesystem",
"--tool", "terminal",
"--tool", "citescrape"
]
}
}
}
Available Tool Categories:
filesystem - 14 file operation toolsterminal - 5 terminal/process management toolsprocess - 2 process management toolssequential_thinking - 1 reasoning chain toolclaude_agent - 5 sub-agent orchestration toolscitescrape - 4 web scraping and search toolsprompt - 4 prompt template management toolsintrospection - 2 observability toolsgit - 20 git repository tools (init, clone, branch, commit, checkout, fetch, merge, worktree operations)github - 16 GitHub API tools (issues, PRs, reviews, comments, code search, Copilot integration)config - 2 configuration management tools (always enabled)If no arguments are provided, all compiled tool categories are enabled by default.
AI agents can modify configuration at runtime:
set_config_value({
"key": "file_read_line_limit",
"value": 5000
})
Configuration Options:
file_read_line_limit - Maximum lines to read per file (default: 2000)file_write_line_limit - Maximum lines to write per operation (default: 1000)fuzzy_search_threshold - Similarity threshold for fuzzy matching (default: 0.8)blocked_commands - List of commands to block in terminal sessionsallowed_paths - Whitelist of paths for file operationsmax_search_results - Maximum search results to return (default: 100)terminal_timeout - Terminal command timeout in seconds (default: 300)Create hyper-optimized binaries by compiling only the tools you need:
# Build with only filesystem and terminal tools
cargo build --release \
--no-default-features \
--features "filesystem,terminal"
# Install custom build
cargo install --path . \
--no-default-features \
--features "filesystem,terminal,sequential_thinking"
Available Feature Flags:
filesystem - 14 tools (~800KB)terminal - 5 tools (~300KB)sequential_thinking - 1 tool (~150KB)claude_agent - 5 tools (~400KB)citescrape - 3 tools (~600KB)prompt - 4 tools (~250KB)introspection - 2 tools (~100KB)process - 2 tools (~150KB)Minimal Coding Assistant (Filesystem + Terminal)
cargo install --path . \
--no-default-features \
--features "filesystem,terminal"
# Binary: ~1.2MB (vs 3.5MB full build)
# Perfect for: Basic file operations and command execution
Thinking Agent (Filesystem + Sequential Thinking + Agents)
cargo install --path . \
--no-default-features \
--features "filesystem,sequential_thinking,claude_agent"
# Binary: ~1.8MB
# Perfect for: Research, analysis, and multi-step reasoning
Documentation Crawler (Filesystem + Citescrape + Sequential Thinking)
cargo install --path . \
--no-default-features \
--features "filesystem,citescrape,sequential_thinking"
# Binary: ~2.5MB
# Perfect for: Building searchable docs from websites, knowledge base creation
Full-Featured Build (Default)
cargo install --path .
# Binary: ~3.5MB
# Includes: All 33 tools across 7 categories
For maximum optimization:
# 1. Build with only filesystem and terminal features
cargo install --path . \
--no-default-features \
--features "filesystem,terminal"
# 2. Configure MCP client to use only filesystem tools
{
"mcpServers": {
"kodegen": {
"command": "kodegen",
"args": ["--tool", "filesystem"]
}
}
}
# Result: Smallest binary + fastest startup + minimal memory footprint
| Build Configuration | Binary Size | Startup Time | Memory Usage |
|---|---|---|---|
| Full Build (All Features) | ~3.5MB | ~25ms | ~8MB |
| Minimal (filesystem + terminal) | ~1.2MB | ~12ms | ~4MB |
| Filesystem Only | ~900KB | ~8ms | ~3MB |
Note: Measurements are approximate and may vary by platform.
fs_read_fileRead file contents with offset/length support for massive files.
fs_read_file({
"path": "src/main.rs",
"offset": 0,
"limit": 100
})
fs_write_fileWrite or append content to files with atomic operations.
fs_write_file({
"path": "output.txt",
"content": "Hello, world!",
"append": false
})
fs_edit_blockSurgical text replacement with automatic fuzzy matching.
fs_edit_block({
"path": "src/main.rs",
"old_string": "fn process_data",
"new_string": "async fn process_data"
})
Other filesystem tools: fs_read_multiple_files, fs_move_file, fs_delete_file, fs_delete_directory, fs_create_directory, fs_get_file_info, fs_list_directory, fs_search
start_terminal_commandSpawn full VT100 pseudoterminal session.
start_terminal_command({
"command": "cargo build --release",
"working_directory": "."
})
Other terminal tools: read_terminal_output, send_terminal_input, stop_terminal_command, list_terminal_commands
sequential_thinkingBreak down complex problems with stateful reasoning sessions.
sequential_thinking({
"thought": "Analyzing the architecture patterns...",
"thought_number": 1,
"session_id": "planning-session-1"
})
spawn_claude_agentSpawn specialized Claude sub-agents for delegation.
spawn_claude_agent({
"task": "Research API design patterns for Rust",
"prompt_template": "research_agent"
})
Other agent tools: read_claude_agent_output, send_claude_agent_prompt, terminate_claude_agent_session, list_claude_agents
prompt_addCreate reusable prompt templates with Jinja2.
add_prompt({
"name": "code_review",
"template": "Review this code: {{ code }}",
"description": "Code review prompt"
})
Other prompt tools: prompt_edit, prompt_delete, prompt_get
inspect_usage_stats - Track tool usage and performance metricsinspect_tool_calls - Inspect recent tool invocationslist_processes - List system processes with filteringkill_process - Terminate processes by PIDget_config - Retrieve current configuration valuesset_config_value - Modify configuration at runtime// 1. Search for function to refactor
start_search({
"pattern": "fn process_data",
"path": "src/"
})
// 2. Read the file
read_file({
"path": "src/processor.rs"
})
// 3. Make the function async
edit_block({
"path": "src/processor.rs",
"old_string": "fn process_data(input: &str) -> Result<Data>",
"new_string": "async fn process_data(input: &str) -> Result<Data>"
})
// 4. Run tests
start_terminal_command({
"command": "cargo test"
})
// 5. Check output
read_terminal_output({
"session_id": "terminal-123"
})
// Spawn a research agent
spawn_claude_agent({
"task": "Research best practices for error handling in Rust async code"
})
// Spawn another for code generation
spawn_claude_agent({
"task": "Generate example error handling code based on research findings"
})
// Monitor agents
list_claude_agents({})
// Read results
read_claude_agent_output({
"agent_id": "agent-001"
})
// Start thinking session
sequential_thinking({
"session_id": "architecture-planning",
"thought": "Need to design a scalable API layer",
"thought_number": 1
})
// Branch to explore alternatives
sequential_thinking({
"session_id": "architecture-planning",
"thought": "Option A: REST API with versioning",
"thought_number": 2,
"branch_from": 1
})
// Revise earlier thinking
sequential_thinking({
"session_id": "architecture-planning",
"thought": "Actually, REST is better for our use case due to caching",
"thought_number": 4,
"revises": 2
})
The stdio server logs RMCP initialization and transport errors at INFO/ERROR levels:
Connection failures during startup:
ERROR Failed to connect to filesystem server at https://mcp.kodegen.ai:30438/mcp: connection closed during init (connection closed during: initialize response)
WARN 2 of 7 category servers failed to connect and are offline. Server starting with reduced functionality.
Session/transport failures during tool calls:
ERROR Session/transport broken for tool 'read_file' (category: filesystem): connection closed during init - connection closed during: tool call response. Attempting recovery...
INFO Reconnection successful for category 'filesystem'. Retrying tool call 'read_file'...
INFO Tool call 'read_file' succeeded after recovery
Timeout errors:
ERROR Tool 'complex_search' timed out after 30s (operation: call_tool)
Some categories offline:
list_tools resultsAll categories offline:
Failed to connect to all 7 category servers. See errors above.The stdio server automatically recovers from:
No recovery for:
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
git clone https://github.com/YOUR_USERNAME/kodegen.gitgit checkout -b feature/amazing-toolcargo testgit push origin feature/amazing-toolpackages/filesystem/src/read_file.rsTool traitprompt() methods for LLM learningKODEGEN.ᴀɪ is dual-licensed under Apache-2.0 and MIT. See LICENSE.md for details.
Made with (love) by David Maple
Welcome to KODEGEN.ᴀɪ! 🚀