| Crates.io | kodegen_tools_filesystem |
| lib.rs | kodegen_tools_filesystem |
| version | 0.10.10 |
| created_at | 2025-10-29 03:26:36.071142+00 |
| updated_at | 2026-01-02 15:07:14.539349+00 |
| description | KODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents. |
| homepage | https://kodegen.ai |
| repository | https://github.com/cyrup-ai/kodegen-tools-filesystem |
| max_upload_size | |
| id | 1906017 |
| size | 4,585,408 |
Memory-efficient, blazing-fast MCP (Model Context Protocol) filesystem tools for AI code generation agents.
kodegen-tools-filesystem provides a comprehensive suite of 11 filesystem and search tools exposed via the Model Context Protocol (MCP). Built on top of ripgrep's powerful search capabilities, it offers high-performance file operations, directory management, and advanced code search functionality for AI agents.
git clone https://github.com/cyrup-ai/kodegen-tools-filesystem
cd kodegen-tools-filesystem
cargo build --release
The compiled binary will be available at target/release/kodegen-filesystem.
# Run with default settings
cargo run --bin kodegen-filesystem
# Run with custom allowed directories
KODEGEN_ALLOWED_DIRS="/path/to/workspace:/another/path" cargo run --bin kodegen-filesystem
# Run the release build
./target/release/kodegen-filesystem
The server respects the following environment variables:
| Variable | Description | Default |
|---|---|---|
KODEGEN_ALLOWED_DIRS |
Colon-separated list of allowed directories | Empty (all paths allowed) |
KODEGEN_DENIED_DIRS |
Colon-separated list of denied directories | Empty (no paths denied) |
Path Access Rules:
KODEGEN_ALLOWED_DIRS is set, only those paths are accessibleThe server exposes 11 MCP tools:
| Category | Tool | Description |
|---|---|---|
| File Ops | fs_read_file |
Read file contents with offset/length support |
fs_read_multiple_files |
Batch read multiple files | |
fs_write_file |
Write or append to files | |
fs_edit_block |
Replace text blocks surgically | |
fs_move_file |
Move or rename files | |
fs_delete_file |
Delete files | |
fs_get_file_info |
Get file metadata | |
| Directory | fs_create_directory |
Create directories recursively |
fs_list_directory |
List directory contents with depth | |
fs_delete_directory |
Delete directories recursively | |
| Search | fs_search |
Fast blocking search (files or content) |
# Comprehensive demo of all 11 tools
cargo run --example filesystem_demo
# Search examples
cargo run --example direct_search_basics
cargo run --example direct_search_patterns
cargo run --example direct_search_files
cargo run --example direct_search_output
cargo run --example direct_search_advanced
use kodegen_mcp_client::tools;
use serde_json::json;
// Perform a blocking search
let results = client.call_tool(
tools::FS_SEARCH,
json!({
"path": "/path/to/search",
"pattern": "TODO",
"search_in": "content",
"case_mode": "insensitive",
"max_results": 100
})
).await?;
# Debug build
cargo build
# Release build
cargo build --release
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
# Format code
cargo fmt
# Run linter
cargo clippy
# Auto-fix clippy warnings
cargo clippy --fix
read_file, write_file, etc.) is a self-contained modulekodegen_server_httpThe search system uses a blocking model powered by ripgrep:
fs_search performs synchronous search with immediate resultsLicensed under either of:
at your option.
Contributions are welcome! Please feel free to submit a Pull Request.
Built with ❤️ by KODEGEN.ᴀɪ