MCP Catalogs
Homerust-docs-mcp screenshot

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.

developer-toolsai-llmweb-scraping
8
Forks
5
Open issues
1 mo ago
Last commit
24d ago
Indexed

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:

you:AI agents exploring and understanding new Rust crates for development
you:Building Rust applications with AI assistance by providing real-time API documentation
you:Analyzing dependency relationships and module structures of Rust projects
you:What is the cache directory location?
you:How do I access private GitHub repositories?

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 README
  • cache_crate

    Download and cache a crate from various sources (cratesio, github, local)

  • remove_crate

    Remove cached crate versions to free disk space

  • list_cached_crates

    View all cached crates with versions and sizes

  • list_crate_versions

    List cached versions for a specific crate

  • get_crates_metadata

    Batch metadata queries for multiple crates

  • list_crate_items

    Browse all items in a crate with optional filtering

  • search_items

    Full search with complete documentation

  • search_items_preview

    Lightweight search returning only IDs, names, and types

  • get_item_details

    Get detailed information about specific items

  • get_item_docs

    Extract just the documentation string for an item

  • get_item_source

    View source code with configurable context lines

  • get_dependencies

    Analyze direct and transitive dependencies with filtering

Comparable tools

cargo-mcprust-analyzer-mcpsourcegraph-mcp

Installation

Installation

Quick Install

curl -sSL https://raw.githubusercontent.com/snowmead/rust-docs-mcp/main/install.sh | bash

Cargo Install

cargo install rust-docs-mcp

MCP 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.

Compare rust-docs-mcp with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.