DR

dexwritescode/rust-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

36 stars 17 forks 품질 59 트렌드 0MIT

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의 언어 서버 프로토콜 기능을 통해, 문자열 조작을 방지하고 지능형 코드 분석 및 복원을 제공합니다.

빠른 시작

  1. **빌딩 **: cargo build --release
  2. ** 구성 ** MCP 클라이언트를 사용하여 target/release/rustmcp
  3. ** 자연 언어의 AI 조수를 통해 ** “Dbug 및 Clone derives와 함께 사용자의 지시”

기능 - 완전한 도구 모음집 (19 도구)

코드 분석 (4 도구)

  • find_definition - 기호 정의에 Navigate
  • find_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

  1. Build: cargo build --release
  2. Configure your MCP client to use target/release/rustmcp
  3. 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 definitions
  • find_references - Find all symbol uses
  • get_diagnostics - Get compiler errors/warnings with fixes
  • workspace_symbols - Search project symbols

Code Generation (4 tools)

  • generate_struct - Create structs with derives and constructors
  • generate_enum - Create enums with variants
  • generate_trait_impl - Generate trait implementations with stubs
  • generate_tests - Create unit or integration test templates

Refactoring (5 tools)

  • rename_symbol - Rename with scope awareness
  • extract_function - Extract code into functions
  • inline_function - Inline function calls
  • organize_imports - Sort and organize use statements
  • format_code - Apply rustfmt formatting

Quality Assurance (2 tools)

  • apply_clippy_suggestions - Apply clippy automatic fixes
  • validate_lifetimes - Check lifetime and borrow checker issues

Project Management (2 tools)

  • analyze_manifest - Parse and analyze Cargo.toml
  • run_cargo_check - Execute cargo check with error parsing

Advanced Features (4 tools)

  • get_type_hierarchy - Get type relationships for symbols
  • suggest_dependencies - Recommend crates based on code patterns
  • create_module - Create new Rust modules with visibility control
  • move_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

  1. Clone this repository:
git clone 
cd rust-mcp
  1. Build the server:
cargo build --release
  1. 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
GitHub에서 전체 README 보기

설치

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" } } } }