| Crates.io | kodegen_tools_process |
| lib.rs | kodegen_tools_process |
| version | 0.10.10 |
| created_at | 2025-11-03 17:24:44.628906+00 |
| updated_at | 2026-01-02 15:04:17.089032+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-process |
| max_upload_size | |
| id | 1915020 |
| size | 4,062,184 |
Memory-efficient, blazing-fast MCP (Model Context Protocol) tools for process management in code generation agents.
Part of the KODEGEN.ᴀɪ ecosystem.
process_listList all running processes with detailed metrics:
{
"filter": "python",
"limit": 10
}
Returns:
Results are sorted by CPU usage (highest first).
process_killTerminate a process by PID:
{
"pid": 12345
}
Sends SIGKILL signal for immediate termination. Use with caution as this prevents graceful shutdown.
# Install Rust nightly
rustup toolchain install nightly
rustup override set nightly
# Clone the repository
git clone https://github.com/cyrup-ai/kodegen-tools-process
cd kodegen-tools-process
# Build the library
cargo build --release
# Build the server binary
cargo build --release --bin kodegen-process
# Start server on default port (30447)
cargo run --bin kodegen-process -- --http 127.0.0.1:30447
The server exposes MCP tools via HTTP at http://127.0.0.1:30447/mcp.
use kodegen_mcp_client::{create_streamable_client, tools};
use serde_json::json;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Connect to server with session headers
use reqwest::header::HeaderMap;
let (client, conn) = create_streamable_client("http://127.0.0.1:30447/mcp", HeaderMap::new()).await?;
// List all processes
let result = client.call_tool(tools::PROCESS_LIST, json!({})).await?;
println!("Processes: {:?}", result);
// List filtered processes
let result = client.call_tool(
tools::PROCESS_LIST,
json!({"filter": "rust", "limit": 5})
).await?;
// Kill a process (use with caution!)
let result = client.call_tool(
tools::PROCESS_KILL,
json!({"pid": 12345})
).await?;
conn.close().await?;
Ok(())
}
# Run the process demo example
cargo run --example process_demo
The example demonstrates:
tmp/mcp-client/process.log# Run all tests
cargo test
# Run specific test
cargo test process_list
# Format code
cargo fmt
# Run linter
cargo clippy
# Check code without building
cargo check
The codebase follows the KODEGEN MCP Tool pattern:
Tool Implementation - Each tool implements the Tool trait with:
Args and PromptArgsexecute() method for core logicProcess Management - Uses sysinfo crate wrapped in tokio::task::spawn_blocking to avoid blocking the async runtime
HTTP Server - Built on kodegen_server_http with automatic tool registration and routing
See CLAUDE.md for detailed architectural documentation.
Licensed under either of:
at your option.