
rust-docs-mcp
by snowmead·★ 124·Score 47
A comprehensive MCP server providing Rust crate documentation, source code analysis, dependency trees, and module structure for AI agents.
Overview
Rust-docs-mcp is a specialized MCP server designed to help AI agents explore and understand Rust crates through comprehensive documentation access, source code analysis, and dependency tracing. It supports multiple sources including crates.io, GitHub repositories, and local filesystem paths, with workspace support and offline caching capabilities. The server implements a rich set of tools for crate inspection, including documentation search, item inspection, dependency analysis, and module structure visualization.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server when your AI agent needs comprehensive Rust crate analysis, documentation access, and dependency tracing for building Rust applications.
When NOT to choose this
Don't choose this if you need to work with non-Rust languages or require write access to crates (this server is read-only).
Tools this server exposes
12 tools extracted from the READMEcache_crateDownload and cache a crate from various sources (cratesio, github, local)
remove_crateRemove cached crate versions to free disk space
list_cached_cratesView all cached crates with versions and sizes
list_crate_versionsList cached versions for a specific crate
get_crates_metadataBatch metadata queries for multiple crates
list_crate_itemsBrowse all items in a crate with optional filtering
search_itemsFull search with complete documentation
search_items_previewLightweight search returning only IDs, names, and types
get_item_detailsGet detailed information about specific items
get_item_docsExtract just the documentation string for an item
get_item_sourceView source code with configurable context lines
get_dependenciesAnalyze direct and transitive dependencies with filtering
Comparable tools
Installation
Installation
Quick Install
curl -sSL https://raw.githubusercontent.com/snowmead/rust-docs-mcp/main/install.sh | bashCargo Install
cargo install rust-docs-mcpMCP Configuration
Add to your MCP configuration:
{
"rust-docs": {
"command": "/path/to/rust-docs-mcp",
"transport": "stdio"
}
}FAQ
- What is the cache directory location?
- By default, crates are cached in `~/.rust-docs-mcp/cache/`. You can customize this location using the `--cache-dir` option or by setting the `RUST_DOCS_MCP_CACHE_DIR` environment variable.
- How do I access private GitHub repositories?
- Set the `GITHUB_TOKEN` environment variable with your personal access token. This also increases GitHub API rate limits from 60 to 5,000 requests/hour.
On Hacker News
Recent discussion from the developer community.
- Story by monadoid · 2025-11-02
- Story by snowmead · 2025-06-20
Compare rust-docs-mcp with
Last updated · Auto-generated from public README + GitHub signals.