rust-docs-mcp

rust-docs-mcp

3.5

If you are the rightful owner of rust-docs-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

Rustdocs MCP Server is a Model Context Protocol server designed to provide comprehensive access to Rust crate documentation, source code analysis, dependency trees, and module structure visualization.

The Rustdocs MCP Server is a powerful tool for AI agents and developers working with Rust projects. It addresses the challenges faced by agents when dealing with new Rust crates, such as outdated training data, inefficient documentation scraping, and limited understanding of internal structures. By offering deep crate intelligence, the server enables agents to explore module hierarchies, access complete documentation, trace dependencies, and work offline with cached crates. This ensures that agents can build confidently with any Rust crate, even those released recently. The server supports multi-source caching, workspace analysis, documentation search, item inspection, source code access, dependency analysis, and module structure visualization. It operates offline after initial caching, making it a reliable tool for developers and agents alike.

Features

  • Multi-source caching from crates.io, GitHub, and local paths
  • Workspace support for individual member analysis and caching
  • Comprehensive documentation search with pattern matching and filtering
  • Detailed item inspection with signatures, fields, and methods
  • Offline operation with full functionality after initial caching

Tools

  1. cache_crate_from_cratesio

    Download and cache a specific crate version from crates.io

  2. cache_crate_from_github

    Download and cache from GitHub (specify branch or tag)

  3. cache_crate_from_local

    Cache from a local file system path

  4. remove_crate

    Remove cached crate versions to free disk space

  5. list_cached_crates

    View all cached crates with versions and sizes

  6. list_crate_versions

    List cached versions for a specific crate

  7. get_crates_metadata

    Batch metadata queries for multiple crates

  8. search_items_preview

    Lightweight search returning only IDs, names, and types

  9. search_items

    Full search with complete documentation (may hit token limits)

  10. list_crate_items

    Browse all items in a crate with optional filtering

  11. get_item_details

    Detailed information about specific items (signatures, fields, etc.)

  12. get_item_docs

    Extract just the documentation string for an item

  13. get_item_source

    View source code with configurable context lines

  14. get_dependencies

    Analyze direct and transitive dependencies with filtering

  15. structure

    Generate hierarchical module tree using integrated cargo-modules