rust-mcp-server

Vaiz/rust-mcp-server

3.3

If you are the rightful owner of rust-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Rust MCP Server is a bridge between a large language model (LLM) and a local Rust development environment, enhancing productivity by automating tasks and managing projects.

The Rust MCP Server is designed to integrate a large language model (LLM) with your local Rust development environment, acting as a bridge to enhance productivity. By exposing local tools and project context to the LLM, the server allows the model to perform various actions on your behalf, such as building, testing, and analyzing Rust code. This integration turns your AI assistant into an active participant in your development workflow, capable of executing commands and helping you manage your project. The server supports a wide range of Rust development tools, including core Cargo commands, project management, dependency management, and code quality and security checks. Additionally, it offers experimental access to the official Cargo Book documentation, allowing LLMs to fetch and reference comprehensive Cargo documentation directly from the official repository. The Rust MCP Server can be configured to work with GitHub Copilot, providing a powerful autonomous development workflow.

Features

  • Core Cargo Commands: Execute essential Cargo commands like build, check, test, and format directly through the server.
  • Project Management: Manage Rust projects with commands to create new packages, generate lockfiles, and package projects.
  • Dependency Management: Add, remove, update, and search for dependencies, and output project metadata in JSON format.
  • Code Quality & Security: Use tools like cargo-deny and cargo-machete to check for security advisories, license compliance, and find unused dependencies.
  • Rust Toolchain Management: Manage Rust toolchains with rustup commands to show, add, and update toolchains.

Usages

usage with VS Code

{
    "servers": {
        "rust-mcp-server": {
            "type": "stdio",
            "command": "C:/path/to/your/rust-mcp-server.exe",
            "args": ["--log-file", "log/folder/rust-mcp-server.log"]
        }
    }
}

Tools

  1. cargo-build

    Compile your package

  2. cargo-check

    Analyze the current package and report errors, but don't build it

  3. cargo-test

    Run the tests

  4. cargo-fmt

    Format the code according to the project's style

  5. cargo-clippy

    Check for common mistakes and improve code quality using Clippy