corrode-mcp
Corrode MCP Server is an MCP server implementation designed in Rust for managing code-related tasks. It provides various integrated tools for Rust developers, such as Crates.io management, Rust documentation access, code analysis, and more, enhancing AI workflows.
Corrode MCP Server
Corrode Code Model Context Protocol (MCP) Rust Server.
Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
This project provides an MCP server implementation in Rust for code-related tasks.
Key Features
The Corrode MCP Server offers powerful capabilities for Rust developers:
Rust-Specific Tools
-
Crates.io Integration: Seamlessly search, explore, and manage Rust crates directly from your AI interface.
- Search through available crates with detailed metadata
- Retrieve specific crate information with comprehensive details
- View all available versions of a crate to ensure compatibility
- Examine crate dependencies to better understand project requirements
-
Rust Documentation Access: Access Rust documentation directly.
- Look up API documentation from docs.rs
- Get detailed information about crate usage and examples
- Better understand library interfaces without leaving your AI workflow
- Navigate Rust documentation to find the right functions and types
-
Code Analysis: Analyze Rust code with intelligent tooling.
- Check Rust code for compilation errors with integrated
cargo check
- Identify function signatures throughout your project
- Examine Rust code structure and dependencies
- Check Rust code for compilation errors with integrated
General Development Tools
-
File Operations: Efficiently work with your codebase.
- Read and write files with proper encoding
- Apply changes through unified diffs
- Navigate the file system with intuitive commands
-
Code Search: Find relevant code patterns with ease.
- Search through codebase using keywords and patterns
- Filter by file types and languages to narrow down results
-
Shell Command Execution: Execute shell commands with full context handling.
- Run
cargo
commands with proper environment setup - Manage directory navigation with automatic context tracking
- Execute complex shell operations directly from your AI interface
- Run
Installation
Here are the ways to install the Corrode MCP server:
- Ensure you have Rust and Cargo installed.
- Install the server using Cargo:
This will download the crate from crates.io, build it, and install thecargo install corrode-mcp
corrode-mcp
binary to your Cargo bin directory (usually~/.cargo/bin/
). Ensure this directory is in your system's PATH.
Alternatively, you can build from source:
- Clone the repository:
git clone https://github.com/fourlexboehm/corrode-mcp cd corrode-mcp
- Build and install using Cargo:
cargo install --path .
How to use MCP CLI server in Claude Desktop?
- Ensure
corrode-mcp
is installed (see Installation section) and available in your system's PATH. - Edit
claude_desktop_config.json
: Claude Desktop ->Settings
->Developer
->Edit Config
- Add the following configuration under the
mcpServers
key (or merge it ifmcpServers
already exists):
Using the full absolute path to the binary (recommended):
{
"mcpServers": {
"corrode-mcp": {
"command": "/full/path/to/corrode-mcp",
"args": ["--mcp"]
}
}
}
Replace /full/path/to/corrode-mcp
with the actual path to your installed binary. You can find this by running:
which corrode-mcp
If you want to check MCP log, please use tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
.
Usage Examples
Here are some practical ways to leverage Corrode MCP with your Rust projects:
Exploring Crates
# Search for async runtime crates
> Search for crates related to async runtime
# Get detailed information about a specific version
> What are the features available in tokio 1.44.1?
# Check dependencies
> Show me the dependencies for serde_json 1.0
Code Analysis
# Check for errors in your project
> Are there any compilation errors in my current project?
# Code structure understanding
> List all function signatures in the src directory
# Cargo operations
> Update my dependencies to the latest versions
Code Search
# Find code patterns
> Search for all functions using tokio::spawn in this project
Rust Project Management
# Create new components
> Create a new module for handling HTTP requests
# Explore project structure
> Draw an architecture diagram of this Rust project
# Quality improvements
> Analyze this code for potential performance improvements
References
- MCP Specification: https://spec.modelcontextprotocol.io/
- Model Context Protocol (MCP): https://modelcontextprotocol.io/introduction
- rpc-router: json-rpc routing library - https://github.com/jeremychone/rust-rpc-router/
- Zed context_server: https://github.com/zed-industries/zed/tree/main/crates/context_server