Rust MCP Server

by lh

1 281 downloads Not rated yet
GitHub

About

Model Context Protocol server for Rust development tools (clippy, rustfmt, cargo check, cargo test)

Explore

- Syntax and type validation via cargo_check
- Code linting with automatic fixes via cargo_clippy
- Code formatting using rustfmt
- Test execution with pattern matching via cargo_test
- Project building in debug or release mode via cargo_build
- Standardized JSON output for all tool results

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Rust MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Rust toolchain (rustc, cargo, clippy, rustfmt)
- Tokio async runtime support


claude mcp list | grep rust-tools

```bash

1. cargo_check - Syntax and type validation
- Validates Rust code syntax and type checking
- Supports workspace-wide checking
- Provides detailed error messages and suggestions

2. cargo_clippy - Code linting
- Catches common mistakes and suggests improvements
- Supports automatic fixes where possible
- Configurable lint levels and rules

3. rustfmt - Code formatting
- Formats Rust code according to style guidelines
- Can check formatting without applying changes
- Supports individual file or project-wide formatting

4. cargo_test - Test execution
- Runs Rust tests with detailed output
- Supports specific test patterns and packages
- Configurable output capture for debugging

5. cargo_build - Project building
- Builds Rust projects in debug or release mode
- Supports workspace builds
- Provides build status and error details

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "rust mcp server": {
            "rust-mcp-server": {
                "command": "python3",
                "args": [
                    "test_server.py"
                ]
            }
        }
    }
}

McpServers

{
    "rust-mcp-server": {
        "command": "python3",
        "args": [
            "test_server.py"
        ]
    }
}

A Model Context Protocol (MCP) server that provides essential Rust development tools for AI assistants and IDEs. This server enables real-time syntax checking, linting, formatting, testing, and building of Rust projects through the standardized MCP interface.

Features

Available Tools

1. cargo_check - Syntax and type validation
- Validates Rust code syntax and type checking
- Supports workspace-wide checking
- Provides detailed error messages and suggestions

2. cargo_clippy - Code linting
- Catches common mistakes and suggests improvements
- Supports automatic fixes where possible
- Configurable lint levels and rules

3. rustfmt - Code formatting
- Formats Rust code according to style guidelines
- Can check formatting without applying changes
- Supports individual file or project-wide formatting

4. cargo_test - Test execution
- Runs Rust tests with detailed output
- Supports specific test patterns and packages
- Configurable output capture for debugging

5. cargo_build - Project building
- Builds Rust projects in debug or release mode
- Supports workspace builds
- Provides build status and error details

Installation

Prerequisites

- Rust toolchain (rustc, cargo, clippy, rustfmt)
- Tokio async runtime support

Build from source

git clone https://github.com/lh/rust-mcp-server
cd rust-mcp-server
cargo build --release

Claude Code Integration

Quick Install

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.