
cursor-rust-tools
by terhechte·★ 83·Score 40
MCP server enabling Rust LLMs to access Rust Analyzer, Crate Docs, and Cargo commands in Cursor.
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:
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 READMEget_crate_docsGet the documentation for a crate or for a specific symbol in the crate
get_hover_infoGet the hover information (type, description) for a specific symbol in a file
get_referencesGet a list of all the references for a specific symbol in a file
get_implementationGet the implementation of a symbol in a file
find_typeFind a type just by name in a file the project and return the hover information
cargo_testGet the output of cargo test
cargo_checkGet the output of cargo check
Comparable tools
Installation
Installation
cargo install --git https://github.com/terhechte/cursor-rust-toolsRun with UI
cursor-rust-toolsRun without UI
cursor-rust-tools --no-uiConfiguration
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.
- Story by terhechte · 2025-04-08
Compare cursor-rust-tools with
Last updated · Auto-generated from public README + GitHub signals.