rust
MCP server from MythEclipse/rust-mcp-server
claude mcp add --transport stdio mytheclipse-rust-mcp-server docker run -i mytheclipse/rust-mcp-server:latest
How to use
This Rust MCP server provides AI-assisted code analysis for Rust projects, including file syntax checking, workspace indexing, code navigation, smell detection, and automated refactoring suggestions. It exposes MCP-compatible JSON-RPC 2.0 tools that a client (such as an AI coding assistant) can call over stdio when running the server. Available tools include: check_file for syntax verification of a single Rust file, index_workspace to build call graphs, type usage graphs, and module dependencies across a workspace, goto_definition to locate symbol definitions, and find_references to enumerate all usages of a symbol. Typical usage involves starting the server, then issuing JSON-RPC requests to perform analysis, retrieve structural information, and receive actionable insights to improve Rust code quality and maintainability.
How to install
Prerequisites:
- Docker and Docker Compose (recommended for deployment and experiments)
- Git (optional, for cloning the repository)
- Rust toolchain (for building from source, Rust 1.70+)
Docker Hub install (recommended):
-
Pull and run: docker run --rm -i mytheclipse/rust-mcp-server:latest
-
With workspace mounting (for analyzing local projects): docker run --rm -i -v $(pwd):/workspace mytheclipse/rust-mcp-server:latest
-
Run in the background: docker run -d --name rust-mcp-server mytheclipse/rust-mcp-server:latest docker stop rust-mcp-server && docker rm rust-mcp-server
Development setup (optional):
-
Clone the repository and navigate to it: git clone https://github.com/MythEclipse/rust-mcp-server.git cd rust-mcp-server
-
Run with Docker Compose (development): docker-compose up --build
-
Build and run manually: docker build -t rust-mcp-server . docker run --rm -i rust-mcp-server
Manual build from source (advanced): Prerequisites:
- Rust 1.70+ (2024 edition)
- Cargo
Build from source:
git clone https://github.com/MythEclipse/rust-mcp-server.git
cd rust-mcp-server
cargo build --release
./target/release/rust-mcp-server
If you prefer to run locally without Docker, you can run the binary directly after building.
Additional notes
Tips and notes:
- The MCP communication is JSON-RPC 2.0 over libstdio. When running in Docker, ensure the client connects to the container's STDIN/STDOUT streams.
- The server performs extensive Rust code analysis, including function complexity checks, unused code detection, and refactoring suggestions. When indexing a large workspace, expect longer indexing times.
- If you see missing type information or symbol resolution issues, ensure the workspace is correctly mounted and that the analyzer has access to all source files within the workspace root.
- For production deployments, prefer the Docker image which is configured with Rust nightly to support the latest MCP SDK features.
- If you customize or extend analysis features, keep your local Rust toolchain in sync with the nightly version used by the image to avoid compatibility issues.
Related MCP Servers
goose
an open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
cunzhi
告别AI提前终止烦恼,助力AI更加持久
probe
AI-friendly semantic code search engine for large codebases. Combines ripgrep speed with tree-sitter AST parsing. Powers AI coding assistants with precise, context-aware code understanding.
mcp-center
A centralized platform for managing and connecting MCP servers. MCP Center provides a high-performance proxy service that enables seamless communication between MCP clients and multiple MCP servers.
backlog -rust
MCP server for Backlog, project management service.
perplexity-web-api
🔍 Perplexity AI MCP without API key