Fetches Rust crate documentation from docs.rs using the rustdoc JSON API, allowing lookup of entire crates or specific items like structs, functions, and traits with version specification support
Provides access to Rust language documentation, with tools for looking up specific crates, items, and API documentation with version-specific support
Uses SQLite for cache persistence, allowing for database querying and management of cached documentation with support for custom SQL queries
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Rust Docs Servershow me the documentation for the serde crate"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Docs.rs MCP Server
A Model Context Protocol (MCP) server for fetching Rust crate documentation from docs.rs
Features • Getting Started • Tools • Contributing • Acknowledgments • License
Features
Find New Crates - Search crates by exact name, partial match, or fuzzy query to discover relevant libraries
Inspect Crate Symbols - Inspect structs, traits, functions, and any other symbol inside a crate
Review Crate Summaries - Get a crate overview with its structure and public API surface
Read Full Documentation - Read crate-level documentation
Related MCP server: Rust Docs MCP Server
Getting Started
Using Pre-built Executables
Download the latest release for your platform from the Releases page:
Linux
x64/AMD64 (GLIBC):
mcp-docsrs-linux-x64- For Ubuntu, Debian, Fedora, etc.ARM64 (GLIBC):
mcp-docsrs-linux-arm64- For ARM64 systems, AWS Gravitonx64/AMD64 (MUSL):
mcp-docsrs-linux-x64-musl- For Alpine Linux, Docker containers (requires libstdc++)ARM64 (MUSL):
mcp-docsrs-linux-arm64-musl- For Alpine on ARM64, minimal containers (requires libstdc++)
macOS
Intel:
mcp-docsrs-darwin-x64- For Intel-based MacsApple Silicon:
mcp-docsrs-darwin-arm64- For M-series Macs
Windows
x64:
mcp-docsrs-windows-x64.exe- For 64-bit Windows
Using Docker
Pull and run the latest multi-arch image (supports both x64 and ARM64):
# Pull the latest image
docker pull ghcr.io/vexxvakan/mcp-docsrs:latest
# Run the server
docker run --rm -i ghcr.io/vexxvakan/mcp-docsrs:latest
# Run with custom configuration
docker run --rm -i ghcr.io/vexxvakan/mcp-docsrs:latest \
--cache-ttl 7200000 --max-cache-size 200Available tags:
latest- Latest stable release (multi-arch)v1.0.0- Specific version (multi-arch)
MCP Setup
Client | Command |
Codex |
|
Claude Code |
|
Gemini CLI |
|
OpenCode | Run |
VS Code | Open Command Palette ( |
Cursor | Open Settings ( |
After adding the server, restart the client if it does not discover the tools immediately.
Configuration
Configure the server using environment variables or command-line arguments:
Variable | CLI Flag | Default | Description |
|
| 3600000 | Cache time-to-live in milliseconds |
|
| 100 | Maximum number of cached entries |
|
| 30000 | HTTP request timeout in milliseconds |
|
| :memory: | Path to SQLite database file |
Tools
The server exposes four MCP tools:
Crate
crate_lookup
Retrieves a crate overview with its structure and public API surface from docs.rs.
Parameter | Type | Required | Description |
| string | Yes | Name of the Rust crate to inspect |
| string | No | Specific version or semver range, for example |
| string | No | Target platform, for example |
| number | No | Rustdoc JSON format version |
{
"tool": "crate_lookup",
"arguments": {
"crateName": "tokio",
"version": "1.48.0"
}
}crate_docs
Retrieves the crate-level documentation page from docs.rs.
Parameter | Type | Required | Description |
| string | Yes | Name of the Rust crate to inspect |
| string | No | Specific version or semver range, for example |
| string | No | Target platform, for example |
| number | No | Rustdoc JSON format version |
{
"tool": "crate_docs",
"arguments": {
"crateName": "serde"
}
}crate_find
Searches crates.io for matching crates and returns ranked results using fuzzy and partial name matching.
Parameter | Type | Required | Description |
| string | Yes | Search query for crate names |
| number | No | Maximum number of results to return. Defaults to |
{
"tool": "crate_find",
"arguments": {
"query": "rustdoc json",
"limit": 5
}
}Symbol
lookup_symbol
Retrieves documentation for one symbol inside a crate. By default the response includes a preview of the docs. Set expandDocs to true to return the full documentation text.
Parameter | Type | Required | Description |
| string | Yes | Name of the Rust crate |
| string | Yes | Rustdoc symbol type, for example |
| string | Yes | Symbol name or path, for example |
| boolean | No | When |
| string | No | Specific version or semver range |
| string | No | Target platform |
{
"tool": "lookup_symbol",
"arguments": {
"crateName": "tokio",
"symbolType": "struct",
"symbolname": "runtime::Runtime"
}
}Contributing
See CONTRIBUTING.md.
See TESTING.md.
Acknowledgments
docs.rs for providing the Rust documentation API
Model Context Protocol for the MCP specification
The Rust community for excellent documentation standards
License
This project is licensed under the Apache License 2.0. See LICENSE for the license text and NOTICE for attribution details.
Made with ❤️ for the Rust community
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.