| Crates.io | rust-mcp-server |
| lib.rs | rust-mcp-server |
| version | 0.3.2 |
| created_at | 2025-06-28 16:51:40.891837+00 |
| updated_at | 2026-01-22 07:06:58.085586+00 |
| description | An MCP server for Rust development |
| homepage | https://github.com/Vaiz/rust-mcp-server |
| repository | https://github.com/Vaiz/rust-mcp-server |
| max_upload_size | |
| id | 1729976 |
| size | 272,629 |
rust-mcp-server is a server that implements the Model Context Protocol (MCP). It acts as a bridge between a large language model (LLM) like GitHub Copilot and your local Rust development environment.
By exposing local tools and project context to the LLM, rust-mcp-server allows the model to perform actions on your behalf, such as building, testing, and analyzing your Rust code.
rust-mcp-server?rust-mcp-server?Integrating an LLM with your local development environment via rust-mcp-server can significantly enhance your productivity. The LLM can:
cargo check, cargo build, cargo test, and cargo fmt directly.cargo add, find unused dependencies with cargo-machetecargo clippy to lint your code and catch common mistakes, ensuring adherence to Rust guidelines. The LLM can also leverage other tools to help you write idiomatic and robust Rust code.Essentially, it turns your AI assistant into an active participant in your development workflow, capable of executing commands and helping you manage your project.
rust-mcp-server exposes a comprehensive set of Rust development tools to the LLM:
cargo-build: Compile your packagecargo-check: Analyze the current package and report errors, but don't build itcargo-test: Run the testscargo-doc: Build documentation for your package (recommended with --no-deps and specific --package for faster builds)cargo-fmt: Format the code according to the project's stylecargo-clippy: Check for common mistakes and improve code quality using Clippycargo-clean: Clean the target directorycargo-new: Create a new cargo packagecargo-generate_lockfile: Generate or update the Cargo.lock filecargo-package: Assemble the local package into a distributable tarballcargo-list: List installed cargo commandscargo-add: Add dependencies to your Cargo.tomlcargo-remove: Remove dependencies from your Cargo.tomlcargo-update: Update dependencies to newer versionscargo-metadata: Output project metadata in machine-readable format (JSON)cargo-search: Search for packages in the registrycargo-info: Display information about a packagecargo-deny-check: Check for security advisories, license compliance, and banned cratescargo-deny-init: Create a cargo-deny config from a templatecargo-deny-list: List all licenses and the crates that use themcargo-deny-install: Install cargo-deny toolcargo-machete: Find unused dependenciescargo-machete-install: Install cargo-machete toolcargo-hack: Advanced testing and feature validation with powerset testing, version compatibility checks, and CI optimizationcargo-hack-install: Install cargo-hack toolrustc-explain: Provide detailed explanations of Rust compiler error codesrustup-show: Show the active and installed toolchainsrustup-toolchain-add: Install or update toolchainsrustup-update: Update Rust toolchains and rustupFor a complete list with detailed descriptions and parameters, see tools.md.
The rust-mcp-server supports several command line arguments to customize its behavior:
--log-level <LOG_LEVEL>Sets the logging level for the server
Options: error, warn, info, debug, trace
Default: info
Example: --log-level debug
--log-file <LOG_FILE>Specifies a file path for logging output. If not provided, logs are written to stderr
Default: None (logs to stderr)
Example: --log-file /var/log/rust-mcp-server.log
--disable-tool <TOOL_NAME>Disables a specific tool by name. Can be specified multiple times to disable multiple tools
Default: None (all tools enabled)
Example: --disable-tool cargo-test --disable-tool cargo-clippy
--workspace <WORKSPACE>Specifies the Rust project workspace path for the server to operate in
Default: Current directory
Example: --workspace /path/to/rust/project
--registry <REGISTRY>Sets the default cargo registry for commands that support registry options (e.g., cargo-search, cargo-info, cargo-add). This allows you to use a custom registry defined in your .cargo/config.toml without specifying it for each command
Default: None (uses crates.io)
Example: --registry my-private-registry
--generate-docs <OUTPUT_FILE>Generates markdown documentation file and exits without starting the server
Default: None
Example: --generate-docs tools.md
--no-recommendationsDisables experimental recommendations for agents in tool responses Default: Recommendations are enabled
-h, --helpDisplays help information about available command line arguments
-V, --versionDisplays the version information of the server
To make GitHub Copilot in VS Code use this MCP server, you need to update your VS Code settings.
Install rust-mcp-server
cargo install rust-mcp-server
Enable MCP server in VS Code settings - ⚙️chat.mcp.enabled
Add new MCP server into .vscode/mcp.json.
{
"servers": {
"rust-mcp-server": {
"type": "stdio",
"command": "C:/path/to/your/rust-mcp-server.exe",
"args": ["--log-file", "log/folder/rust-mcp-server.log"],
}
}
}
Start the server

More information you can find by this link.
The Rust MCP Server can be integrated with GitHub Copilot's coding agent to create a powerful autonomous development workflow. For detailed setup instructions for using the Rust MCP Server with GitHub Copilot's coding agent, see copilot-coding-agent.md.