npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rs-docsrs-mcp

v0.3.3

Published

Model Context Protocol (MCP) server for docs.rs - Search and fetch Rust crate documentation

Readme

rs-docsrs-mcp

A Model Context Protocol (MCP) server for docs.rs - enabling AI assistants to search and fetch Rust crate documentation.

npm version License: MIT

Features

  • 🔍 Search Crates: Search for Rust crates on docs.rs by name or keyword
  • 📦 Crate Information: Get detailed information about specific crates
  • 📚 Documentation Access: Fetch documentation for specific modules, structs, functions, and more
  • 📑 Module Listing: List all modules, structs, enums, functions, traits, and macros in a crate
  • 📖 README Access: Retrieve crate README and metadata

Installation

Install globally via npm:

npm install -g rs-docsrs-mcp

Or use with npx:

npx rs-docsrs-mcp

Usage with Claude Desktop

Add to your Claude Desktop configuration file:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "docsrs": {
      "command": "npx",
      "args": ["-y", "rs-docsrs-mcp"]
    }
  }
}

If installed globally:

{
  "mcpServers": {
    "docsrs": {
      "command": "rs-docsrs-mcp"
    }
  }
}

Available Tools

1. docs_rs_search

Search for crates on docs.rs.

Parameters:

  • query (string, required): Crate name or keyword to search
  • limit (number, optional): Maximum number of results (1-50, default: 10)

Example:

{
  "query": "tokio",
  "limit": 5
}

2. docs_rs_crate_home

Get homepage information for a specific crate.

Parameters:

  • crate (string, required): Crate name

Example:

{
  "crate": "tokio"
}

3. docs_rs_get_doc

Get documentation for a specific path in a crate.

Parameters:

  • crate (string, required): Crate name
  • version (string, optional): Version (default: "latest")
  • path (string, optional): Documentation path (e.g., "tokio/runtime/index.html")

Examples:

{
  "crate": "tokio",
  "version": "latest",
  "path": "tokio/runtime/struct.Runtime.html"
}
{
  "crate": "serde",
  "path": "serde/trait.Serialize.html"
}

4. docs_rs_list_modules

List all modules and items in a crate.

Parameters:

  • crate (string, required): Crate name
  • version (string, optional): Version (default: "latest")

Example:

{
  "crate": "tokio",
  "version": "1.35.0"
}

Returns:

  • modules: List of modules with descriptions
  • structs: List of structs
  • enums: List of enums
  • functions: List of functions
  • traits: List of traits
  • macros: List of macros

5. docs_rs_get_readme

Get README and metadata for a crate.

Parameters:

  • crate (string, required): Crate name
  • version (string, optional): Version (default: "latest")

Example:

{
  "crate": "tokio"
}

Example Queries

Once configured, you can ask Claude:

  • "Search for HTTP client crates"
  • "Show me the tokio runtime documentation"
  • "List all modules in the serde crate"
  • "Get the README for actix-web"
  • "What structs are available in tokio?"

Development

Clone the repository:

git clone https://github.com/lazhenyi/rs-docsrs-mcp.git
cd rs-docsrs-mcp
npm install

Run locally:

npm start

Requirements

  • Node.js >= 18.0.0

How It Works

This MCP server scrapes documentation from docs.rs to provide structured information about Rust crates. It uses:

  • cheerio: For HTML parsing
  • node-fetch: For HTTP requests
  • @modelcontextprotocol/sdk: For MCP protocol implementation
  • zod: For parameter validation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Links

Support

If you encounter any issues or have questions, please open an issue on GitHub.