
dexwritescode/rust-mcp
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
dexwritescode/rust-mcp는 MCP 서버 후보가 https://github.com/dexwritescode/rust-mcp.에서 가져온다
개요
dexwritescode/rust-mcp는 MCP 서버 후보가 https://github.com/dexwritescode/rust-mcp.에서 가져온다
개요(AI 번역)
LLM 보조 Rust 개발을 위한 rust-analyzer 통합을 제공하는 종합 Model Context Protocol (MCP) 서버. 이 서버는 Claude와 같은 AI 도구를 사용하여 Rust 코드로 작업 할 수 있습니다. Rust-analyzer의 언어 서버 프로토콜 기능을 통해, 문자열 조작을 방지하고 지능형 코드 분석 및 복원을 제공합니다.
빠른 시작
- **빌딩 **:
cargo build --release - ** 구성 ** MCP 클라이언트를 사용하여
target/release/rustmcp - ** 자연 언어의 AI 조수를 통해 ** “Dbug 및 Clone derives와 함께 사용자의 지시”
기능 - 완전한 도구 모음집 (19 도구)
코드 분석 (4 도구)
find_definition- 기호 정의에 Navigatefind_references- 모든 기호 사용 찾기get_diagnostics- 컴파일러 오류 / 수정workspace_symbols- 프로젝트 기호 검색
코드 생성 (4 공구)
generate_struct- derives 및 constructors로 구성된 구조generate_enum- 변형을 가진 enums 만들기generate_trait_impl- 쓰레기를 가진 쓰레기를 생성generate_tests- 단위 또는 통합 테스트 템플릿 만들기
Refactoring (5개의 공구)
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Rust MCP Server
A comprehensive Model Context Protocol (MCP) server that provides rust-analyzer integration for LLM-assisted Rust development. This server enables AI tools like Claude to work with Rust code idiomatically through rust-analyzer’s Language Server Protocol capabilities, avoiding string manipulation and providing intelligent code analysis and refactoring.
Quick Start
- Build:
cargo build --release - Configure your MCP client to use
target/release/rustmcp - Use through AI assistants with natural language prompts like “Generate a User struct with Debug and Clone derives”
Features - Complete Tool Suite (19 Tools)
Code Analysis (4 tools)
find_definition- Navigate to symbol definitionsfind_references- Find all symbol usesget_diagnostics- Get compiler errors/warnings with fixesworkspace_symbols- Search project symbols
Code Generation (4 tools)
generate_struct- Create structs with derives and constructorsgenerate_enum- Create enums with variantsgenerate_trait_impl- Generate trait implementations with stubsgenerate_tests- Create unit or integration test templates
Refactoring (5 tools)
rename_symbol- Rename with scope awarenessextract_function- Extract code into functionsinline_function- Inline function callsorganize_imports- Sort and organize use statementsformat_code- Apply rustfmt formatting
Quality Assurance (2 tools)
apply_clippy_suggestions- Apply clippy automatic fixesvalidate_lifetimes- Check lifetime and borrow checker issues
Project Management (2 tools)
analyze_manifest- Parse and analyze Cargo.tomlrun_cargo_check- Execute cargo check with error parsing
Advanced Features (4 tools)
get_type_hierarchy- Get type relationships for symbolssuggest_dependencies- Recommend crates based on code patternscreate_module- Create new Rust modules with visibility controlmove_items- Move code items between files
Additional Advanced Tools
change_signature- Modify function signatures safely
Prerequisites
- Rust toolchain (1.70+)
- rust-analyzer installed (defaults to
~/.cargo/bin/rust-analyzer) - An MCP-compatible client (Claude, Roo, etc.)
Installation
- Clone this repository:
git clone
cd rust-mcp
- Build the server:
cargo build --release
- The server binary will be available at
target/release/rustmcp
Configuration
Environment Variables
The server supports the following environment variables:
RUST_ANALYZER_PATH- Path to rust-analyzer binary (default:~/.cargo/bin/rust-analyzer)
You can set this when running the server:
RUST_ANALYZER_PATH=/usr/local/bin/rust-analyzer ./target/release/rustmcp
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"rust-analyzer": {
"command": "/path/to/rust-mcp/target/release/rustmcp",
"args": [],
"env": {
"RUST_ANALYZER_PATH": "/custom/path/to/rust-analyzer"
}
}
}
}