Rust Analyzer

•
1
•

Empowers coding agents with Rust IDE intelligence by exposing `rust-analyzer` and `cargo` functionalities through a local stdio MCP server.

rustmcp acts as a local stdio MCP server, designed to equip coding agents with advanced Rust IDE capabilities. It seamlessly integrates with `rust-analyzer` to offer a suite of readonly tools for tasks such as hovering for type information, finding definitions and references, retrieving document symbols, generating completion suggestions, and accessing diagnostics. Additionally, it provides fixed `cargo` tools for common Rust development workflows, including `cargo check`, `cargo test`, `cargo clippy`, `cargo fmt --check`, and `cargo metadata`, all configurable with validated parameters. This tool ensures a safe execution environment, making it ideal for automating Rust code analysis and verification within agent-driven development environments.

주요 기능

01Provides fixed `cargo` commands for project verification (`check`, `test`, `clippy`, `fmt --check`) and workspace inspection (`metadata`).
02Offers previews for formatting and code actions, ensuring no file mutations without explicit user agent commands.
03Exposes a comprehensive suite of readonly `rust-analyzer` tools for hover, definitions, references, completions, and diagnostics.
04Supports dynamic workspace switching for `rust-analyzer` analysis via `ra_set_workspace`.
05Implements a robust safety model for user-supplied path resolution and `cargo` command parameter validation.
061 GitHub stars

사용 사례

01Programmatically querying Rust workspace structure, dependencies, and diagnostics.
02Integrating advanced Rust IDE features into AI coding agents like Claude Code, Claude Desktop, and Codex CLI.
03Automating Rust project analysis, verification, and testing within CI/CD pipelines or agent-driven workflows.