1. Conduid
  2. Documentation
  3. Rustdoc MCP Server
MCP server · Documentation

Rustdoc MCP Server

A fast, low-latency Rust-based Model Context Protocol (MCP) server querying local rustdoc JSON via SQLite FTS5 for AI agents.

34Low

Scored 7 days ago · breakdown

About Rustdoc MCP Server

Rustdoc MCP Server is an MCP server in the Documentation category: a fast, low-latency Rust-based Model Context Protocol (MCP) server querying local rustdoc JSON via SQLite FTS5 for AI agents.

The repository has 1 stars and 0 forks.

Install

From source
git clone https://github.com/KevinT3Hu/rustdoc-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Rustdoc MCP Server

Powered by Claude · Grounded in docs

I know everything about Rustdoc MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

rustdoc-mcp

A Model Context Protocol (MCP) server that provides real-time access to Rust documentation for your project dependencies.

It allows LLMs to query crate documentation, search for items, and retrieve detailed docs for structs, functions, traits, and more, all by leveraging cargo rustdoc's JSON output format.

Features

  • Dependency Discovery: List all dependencies in your current project.
  • On-demand Documentation: Generates documentation for crates as needed using the nightly toolchain.
  • Search: Fuzzy search across available documentation.
  • Module Exploration: Browse items within modules.
  • Detailed Docs: Retrieve full Markdown documentation for any item.

Prerequisites

  • Rust Nightly Toolchain: This server relies on the experimental JSON output from rustdoc, which is currently only available in nightly.
    rustup toolchain install nightly
    

Installation

From Source

  1. Clone the repository:

    git clone https://github.com/KevinT3Hu/rustdoc-mcp.git
    cd rustdoc-mcp
    
  2. Build the project:

    cargo build --release
    

    The binary will be available at target/release/rustdoc-mcp.

Usage

Integrating with Claude Desktop

Add the server to your Claude Desktop configuration file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows).

Replace /path/to/rustdoc-mcp with the actual path to your built binary.

{
  "mcpServers": {
    "rustdoc": {
      "command": "/path/to/rustdoc-mcp/target/release/rustdoc-mcp",
      "args": [
        "start",
        "--cwd",
        "/path/to/your/rust/project"
      ]
    }
  }
}

Note: The --cwd argument is optional. If omitted, it defaults to the current working directory of the process, but specifying the target project path is recommended.

Available Tools

When the server is running, the following tools are available to the LLM:

  • list_deps: Lists all dependencies available in the current project.
  • list_crate_items: Lists root items of a specific crate (e.g., std, tokio).
  • search_docs: Performs a fuzzy search for items matching a query.
  • get_module: Returns a summary of public items within a specific module path.
  • get_docs: Returns the full markdown documentation for a specific item path (e.g., std::vec::Vec).

How it Works

  1. The server inspects the Cargo.toml of the target project to find dependencies.
  2. When documentation is requested for a crate, it runs cargo +nightly rustdoc to generate JSON documentation.
  3. The JSON is cached and indexed in memory for fast retrieval.
  4. Queries are processed against this index to return Markdown-formatted documentation.

Troubleshooting

  • Logs: The server writes logs to /tmp/rustdoc-mcp/server.log. Check this file if you encounter issues. To get more detailed logs, set the RUST_LOG environment variable before starting the server:
    export RUST_LOG=debug
    
  • Compilation Errors: Since the server runs cargo rustdoc, ensure your project compiles successfully.

License

This project is licensed under the GNU Lesser General Public License v3.0 - see the LICENSE file for details.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Rustdoc MCP Server

How do I install Rustdoc MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Rustdoc MCP Server safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Rustdoc MCP Server still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.