MCP Catalogs
Homecursor-rust-tools screenshot

cursor-rust-tools

by terhechte·83·Score 40

MCP server enabling Rust LLMs to access Rust Analyzer, Crate Docs, and Cargo commands in Cursor.

developer-toolsai-llm
12
Forks
2
Open issues
12 mo ago
Last commit
2d ago
Indexed

Overview

Cursor Rust Tools is a specialized MCP server that bridges AI assistants with Rust development tools by exposing LSP functionality through the Model Context Protocol. It enables AI agents to access real-time type information, documentation, and cargo commands by running a dedicated Rust Analyzer instance and parsing cargo documentation locally. The server provides tools for getting documentation for crates or specific symbols, hover information, references, implementations, and cargo command outputs. The implementation is written in Rust and includes a UI for configuration and project management. It maintains documentation cache in the project root and can be configured to ignore specific crates to manage resource usage. The server integrates specifically with Cursor editor through a configuration file that enables the MCP server in Agent Mode.

Try asking AI

After installing, here are 6 things you can ask your AI assistant:

you:Enable AI coding assistants to provide accurate Rust type information and documentation in Cursor
you:Allow AI agents to run cargo check and test commands for real-time validation
you:Integrate up-to-date dependency documentation into AI coding workflows
you:Why can't the server use the existing Rust Analyzer from my editor?
you:How does documentation caching work?
you:Can I use this with editors other than Cursor?

When to choose this

Developers using Cursor for Rust development who need AI access to real-time type information, documentation, and Cargo commands.

When NOT to choose this

Users not working with Cursor or those needing more comprehensive LSP functionality than what's currently exposed.

Tools this server exposes

7 tools extracted from the README
  • get_crate_docs

    Get the documentation for a crate or for a specific symbol in the crate

  • get_hover_info

    Get the hover information (type, description) for a specific symbol in a file

  • get_references

    Get a list of all the references for a specific symbol in a file

  • get_implementation

    Get the implementation of a symbol in a file

  • find_type

    Find a type just by name in a file the project and return the hover information

  • cargo_test

    Get the output of cargo test

  • cargo_check

    Get the output of cargo check

Comparable tools

rust-analyzer-mcpcargo-mcp

Installation

Installation

cargo install --git https://github.com/terhechte/cursor-rust-tools

Run with UI

cursor-rust-tools

Run without UI

cursor-rust-tools --no-ui

Configuration

Create a ~/.cursor-rust-tools configuration file with TOML format:

[[projects]]
root = "/path/to/your/rust/project"
ignore_crates = []

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "cursor-rust-tools": {
      "command": "cursor-rust-tools",
      "args": []
    }
  }
}

Then configure your project with a .cursor/mcp.json file to enable the server for specific projects.

FAQ

Why can't the server use the existing Rust Analyzer from my editor?
Because Rust Analyzer is designed to be used by a single consumer and requires proper document open/close ordering, the server spins up its own instance to avoid conflicts with the editor.
How does documentation caching work?
The server runs 'cargo docs' and parses the HTML documentation into markdown, storing it in a '.docs-cache' folder in the project root for faster access.
Can I use this with editors other than Cursor?
Currently, the server is specifically designed for Cursor integration, though there are plans to create a Zed extension.

On Hacker News

Recent discussion from the developer community.

Compare cursor-rust-tools with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.