Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

rust-docs-mcp-server

MCP.Pizza Chef: laptou

The rust-docs-mcp-server is an MCP server that exposes Rust documentation from docs.rs to AI models. It enables searching crates, retrieving documentation, type information, feature flags, version numbers, symbol definitions, and source code. This server supports developers and AI tools by providing structured, real-time access to Rust ecosystem data, facilitating code understanding and integration within AI workflows.

Use This MCP server To

Search Rust crates documentation on docs.rs Retrieve type information for Rust structs, enums, and traits Get feature flags for specific Rust crates Fetch available versions of Rust crates Access source code for Rust crate items Search for symbols within Rust crates

README

Rust Docs MCP Server

An MCP (Model Context Protocol) server that provides access to Rust documentation from docs.rs. This server allows AI tools to search for documentation, type information, feature flags, version numbers, and symbol definitions/source code.

Features

  • Search for crates on docs.rs
  • Get documentation for specific crates and versions
  • Get type information (structs, enums, traits, etc.)
  • Get feature flags for crates
  • Get available versions for crates
  • Get source code for specific items
  • Search for symbols within crates

Installation

This project uses Bun for development, but the built server can run with Node.js.

# Clone the repository
git clone https://github.com/yourusername/rust-docs-mcp-server.git
cd rust-docs-mcp-server

# Install dependencies
bun install

Building

# Build the server
bun run build

This will create a build directory with the compiled JavaScript files.

Running

# Run the development server
bun run dev

# Or run the built server
bun run start

Usage with MCP Clients

This server implements the Model Context Protocol and can be used with any MCP client. To use it with an MCP client, you'll need to configure the client to connect to this server.

Available Tools

The server provides the following tools:

  • search_crates: Search for crates on docs.rs
  • get_crate_documentation: Get documentation for a specific crate
  • get_type_info: Get type information for a specific item
  • get_feature_flags: Get feature flags for a crate
  • get_crate_versions: Get available versions for a crate
  • get_source_code: Get source code for a specific item
  • search_symbols: Search for symbols within a crate

Testing

# Run tests
bun test

License

MIT

rust-docs-mcp-server FAQ

How do I install the rust-docs-mcp-server?
Clone the repository, install dependencies with Bun, and build using 'bun run build'.
Can I run the rust-docs-mcp-server with Node.js?
Yes, the built server can run with Node.js after building with Bun.
What Rust documentation sources does this server use?
It uses docs.rs to provide comprehensive Rust crate documentation.
Does the server support searching for specific symbols in crates?
Yes, it allows searching for symbols within Rust crates.
How does the server provide type information?
It exposes detailed type info such as structs, enums, and traits from Rust crates.
Can I get feature flags for crates using this server?
Yes, the server provides feature flag information for Rust crates.
Is this server suitable for integrating with AI tools?
Yes, it is designed to feed structured Rust documentation context into AI models like OpenAI, Claude, and Gemini.