
zeenix/rust-analyzer-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
zeenix/rust-analyzer-mcp는 MCP 서버 후보가 https://github.com/zeenix/rust-analyzer-mcp.에서 수입되었습니다
개요
zeenix/rust-analyzer-mcp는 MCP 서버 후보가 https://github.com/zeenix/rust-analyzer-mcp.에서 수입되었습니다
개요(AI 번역)
이 모델 Context Protocol (MCP) 서버는 rust-analyzer와의 통합을 제공하므로 Rust 코드를 분석하는 AI 조수, hover 정보를 얻을, 정의, 참조, 그리고 더. 최적의 성능과 네이티브 통합을 위한 Rust에서 작성.
필수품
- ** rust-analyzer **: rust-analyzer가 PATH에 설치되어 있는지 확인합니다.
2.Rust: 1.70 이상의 화물 3. ** Rust 프로젝트 **: 서버는 유효한 Rust 작업 공간 ([T0]]를 포함합니다)에 베스트를 사용합니다
왜 Rust?
이 Rust 구현은 대안 구현에 몇 가지 이점을 제공합니다:
- Performance: 최소 오버헤드를 가진 Native Rust 바이너리 -Memory Safety: 메모리 문제에서 런타임 오류 없음
- Ecosystem Integration: Rust 개발 워크플로우에 완벽한 적합 -Small Binary Size: LTO와 최적화된 릴리즈 빌드
- Concurrent Safety: Tokio async runtime은 여러 요청을 효율적으로 처리합니다.
- **Native LSP 처리 **: rust-analyzer의 프로토콜과 직접 통합
설치
##에서 crates.io (추천)
crates.io에서 직접 설치:
이진은 Cargo bin 디렉토리에 설치됩니다 (보통 `~/.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
rust-analyzer MCP Server
This is a Model Context Protocol (MCP) server that provides integration with rust-analyzer, allowing AI assistants to analyze Rust code, get hover information, find definitions, references, and more. Written in Rust for optimal performance and native integration.
Prerequisites
-
rust-analyzer: Make sure rust-analyzer is installed and available in your PATH
# Install via rustup (recommended) rustup component add rust-analyzer # Or install directly cargo install rust-analyzer # Verify installation rust-analyzer --version -
Rust: Version 1.70 or higher with Cargo
-
A Rust project: The server works best with a valid Rust workspace (containing
Cargo.toml)
Why Rust?
This Rust implementation offers several advantages over alternative implementations:
- Performance: Native Rust binary with minimal overhead
- Memory Safety: No runtime errors from memory issues
- Ecosystem Integration: Perfect fit for Rust development workflows
- Small Binary Size: Optimized release builds with LTO
- Concurrent Safety: Tokio async runtime handles multiple requests efficiently
- Native LSP Handling: Direct integration with rust-analyzer’s protocol
Installation
From crates.io (Recommended)
Install directly from crates.io:
cargo install rust-analyzer-mcp
The binary will be installed to your Cargo bin directory (usually ~/.cargo/bin/rust-analyzer-mcp).
From Source
-
Clone the repository:
git clone https://github.com/zeenix/rust-analyzer-mcp.git cd rust-analyzer-mcp -
Build the project:
cargo build --release -
The binary will be available at
target/release/rust-analyzer-mcp
Configuration
Claude Code Configuration
Add an MCP server configuration to one of these locations:
Option 1: Project-specific (.mcp.json in your Rust project root):
{
"mcpServers": {
"rust-analyzer": {
"command": "rust-analyzer-mcp"
}
}
}
Option 2: User-wide (~/.claude.json or ~/.claude/settings.json):
{
"mcpServers": {
"rust-analyzer": {
"command": "rust-analyzer-mcp"
}
}
}
Note: If you installed from crates.io, the command will be in your PATH. If you built from source, use the full path to the binary. You can also configure servers using Claude Code’s CLI wizard too.
Claude Desktop Configuration
Add this to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"rust-analyzer": {
"command": "rust-analyzer-mcp"
}
}
}
Note: If installed from crates.io, the command will be in your PATH. For Claude Desktop, you
may want to specify a cwd parameter if you want to analyze a specific project by default.
Cargo features
By default rust-analyzer analyses and checks your crate with whatever features its manifest makes
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"rust-analyzer": {
"command": "rust-analyzer-mcp"
}
}
}