Labsco
vexxvakan logo

Rust Docs Server

โ˜… 13

from vexxvakan

Fetches Rust crate documentation from docs.rs using the rustdoc JSON API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeNeeds API keys

Docs.rs MCP Server

License: Apache 2.0

A Model Context Protocol (MCP) server for fetching Rust crate documentation from docs.rs

Features โ€ข Getting Started โ€ข Tools โ€ข Contributing โ€ข Acknowledgments โ€ข License

Features

<a id="features"></a>

  • 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

Tools

<a id="tools"></a>

The server exposes four MCP tools:

Crate

crate_lookup

Retrieves a crate overview with its structure and public API surface from docs.rs.

ParameterTypeRequiredDescription
crateNamestringYesName of the Rust crate to inspect
versionstringNoSpecific version or semver range, for example "1.0.0" or "~4"
targetstringNoTarget platform, for example "i686-pc-windows-msvc"
formatVersionnumberNoRustdoc JSON format version
{
  "tool": "crate_lookup",
  "arguments": {
    "crateName": "tokio",
    "version": "1.48.0"
  }
}

crate_docs

Retrieves the crate-level documentation page from docs.rs.

ParameterTypeRequiredDescription
crateNamestringYesName of the Rust crate to inspect
versionstringNoSpecific version or semver range, for example "1.0.0" or "~4"
targetstringNoTarget platform, for example "i686-pc-windows-msvc"
formatVersionnumberNoRustdoc 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.

ParameterTypeRequiredDescription
querystringYesSearch query for crate names
limitnumberNoMaximum number of results to return. Defaults to 10
{
  "tool": "crate_find",
  "arguments": {
    "query": "rustdoc json",
    "limit": 5
  }
}

Symbol

symbol_lookup

Retrieves structured symbol metadata for one symbol inside a crate.

ParameterTypeRequiredDescription
crateNamestringYesName of the Rust crate
symbolTypestringYesRustdoc symbol type, for example "struct", "function", or "trait"
symbolnamestringYesSymbol name or path, for example "runtime::Runtime" or "spawn"
versionstringNoSpecific version or semver range
targetstringNoTarget platform
{
  "tool": "symbol_lookup",
  "arguments": {
    "crateName": "tokio",
    "symbolType": "struct",
    "symbolname": "runtime::Runtime"
  }
}

symbol_docs

Retrieves the full documentation body for one symbol inside a crate.

ParameterTypeRequiredDescription
crateNamestringYesName of the Rust crate
symbolTypestringYesRustdoc symbol type, for example "struct", "function", or "trait"
symbolnamestringYesSymbol name or path, for example "runtime::Runtime" or "spawn"
versionstringNoSpecific version or semver range
targetstringNoTarget platform
{
  "tool": "symbol_docs",
  "arguments": {
    "crateName": "tokio",
    "symbolType": "struct",
    "symbolname": "runtime::Runtime"
  }
}