GR

govcraft/rust-docs-mcp-server

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

300 stars 37 forks 品質 69 トレンド 19MIT

govcraft/rust-docs-mcp-server は、[[T0]からインポートされたMCPサーバー候補です。

概要

govcraft/rust-docs-mcp-server は、[[T0]からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

⭐ このプロジェクト、気に入った?お願いします リポジトリに星をつけて GitHubで応援を示し、最新情報をお届けします! ⭐

動機

最新のAI搭載のコーディングアシスタント(Cursor、Cline、Roo Codeなど)はExcelを活用しています コード構造や構文を理解することは得意ですが、細かい部分にはしばしば苦労します 特にRustのようなエコシステムにおいて、急速に進化するライブラリやフレームワークについて クレートは頻繁に更新されます。訓練データのカットオフがあるため、 最新のAPIに関する知識不足により、誤ったまたは古いコードが生成されます 提案。

このMCPサーバーは、焦点を絞った最新のサービスを提供することでこの課題に対応しています 特定のRustクレートに関する知識源。このインスタンスを実行することで クレートのサーバー(例:serde、tokio、reqwest))で、LLMにコーディングを与えます ツールのアシスタント(query_rust_docs)を使えるもので、関連するコードを書く前に使用できます。 あの木箱だ。

このツールの使用を指示されると、LLMは crateのAPIや使用状況、そして回答の受信は_current_から直接導き出されます。 ドキュメント化。これにより、 生成コードにより、手動修正の必要性が減り、速度が向上します 開発。

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

Rust Docs MCP Server

⭐ Like this project? Please star the repository 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 で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "rust-docs-reqwest": { "command": "/path/to/your/rustdocs_mcp_server", "args": [ "[email protected]" ], "env": { "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE" }, "disabled": false, "alwaysAllow": [] }, "rust-docs-async-stripe": { "command": "rustdocs_mcp_server", "args": [ "[email protected]", "-F", " runtime-tokio-hyper-rustls" ], "env": { "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE" }, "disabled": false, "alwaysAllow": [] } } }