rust-docs-mcp-server

rust-docs-mcp-server

91

The Rust Docs MCP Server is designed to provide AI coding assistants with quick access to up-to-date documentation for specific Rust crates. It simplifies the querying of crate API details, leveraging OpenAI's technology to enhance code assistant accuracy and reduce development time.

Rust Docs MCP Server

Motivation

This project enhances the capabilities of AI coding assistants by providing an up-to-date knowledge source for specific Rust crates, helping to address training data cut-off issues.

Features

  • Focused documentation per Rust crate
  • Usage of OpenAI models for semantic search and summarization
  • Caching for faster subsequent launches
  • Integration with Model Context Protocol (MCP)

Prerequisites

  • OpenAI API Key

Installation

Download the pre-compiled binary from the GitHub Releases page or build from source using the Rust Toolchain.

Usage

Run the server from the command line specifying the target crate and its features. It caches the documentation content and embeddings for faster future access.

MCP Interaction

The server provides a query_rust_docs tool for querying documentation and exposes a resource with the crate URL.

Example Configuration

Provided for integration with clients like Roo Code and Claude Desktop.

Caching

Documents and embeddings are cached in the user directory, ensuring different feature sets have separate caches.