- Home
- MCP servers
- CrateDocs
CrateDocs
- rust
57
GitHub Stars
rust
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run CrateDocs MCP to let language models look up Rust crate documentation, search crates, and inspect specific items directly from within your workflows. This MCP server organizes crate docs access into simple tools you can call from clients that support the MCP protocol, enabling fast, contextual Rust documentation in your prompts and automated tasks.
How to use
To use CrateDocs MCP, start the server in either stdio mode for local testing or HTTP mode for remote access. Your MCP client can request general crate documentation, search crates by keywords, or fetch documentation for a specific item inside a crate. Use the available tools to look up crates like tokio, search for crates by a keyword such as async runtime, or retrieve documentation for a path like tokio::sync.
How to install
Prerequisites: you need Rust tooling installed to build and run the MCP server.
# Clone the project repository
git clone https://github.com/d6e/cratedocs-mcp.git
cd cratedocs-mcp
# Build in release mode
cargo build --release
Additional notes
The server includes a caching mechanism to minimize redundant documentation lookups. It relies on docs.rs for crate documentation and crates.io for crate searches. Results are returned as plain text or HTML that your client can render or display.
Configuration and runtime
There are two MCP connection methods available for CrateDocs MCP: an HTTP server mode and a local stdio mode. Use the HTTP mode to expose the MCP endpoint over the network and the stdio mode for direct integration in your local tooling.
Available tools
lookup_crate
Retrieves documentation for a specified Rust crate. Parameters include crate_name and an optional version. This tool returns the general crate documentation.
search_crates
Searches for Rust crates on crates.io based on a textual query. You can limit the number of results returned.
lookup_item
Retrieves documentation for a specific item within a crate, referenced by the crate name and the item path, with an optional version.