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.
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
- Parameters:
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
- Parameters:
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 inquery
: Search query (keyword or symbol)limit
(optional): Maximum number of results to return (default: 10)
- Parameters:
Requirements
- Node.js 16 or later
- Rust and Cargo installed
Installation
Install dependencies:
Build the server:
For development with auto-rebuild:
Usage
Add the following configuration:
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP 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
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.
Related Resources
Related MCP Servers
- -securityFlicense-qualityAn 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 -22TypeScript
- AsecurityAlicenseAqualityA documentation server based on MCP protocol designed for various development frameworks that provides multi-threaded document crawling, local document loading, keyword searching, and document detail retrieval.Last updated -251JavaScriptMIT License
- -securityAlicense-qualityA document-based MCP server that supports keyword searching and content retrieval from official website documentation.Last updated -5TypeScriptMIT License
- -securityAlicense-qualityA server that provides organized documentation content for various applications using the Model Context Protocol, enabling AI assistants to access quickstart guides and code examples.Last updated -PythonMIT License