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 "Install 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 Serversearch 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: McpDocServer
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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAn 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 updated31
- AlicenseCqualityDmaintenanceA 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 updated348MIT
- Alicense-qualityDmaintenanceA Model Context Protocol (MCP) server for fetching Rust crate documentation from docs.rs using the rustdoc JSON API.Last updated13Apache 2.0
- AlicenseAqualityCmaintenanceAn 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.Last updated41936MIT
Related MCP Connectors
DevDocs.io keyless docs index + entry search + content (Angular, MDN, Rust, etc.).
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
MCP server for accessing curated awesome list documentation
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/spacemeowx2/cargo-doc-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server