Rust Docs MCP Server logo

Rust Docs MCP Server

by Govcraft

Queries current Rust crate documentation through semantic search and OpenAI-generated answers over MCP stdio.

Install Rust Docs MCP Server

Run the project’s own setup commands, in order.

Setup steps from the project

Govcraft/rust-docs-mcp-server installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/Govcraft/rust-docs-mcp-server.git
    
  2. 2. Install
    cd rust-docs-mcp-server
    
  3. 3. Install
    cargo build --release
    
  4. 4. Start the server
    rustdocs_mcp_server "serde@^1.0"
    
  5. 5. Start the server
    rustdocs_mcp_server "reqwest@0.12.0"
    
  6. 6. Start the server
    rustdocs_mcp_server "async-stripe@0.40" -F runtime-tokio-hyper-rustls
    

Overview

Govcraft/rust-docs-mcp-server MCP server turns documentation for one Rust crate into an MCP query tool. It downloads crate docs with Cargo, parses the HTML, creates OpenAI embeddings, and summarizes retrieved context with an OpenAI model. Run a separate instance for each crate, version requirement, and feature set you want an AI coding assistant to consult. It is useful when generated Rust code needs current API or usage guidance.

Use cases

  • Query current serde APIs before generating Rust serialization code
  • Check reqwest usage against a specific crate version
  • Load async-stripe documentation with required Cargo features
  • Run separate instances for several Rust crates

Key features

  • Query documentation for one configured Rust crate
  • Search crate docs with OpenAI embeddings
  • Summarize retrieved documentation context
  • Support Cargo feature selection
  • Cache documentation and embeddings
  • Expose crate metadata as an MCP resource

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

33/33 checks healthy over the last 113d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars301Stargazers on the source repository.
Last commit1y agoMost recent push to the default branch.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Rust Docs MCP Server works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Rust Docs MCP Server

Govcraft/rust-docs-mcp-server is an MCP server that connects an AI client to current documentation for one Rust crate. Its main tool, query_rust_docs, uses semantic search with OpenAI embeddings and LLM summarization to answer API or usage questions from retrieved crate documentation. It also exposes the configured crate as an MCP resource.

Install it by downloading the matching prebuilt archive from GitHub Releases, extracting the binary, and placing it on PATH. You can also build it with Cargo after installing the Rust toolchain: clone the repository, enter its directory, and run cargo build --release.

Pass the crate's Cargo Package ID Specification when launching the binary, such as `tokio`, `serde@^1.0`, or `reqwest@0.12.0`. Add `-F` or `--features` with a comma-separated list when documentation requires specific Cargo features.

Yes, it works with Cursor as a standard MCP server over stdio. Configure Cursor to launch the binary with the target crate as an argument and provide `OPENAI_API_KEY` in the server environment. The README also names Cline and Roo Code as compatible coding assistants.

The first launch is slower because the server downloads crate documentation, parses it, generates OpenAI embeddings, and caches the results for that crate, version, and feature set. Run it once directly with network access and an API key; later launches can use the cache.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRust Docs MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/govcraft-rust-docs-mcp-server?style=directory)](https://allmcps.com/mcp/govcraft-rust-docs-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/govcraft-rust-docs-mcp-server"><img src="https://allmcps.com/api/badge/govcraft-rust-docs-mcp-server?style=directory" alt="Rust Docs MCP Server on AllMCPs" /></a>