Rust DocsSAFE
An MCP to retrieve rust crate documentation for LLM's
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
This is a Model Context Protocol (MCP) server that fetches and returns documentation for Rust crates providing essential context for LLM's when working with Rust code.
Features
- Fetches documentation for any Rust crate available on docs.rs
- Strips HTML and formats the content for readability
- Limits response size to prevent overwhelming the client
- Uses the latest MCP SDK (v1.6.1)
Installation
# Clone the repository git https://github.com/0xKoda/mcp-rust-docs.git cd mcp-rust-docs # Install dependencies npm install
Prerequisites
- Node.js
- npm
Usage
# Start the server directly npm start
Integrating with AI Assistants
Claude Desktop
Add the following to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"rust-docs": {
"command": "node",
"args": ["/absolute/path/to/index.js"]
}
}
}Replace /absolute/path/to/index.js with the absolute path to the index.js file in this repository.
Example Usage
Once the server is running and configured with your AI assistant, you can ask questions like:
- "Look up the documentation for the 'tokio' crate"
- "What features does the 'serde' crate provide?"
- "Show me the documentation for 'ratatui'"
- "Can you explain the main modules in the 'axum' crate?"
The AI will use the lookup_crate_docs tool to fetch and display the relevant documentation.
Testing with MCP Inspector
You can test this server using the MCP Inspector:
npx @modelcontextprotocol/inspector
Then select the "Connect to a local server" option and follow the prompts.
How It Works
This server implements a single MCP tool called lookup_crate_docs that:
- Takes a Rust crate name as input (optional, defaults to 'tokio' if not provided)
- Fetches the documentation from docs.rs
- Converts the HTML to plain text using the html-to-text library
- Truncates the content if it e
a866d807783aOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add mcp-rust-docs -- npx -y [email protected]
{
"mcpServers": {
"mcp-rust-docs": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
lookup_crate_docs | read | Lookup documentation for a Rust crate from docs.rs |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
@modelcontextprotocol/sdk, axios, html-to-text
Gates applied: no_behavioural_pass, no_license.
a866d807783afull audit observations/trust-audit/mcp-server/0xkoda__rust-docs.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | a866d807783a | SAFE | B | 89 | first audit |
Questions
What is the Rust Docs MCP server?
An MCP to retrieve rust crate documentation for LLM's
What tools does Rust Docs expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Rust Docs safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Rust Docs need?
No credential environment variables were found in its source, so it appears to need none.
How does Rust Docs run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-rust-docs at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (a866d807783a), read on 2026-10-08. The repository is watched and re-audited when it changes.