Cargo Doc MCP Server

by spacemeowx2

Integrations

  • Enables management of Rust documentation through cargo doc commands, providing tools to check, build, and search Rust documentation locally. Features include retrieving crate documentation pages, listing symbols (structs, enums, traits), and searching within crate documentation.

cargo doc MCP Server

A MCP server for managing Rust documentation through cargo doc commands. This server provides tools to check, build, and search Rust documentation locally.

Features

Tools

  • get_crate_doc - Get crate's main documentation page for understanding overall concepts and usage
    • Parameters:
      • project_path: Path to the Rust project (must be absolute path)
      • crate_name: Name of the crate to get documentation for
  • list_symbols - List all symbols (structs, enums, traits, etc.) in a crate's documentation
    • Parameters:
      • project_path: Path to the Rust project (must be absolute path)
      • crate_name: Name of the crate to list symbols for
  • search_doc - Search within a crate's documentation
    • Parameters:
      • project_path: Path to the Rust project (must be absolute path)
      • crate_name: Name of the crate to search in
      • query: Search query (keyword or symbol)
      • limit (optional): Maximum number of results to return (default: 10)

Requirements

  • Node.js 16 or later
  • Rust and Cargo installed

Installation

Install dependencies:

pnpm install

Build the server:

pnpm run build

For development with auto-rebuild:

pnpm run watch

Usage

Add the following configuration:

{ "mcpServers": { "docs-rs-mcp": { "command": "/absolute/path/to/docs-rs-mcp/build/index.js" } } }

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

pnpm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Cache System

The server maintains a cache of built documentation paths to improve performance. Cache entries expire after 24 hours to ensure documentation stays up-to-date.

License

MIT

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

A server for managing Rust documentation that enables users to check, build, and search Rust documentation locally through cargo doc commands.

  1. Features
    1. Tools
  2. Requirements
    1. Installation
      1. Usage
        1. Debugging
          1. Cache System
            1. License

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                Get the narrative and API documentation for the exact version of any of your dependencies. (Only Rust is supported at the moment.)
                Last updated -
                1
                43
                47
                TypeScript
                MIT License
              • -
                security
                F
                license
                -
                quality
                Provides curated documentation access via the Gemini API, enabling users to query and interact with technical docs effectively by overcoming context and search limitations.
                Last updated -
                13
                TypeScript
              • -
                security
                F
                license
                -
                quality
                An MCP server that provides AI tools with access to Rust documentation from docs.rs, enabling search for crates, documentation, type information, feature flags, version information, and source code.
                Last updated -
                3
                TypeScript
              • -
                security
                A
                license
                -
                quality
                An MCP server that enables interaction with the Vercel API to manage deployments, DNS records, domains, projects, and environment variables through natural language commands.
                Last updated -
                60
                TypeScript
                MIT License

              View all related MCP servers

              ID: l4augy7aft