An MCP (Model Context Protocol) server for Rust development.
rustforge-mcp provides a set of tools that allow AI models to interact with Rust projects, manage files, and execute cargo commands directly.
- File Management: List files, read content, and write to files.
- Cargo Integration: Run
cargo check,cargo test,cargo clippy,cargo add, and rawcargocommands. - Connectivity: Simple
pingtool to check server status. - Management API: Register and manage MCP/LLM endpoints via HTTP API.
- Routing Engine: Selects endpoints using health + weight + latency-aware scoring.
- Health Monitoring: Periodic endpoint health checks and Prometheus metrics exposure.
- Rust (latest stable version)
- A client that supports the Model Context Protocol (e.g., Claude Desktop, Gemini CLI)
To install rustforge-mcp globally:
cargo install --path .Or run it directly using cargo run.
export MANAGEMENT_API_TOKEN="your-secure-token"
export DATABASE_URL="postgres://user:password@localhost:5432/rustforge"Optional:
export BIND_ADDR="0.0.0.0:3000"
export USE_INMEMORY_STORAGE="false"Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"rustforge": {
"command": "path/to/rustforge-mcp"
}
}
}rustforge-mcp can be used with Gemini CLI by configuring it as an MCP server.
ping: Ping the server to check connectivity.list_files: List files in a directory.read_file: Read the content of a file.write_file: Write content to a file.cargo: Run a raw cargo command.cargo_check: Run cargo check to find compilation errors.cargo_test: Run cargo test to run unit and integration tests.cargo_clippy: Run cargo clippy for linting.cargo_add: Add a dependency to the project.
This project is licensed under the MIT License - see the LICENSE file for details.