★ 278 Rust MIT sse 更新 1小时前

Rust Docs

🦀 Prevents outdated Rust code suggestions from AI assistants. This MCP server fetches current crate docs, uses embeddings/LLMs, and provides accurate context via a tool call.

安装配置

暂未识别到可直接复制的 MCP 配置,请查看 GitHub README。后台管理员可以补充配置。

README 摘要

# Rust Docs MCP Server [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) ⭐ **Like this project? Please [star the repository](https://github.com/Govcraft/rust-docs-mcp-server) on GitHub to show your support and stay updated!** ⭐ ## Motivation Modern AI-powered coding assistants (like Cursor, Cline, Roo Code, etc.) excel at understanding code structure and syntax but often struggle with the specifics of rapidly evolving libraries and frameworks, especially in ecosystems like Rust where crates are updated frequently. Their training data cutoff means they may lack knowledge of the latest APIs, leading to incorrect or outdated code suggestions. This MCP server addresses this challenge by providing a focused, up-to-date knowledge source for a specific Rust crate. By running an instance of this server for a crate (e.g., `serde`, `tokio`, `reqwest`), you give your LLM coding assistant a tool (`query_rust_docs`) it can use _before_ writing code related to that crate. When instructed to use this tool, the LLM can ask specific questions about the crate's API or usage and receive answers derived directly from the _current_ documentation. This significantly improves the accuracy and relevance of the generated code, reducing the need for manual correction and speeding up development. Multiple instances of this server can be run concurrently, allowing the LLM assistant to access documentation for several different crates during a coding session. This server fetches the documentation for a specified Rust crate, generates embeddings for the content, and provides an MCP tool to answer questions about the crate based on the documentation context. ## Features - **Targeted Documentation:** Focuses on a single Rust crate per server instance. - **Feature Support:** Allows specifying required crate features for documentation generation. - **Semantic Search:** Uses OpenAI's `text-embedding-3-small` model to find the most relevant documentation sections for a given question. - **LLM Summarization:** Leverages OpenAI's `gpt-4o-mini-2024-07-18` model to generate concise answers based _only_ on the retrieved documentation context. - **Caching:** Caches generated documentation content and embeddings in the user's XDG data directory (`~/.local/share/rustdocs-mcp-server/` or similar) based on crate, version, _and_ requested features to speed up subsequent launches. - **MCP Integration:** Runs as a standard MCP server over stdio, exposing tools and resources. ## Prerequisites - **OpenAI API Key:** Needed for generating embeddings and summarizing answers. The server expects this key to be available in the `OPENAI_API_KEY` environment variable. (The server also requires network access to download crate dependencies and interact with the OpenAI API). ## Installation The recommended way to install is to download the pre-compiled binary for your operating system from the [GitHub Releases page](https://github.com/Govcraft/rust-docs-mcp-server/releases). 1. Go to the [Releases page](https://github.com/Govcraft/rust-docs-mcp-server/releases). 2. Download the appropriate archive (`.zip` for Windows, `.tar.gz` for Linux/macOS) for your system. 3. Extract the `rustdocs_mcp_server` (or `rustdocs_mcp_server.exe`) binary. 4. Place the binary in a directory included in your system's `PATH` environment variable (e.g., `/usr/local/bin`, `~/bin`). ### Building from Source (Alternat...

相关 MCP

Libre Chat

Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, M...

★ 37614 TypeScript sse 待补充
mcp sse TypeScript

Github

GitHub's official MCP Server

★ 30243 Go sse 待补充
mcp sse Go

Fast

🚀 The fast, Pythonic way to build MCP servers and clients.

★ 25364 Python sse 待补充
mcp Python sse