cursor-rust-tools

A MCP server to allow the LLM in Cursor to access Rust Analyzer, Crate Docs and Cargo Commands.

GitHub Stars

72

User Rating

Not Rated

Favorites

0

Views

33

Forks

11

Issues

2

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Rust: 最新版
Cargo: 最新版

Installation

Installation

Prerequisites

Rust: Latest version
Cargo: Latest version

Installation Steps

1. Clone Repository

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

2. Run With UI

bash
cursor-rust-tools

3. Run Without UI

bash
cursor-rust-tools --no-ui

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check the versions of Rust and Cargo.

Configuration

Configuration

Basic Configuration

Project Setup

You can set up ~/.cursor-rust-tools as follows:
toml
[[projects]]
root = "/Users/terhechte/Developer/Rust/example1"
ignore_crates = []

[[projects]]
root = "/Users/terhechte/Developer/Rust/example2"
ignore_crates = []
ignore_crates is a list of crate names that you do not want to index for documentation.

Examples

Examples

Basic Usage

Executing Cargo Commands

bash

Running Cargo tests

cargo test

Retrieving Type Information from Rust Analyzer

rust
// Rust code example
let x: i32 = 5;
// Retrieve type information

Use Cases

Retrieving type information in a Rust project
Obtaining documentation for a specific crate (e.g., tokio)
Checking type information for functions or variables within a file
Getting test results using Cargo
Retrieving up-to-date information about dependencies to update the project

Additional Resources