rust-docs-mcp-server

Local MCP server that answers Rust crate API questions from generated cargo docs.

Local

Install

See the repository for setup

What it does

This is a Model Context Protocol server that gives an AI coding assistant fresh, crate-specific Rust documentation. Each instance targets one crate, identified with a Cargo package ID specification such as serde@^1.0 or tokio, and you can optionally pass required features with the -F flag for crates that need them to build docs.

It is aimed at developers using AI assistants like Cursor, Cline, Roo Code, or Claude Desktop who need answers about current crate APIs rather than the model's training data. On first launch for a given crate, version, and feature set, it runs cargo doc in a temporary project, extracts text from the generated HTML, and creates embeddings through OpenAI. Results are cached under the XDG data directory, so later starts are faster.

The server speaks MCP over stdio and exposes one tool, query_rust_docs, which takes a question and returns a summarized answer based on retrieved documentation, plus a crate resource. Supported clients include Roo Code and Claude Desktop, configured with the binary path or command.

Limitations: an OPENAI_API_KEY is required, network access is needed, and the first run per crate configuration downloads documentation and incurs embedding cost. Multiple instances must be started separately for different crates.

Compatibility and authentication

Connection
Local
Transports
Unspecified
Authentication
Unknown

Security and permissions

  • When you run the server locally, it runs with your user permissions.
  • Authentication type: Unknown.

Repository data

Stars
301
Last push
Nov 24, 2025
License
MIT
Archived
No

Other OpenAI MCP servers

Compare servers

FAQ

What license does rust-docs-mcp-server use?
MIT
Does rust-docs-mcp-server run locally or remotely?
It runs locally.
Is rust-docs-mcp-server an official server?
It is listed as a community server.

Comments

No comments yet.

Embed a listing badge

Featured on AI Agents Marketplace
<a href="https://aiagentsmarketplace.dev/mcp/rust-docs-mcp-server"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
See badge options