Cargo Doc MCP Server
The Cargo Doc MCP Server provides tools to manage and query Rust documentation locally.
Get Crate Documentation: Retrieve the main documentation page of a crate to understand its concepts and usage.
List Symbols: Explore all symbols (structs, enums, traits, etc.) within a crate's documentation.
Search Documentation: Search within a crate's documentation for specific features, error messages, or usage examples.
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cargo Doc MCP Server search for 'Result' in the serde crate documentation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 usageParameters:
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 documentationParameters:
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 documentationParameters:
project_path: Path to the Rust project (must be absolute path)crate_name: Name of the crate to search inquery: Search query (keyword or symbol)limit(optional): Maximum number of results to return (default: 10)
Related MCP server: MCP Rust Docs Server
Requirements
Node.js 16 or later
Rust and Cargo installed
Installation
Install dependencies:
pnpm installBuild the server:
pnpm run buildFor development with auto-rebuild:
pnpm run watchUsage
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 inspectorThe 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
Available Tools
3 toolsget_crate_docA
Get crate's main documentation page. Useful for unresolved imports (e.g. use get_crate_doc when seeing 'unresolved import tokio::sync') or understanding crate features.
Inputs: project_path (required), crate_name (required).
list_symbolsB
List all symbols in a crate. Use when implementing traits or exploring available types. Shows structs, enums, traits with their paths.
Inputs: project_path (required), crate_name (required).
search_docB
Search crate docs for specific features, error messages, or usage examples. Helps debug compilation issues or learn new APIs.
Inputs: project_path (required), crate_name (required), query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_crate_doc retrieves main documentation pages, list_symbols enumerates all symbols in a crate, and search_doc performs targeted searches within documentation. There is no overlap in functionality, making it easy for an agent to select the appropriate tool based on the task.
All tool names follow a consistent verb_noun pattern (get_crate_doc, list_symbols, search_doc) with clear, descriptive verbs. There are no deviations in naming conventions, making the tool set predictable and easy to understand.
With only 3 tools, the server feels somewhat thin for a documentation-focused domain, as it might lack operations like updating or managing documentation. However, the tools cover core use cases, so it's borderline but not severely mismatched.
The tools provide good coverage for basic documentation tasks: retrieving main docs, listing symbols, and searching. Minor gaps exist, such as no direct support for navigating between documentation sections or handling version-specific docs, but agents can likely work around these limitations.
Maintenance
Related MCP Connectors
Search and read Rust documentation for the standard library and any crate on crates.io
Versioned documentation registry and semantic search for AI tools and coding assistants.
Search and read official Proa Rust framework documentation. Public, read-only, no credentials.
MCP server for opencode documentation, generated by doc2mcp.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn 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.33-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for fetching Rust crate documentation from docs.rs using the rustdoc JSON API.13Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that enables searching for Rust crates and their documentation from docs.rs, allowing AI agents to find required crates and access the latest documentation.422 npm38MIT
- AlicenseAqualityCmaintenanceMCP server that fetches and searches the latest stable documentation for any package from PyPI, npm, and crates.io.5MIT