Why rust-docs-MCP is the only MCP tool I like (github.com)

🤖 AI Summary
rust-docs-MCP is an MCP (Model Context Protocol) server that gives AI agents reliable, offline-capable access to complete Rust crate metadata, rustdoc JSON, source code, dependency graphs and module hierarchies so agents can understand and use crates they weren’t trained on. It addresses common failure modes—outdated training data, flaky web scraping, shallow README examples, and opaque internal structure—by letting agents query precise items (signatures, fields, docs), view line-level source with configurable context, trace direct and transitive dependencies, and generate hierarchical module trees via cargo-modules. Cache sources include crates.io, GitHub (branch or tag), and local paths; workspaces are supported with per-member docs and metadata. Default cache is ~/.rust-docs-mcp/cache but is configurable. Technically, the tool exposes a rich set of MCP commands (cache_crate, remove_crate, list_cached_crates, search_items/_preview, get_item_details/docs/source, get_dependencies, structure, fuzzy search), supports token-aware response truncation/preview for LLM compatibility, and can operate fully offline after initial caching. Installation options include a quick install script or cargo build, and it requires Rust nightly for rustdoc JSON generation; a doctor command checks toolchain, git, network, and cache health. Set GITHUB_TOKEN to access private repos and higher API limits. Programmatic integration is via a simple MCP config (stdio transport) and JSON flags for structured output—making it practical for agents to build confidently with even brand-new Rust crates.
Loading comments...
loading comments...