
zeenix/rust-analyzer-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
zeenix/rust-analyzer-mcp は [https://github.com/zeenix/rust-analyzer-mcp.] からインポートされた MCP サーバーの候補です
概要
zeenix/rust-analyzer-mcp は [https://github.com/zeenix/rust-analyzer-mcp.] からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
これは、rust-analyzer との統合を提供するモデルコンテキストプロトコル(MCP)サーバーです。 Rustコードを分析するAIアシスタント、ホバー情報の取得、定義、参照など 最適なパフォーマンスとネイティブ統合のためのRustで書かれています。
前提条件
- rust-analyzer: PATH に rust-analyzer がインストールされていることを確認してください。
2.Rust: 貨物とバージョン1.70以上 3。Rustプロジェクト:サーバーは、有効なRustワークスペース([[T0]を含む)で最善を尽くします。
なぜ錆?
このRustの実装は、代替実装よりもいくつかの利点を提供します。
- パフォーマンス: 最小限のオーバーヘッドを持つネイティブラストバイナリ -メモリーセーフティ:メモリの問題からランタイムエラーなし
- エコシステムインテグレーション: Rust開発ワークフローに最適な
- 小型バイナリサイズ:LTOと最適化されたリリースビルド
- 同時安全: 常藤非同期ランタイムは複数の要求を効率的に処理します
- 否定的な LSP の処理: rust-analyzer のプロトコルとの直接統合
インストール
から crates.io (推奨)
crates.ioから直接インストールします。
バイナリは、貨物の 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"
}
}
}