docs.rs MCP
Enables searching for Rust crates and their documentation from docs.rs, allowing AI agents to search for required crates, obtain the latest documentation, search for specific APIs, and access crate READMEs.
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., "@docs.rs MCPsearch for crates that handle JSON serialization"
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
An MCP server that enables searching for Rust crates and their documentation from docs.rs.
English | 日本語
Overview
docs.rs MCP is an MCP server that searches the Rust crate documentation site docs.rs. By using this, AI Agents can search for required crates and obtain the latest documentation as needed.

Related MCP server: Documentation Retrieval MCP Server (DOCRET)
Features
Tools specialized for searching docs.rs
Supports multiple use cases, from searching for crates themselves to searching for specific APIs
LLM-friendly Markdown output
Requirements
Node.js 18 or newer
VS Code, Cursor, Claude Desktop or any other MCP client
Setup
Visual Studio Code (VSCode)
Add the following to .vscode/mcp.json:
{
"servers": {
"docs-rs": {
"command": "npx",
"args": [
"@nuskey8/docs-rs-mcp@latest",
"-y"
]
}
}
}Claude Code
Run the following command:
claude mcp add docs-rs -s project -- npx -y @nuskey8/docs-rs-mcp@latestCursor
You can install by pressing the button below:
Or, add a new MCP server that runs the npx @nuskey8/docs-rs-mcp command from Cursor Settings > MCP > Add new MCP Server.
Others
For other tools, please refer to the documentation as needed and add an MCP server that runs the npx @nuskey8/docs-rs-mcp command.
Tools
Tool | Description |
| Searches for crates by keyword. |
| Retrieves the README/overview of the specified crate. |
| Retrieves documentation for a specific item (module, struct, trait, enum, function, etc.) in a crate. |
| Searches for traits, structs, methods, etc. from the all.html page in a crate. |
License
This library is provided under the MIT License.
Available Tools
4 toolsdocs_rs_get_itemB
Get documentation content of a specific item (module, struct, trait, enum, function, etc.) within a crate
| Name | Required | Description | Default |
|---|---|---|---|
| crate_name | Yes | Name of the crate | |
| item_type | Yes | Type of item: 'module' for modules, 'struct', 'trait', 'enum', 'type', 'fn', etc. | |
| item_path | Yes | The full path of the item, including the module name (e.g. wasmtime::component::Component) | |
| version | No | Specific version (optional, defaults to latest) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Get[s] documentation content,' implying a read-only operation, but does not cover aspects like authentication needs, rate limits, error handling, or response format. For a tool with no annotations, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse and understand quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavioral traits, usage guidelines, and output expectations, which are important for effective tool invocation by an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already documents all parameters (crate_name, item_type, item_path, version). The description adds minimal value by listing item types (e.g., 'module, struct, trait, enum, function, etc.') and implying retrieval scope, but does not provide additional syntax or usage details beyond what the schema offers, aligning with the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get documentation content of a specific item (module, struct, trait, enum, function, etc.) within a crate.' It specifies the verb ('Get'), resource ('documentation content'), and scope ('within a crate'), but does not explicitly differentiate it from sibling tools like docs_rs_search_in_crate, which might search within a crate rather than retrieve specific item documentation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools such as docs_rs_search_in_crate or docs_rs_search_crates, nor does it specify prerequisites, exclusions, or contexts for usage, leaving the agent to infer based on tool names alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docs_rs_readmeB
Get README/overview content of the specified crate
| Name | Required | Description | Default |
|---|---|---|---|
| crate_name | Yes | Name of the crate to get README for | |
| version | No | Specific version (optional, defaults to latest) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get README/overview content') but doesn't add context such as whether this is a read-only operation, if it requires authentication, rate limits, error handling, or what the output format might be. For a tool with zero annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence: 'Get README/overview content of the specified crate.' It is front-loaded with the core purpose, has zero wasted words, and is appropriately sized for the tool's complexity, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states the purpose but lacks details on behavior, usage context, and output. Without annotations or an output schema, the description should do more to compensate, but it only meets the bare minimum for a simple read operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with clear descriptions for both parameters ('crate_name' and 'version'). The description adds no additional meaning beyond what the schema provides, such as format details or examples. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting for parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get README/overview content of the specified crate.' It specifies the verb ('Get') and resource ('README/overview content'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'docs_rs_get_item' or 'docs_rs_search_in_crate', which might also retrieve documentation content, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'docs_rs_get_item' or 'docs_rs_search_crates', nor does it specify contexts or exclusions for usage. This lack of comparative information leaves the agent without clear direction for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docs_rs_search_cratesB
Search for Rust crates by keywords on crates.io.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search keywords for finding relevant crates. Keywords should be in English. | |
| per_page | No | Number of results per page (default: 10, max: 100) | |
| sort | No | Sort order: 'relevance', 'downloads', 'recent-downloads', 'recent-updates', 'new' (default: relevance) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the tool searches for crates but doesn't disclose behavioral traits such as rate limits, authentication needs, error handling, or what the response format looks like (e.g., pagination, result structure). This is a significant gap for a search tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with zero waste, clearly front-loading the purpose. It's appropriately sized for a straightforward search tool, making every word count.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (search with three parameters) and no output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on behavior, output, or integration with siblings, leaving gaps that could hinder effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters (query, per_page, sort) with details like defaults and constraints. The description adds no additional meaning beyond what's in the schema, such as examples or usage tips, meeting the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Search for Rust crates') and the resource ('on crates.io'), with a specific verb+resource combination. It distinguishes from sibling tools like 'docs_rs_search_in_crate' by specifying the scope is crates rather than within a crate, but could be more explicit about this differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for finding crates by keywords, but lacks explicit guidance on when to use this tool versus alternatives like 'docs_rs_get_item' or 'docs_rs_search_in_crate'. No exclusions or prerequisites are mentioned, leaving usage context somewhat vague.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
docs_rs_search_in_crateA
Search for traits, structs, methods, etc. from the crate's all.html page. To get a module, use docs_rs_get_item instead.
| Name | Required | Description | Default |
|---|---|---|---|
| crate_name | Yes | Name of the crate to search | |
| query | Yes | Search keyword (trait name, struct name, function name, etc.) | |
| version | No | Specific version (optional, defaults to latest) | |
| item_type | No | Filter by item type (struct | trait | fn | enum| union | macro | constant) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the source ('from the crate's all.html page') which adds useful context about where the search is performed, but doesn't disclose behavioral aspects like rate limits, authentication needs, pagination, or what happens when no results are found. The description is neutral about mutation/safety but doesn't explicitly state it's read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with two sentences that each serve a clear purpose: the first states what the tool does, and the second provides crucial sibling differentiation. There's zero wasted language and it's front-loaded with the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (search operation with 4 parameters), 100% schema coverage, and no output schema, the description provides good contextual completeness. It clearly states the purpose and sibling differentiation, though it could benefit from mentioning what the search returns (e.g., list of matching items) since there's no output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all four parameters thoroughly. The description doesn't add any parameter-specific details beyond what's in the schema (like explaining search semantics or item_type usage). It meets the baseline for high schema coverage but doesn't enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Search for traits, structs, methods, etc.') and resource ('from the crate's all.html page'), with explicit differentiation from the sibling tool docs_rs_get_item. It uses precise terminology that distinguishes it from other search tools like docs_rs_search_crates.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool versus alternatives: 'To get a module, use docs_rs_get_item instead.' This clearly delineates the boundary between searching within a crate versus retrieving specific module items, though it doesn't mention docs_rs_search_crates or docs_rs_readme.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
- First observed
docs_rs_get_item - First observed
docs_rs_readme - First observed
docs_rs_search_crates - First observed
docs_rs_search_in_crate
TDQS
Each tool has a clearly distinct purpose: get_item retrieves specific documentation, readme gets crate overviews, search_crates finds crates, and search_in_crate searches within a crate. The descriptions explicitly differentiate them, with no overlap in functionality.
All tools follow a consistent docs_rs_verb_noun naming pattern (e.g., docs_rs_get_item, docs_rs_search_crates). This uniformity makes the tool set predictable and easy to understand at a glance.
With 4 tools, this server is well-scoped for its purpose of accessing Rust documentation. Each tool serves a distinct and necessary function, with no redundancy or missing core operations for the domain.
The tool set covers key operations for Rust documentation access: retrieving specific items, crate overviews, crate searching, and intra-crate searching. A minor gap might be the lack of a tool for listing all items in a crate, but the provided tools enable effective workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Capability registry for the agentic economy. Semantic search over verified MCP server listings.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for agentverse documentation, generated by doc2mcp.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides AI tools with access to Rust documentation from docs.rs, enabling search for crates, documentation, type information, feature flags, version information, and source code.31-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to access up-to-date documentation for Python libraries like LangChain, LlamaIndex, and OpenAI through dynamic fetching from official sources.1MIT
- AlicenseAqualityDmaintenanceMCP server that fetches and searches the latest stable documentation for any package from PyPI, npm, and crates.io.5MIT
- FlicenseNot gradedqualityDmaintenanceA Docs.rs MCP server that enables AI models to deeply access Rust crate documentation, including searching crates, viewing API definitions, feature flags, and code examples, all within the editor.152-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nuskey8/docs-rs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server