# Govcraft/rust-docs-mcp-server [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Govcraft/rust-docs-mcp-server  
**GitHub Stars:** 301  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/govcraft-rust-docs-mcp-server

## Description
Provides up-to-date documentation context for a specific Rust crate to LLMs via an MCP tool, using semantic search (embeddings) and LLM summarization.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/Govcraft/rust-docs-mcp-server), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/Govcraft/rust-docs-mcp-server.git
```

2. Install:

```sh
cd rust-docs-mcp-server
```

3. Install:

```sh
cargo build --release
```

4. Start the server:

```sh
rustdocs_mcp_server "serde@^1.0"
```

5. Start the server:

```sh
rustdocs_mcp_server "reqwest@0.12.0"
```

6. Start the server:

```sh
rustdocs_mcp_server "async-stripe@0.40" -F runtime-tokio-hyper-rustls
```

## Documentation

## What Govcraft/rust-docs-mcp-server MCP server does

Govcraft/rust-docs-mcp-server MCP server provides an MCP interface to the documentation for one Rust crate. Each process is configured with a Cargo Package ID Specification, such as `serde`, `tokio`, `reqwest@0.12.0`, or a version requirement like `serde@^1.0`. The server can also receive a comma-separated feature list for crates whose documentation requires selected Cargo features.

Its main tool is `query_rust_docs`. An MCP client sends a question about the configured crate's API or usage, and the server returns a text answer based on relevant documentation. The response is prefixed with the crate name. The server also exposes a `crate://<crate_name>` resource containing the configured crate name and sends operational messages through MCP logging notifications.

## How it works

On an initial launch for a particular crate version and feature combination, the process uses `cargo doc` to obtain documentation, parses the generated HTML, and creates embeddings with OpenAI's `text-embedding-3-small`. For each question, semantic search identifies relevant documentation sections. OpenAI's `gpt-4o-mini-2024-07-18` then produces a concise answer using that retrieved documentation context.

Generated documentation and embeddings are cached under the user's XDG data directory, such as `~/.local/share/rustdocs-mcp-server/`. The cache key includes the crate, version, and requested features, so later launches with the same configuration can avoid repeating the preparation work. Multiple processes can run concurrently when an assistant needs documentation for several crates.

## Setup and configuration

Install a prebuilt release archive from the project's GitHub Releases page, extract `rustdocs_mcp_server` or its Windows executable, and place it on `PATH`. Alternatively, install the Rust toolchain, clone the repository, and run `cargo build --release`.

Set `OPENAI_API_KEY` before starting the Govcraft/rust-docs-mcp-server MCP server. Network access is required both to download crate dependencies and to call the OpenAI API. Start the binary with the crate package specification, followed optionally by `-F` or `--features`:

- `rustdocs_mcp_server tokio`
- `rustdocs_mcp_server "reqwest@0.12.0"`
- `rustdocs_mcp_server "async-stripe@0.40" -F runtime-tokio-hyper-rustls`

For a new crate, version, or feature set, the first run may take time while documentation and embeddings are prepared. Running it once directly before adding it to an MCP client allows the cache to be populated. Subsequent launches for the same configuration start faster.

## Tools and capabilities

- Query one configured Rust crate through `query_rust_docs`.
- Search documentation semantically using OpenAI embeddings.
- Generate answers from retrieved documentation context with an OpenAI summarization model.
- Enable Cargo features needed for documentation generation.
- Reuse cached documentation and embeddings by crate, version, and feature set.
- Expose the configured crate name as an MCP resource.

## Limitations and notes

The Govcraft/rust-docs-mcp-server MCP server is scoped to one crate per process; configure multiple instances to cover multiple crates. It depends on an OpenAI API key and internet connectivity during preparation and API requests. Initial embedding generation can take time and incurs OpenAI usage costs. The server communicates over standard input/output, so it must be launched as a stdio MCP process by the client. This project fits the 💻 Developer Tools category.

_Full upstream README: https://allmcps.com/mcp/govcraft-rust-docs-mcp-server/readme_

