rust-expert-mcp
A Rust MCP (Model Context Protocol) server that gives any MCP-compatible AI assistant live access to the entire rust-lang GitHub organization — source code, compiler errors, RFCs, The Book, The Reference, The Nomicon, Rust By Example, and crates.io.
Built with rmcp 1.5.0 (the official Rust MCP SDK).
Tools
Build
Requires Rust (stable, edition 2021).
git clone https://github.com/Degens-World/rust-expert-mcp
cd rust-expert-mcp
cargo build --release
# binary → target/release/rust-expert-mcp (or .exe on Windows)
Configure in Claude Code
claude mcp add rust-expert -- /path/to/rust-expert-mcp
Or add it manually to your Claude config (~/.claude/claude.json):
{
"mcpServers": {
"rust-expert": {
"command": "/path/to/rust-expert-mcp"
}
}
}
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"rust-expert": {
"command": "/path/to/rust-expert-mcp"
}
}
}
GitHub Token (recommended)
Without a token the GitHub API allows 10 search requests / minute and 60 requests / hour.
With a token: 30 searches / minute and 5 000 requests / hour.
Generate a token at GitHub → Settings → Developer Settings → Personal Access Tokens (no scopes required for public repos), then pass it via environment variable:
{
"mcpServers": {
"rust-expert": {
"command": "/path/to/rust-expert-mcp",
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Example usage (with Claude)
Search for how `Pin` is implemented in the standard library.
→ search_rust_source(query="Pin", repo="rust")
Explain compiler error E0505.
→ explain_compiler_error(error_code="E0505")
Show me RFC 2094 (Non-Lexical Lifetimes).
→ get_rust_rfc(number=2094)
What chapter covers async/await in The Book?
→ get_rust_book(chapter="SUMMARY")
Read the trait-objects section of the Reference.
→ get_rust_reference(section="trait-objects")
How many downloads does tokio have?
→ get_crate_info(name="tokio")
License
MIT