Skip to main content
Glama
Cargo Doc MCP Server

Cargo Doc MCP Server

by spacemeowx2

貨物ドキュメントMCPサーバー

cargo doc コマンドを通じてRustドキュメントを管理するためのMCPサーバー。このサーバーは、Rustドキュメントをローカルでチェック、ビルド、検索するためのツールを提供します。

特徴

ツール

  • get_crate_doc - 全体的な概念と使用方法を理解するための crate のメインドキュメントページを取得します

    • パラメータ:

      • project_path : Rust プロジェクトへのパス (絶対パスである必要があります)

      • crate_name : ドキュメントを取得するクレートの名前

  • list_symbols - クレートのドキュメント内のすべてのシンボル(構造体、列挙型、特性など)を一覧表示します

    • パラメータ:

      • project_path : Rust プロジェクトへのパス (絶対パスである必要があります)

      • crate_name : シンボルを一覧表示するクレートの名前

  • search_doc - クレート内のドキュメントを検索

    • パラメータ:

      • project_path : Rust プロジェクトへのパス (絶対パスである必要があります)

      • crate_name : 検索するクレートの名前

      • query : 検索クエリ(キーワードまたはシンボル)

      • limit (オプション): 返される結果の最大数 (デフォルト: 10)

Related MCP server: MCP Rust Docs Server

要件

  • Node.js 16以降

  • RustとCargoをインストール

インストール

依存関係をインストールします:

pnpm install

サーバーを構築します。

pnpm run build

自動リビルドを使用した開発の場合:

pnpm run watch

使用法

次の構成を追加します。

{
  "mcpServers": {
    "docs-rs-mcp": {
      "command": "/absolute/path/to/docs-rs-mcp/build/index.js"
    }
  }
}

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。MCP Inspectorの使用をお勧めします。

pnpm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

キャッシュシステム

サーバーは、パフォーマンス向上のため、ビルドされたドキュメントパスのキャッシュを維持します。ドキュメントを最新の状態に保つため、キャッシュエントリは24時間後に期限切れになります。

ライセンス

マサチューセッツ工科大学

Available Tools

3 tools
get_crate_docA

Get crate's main documentation page. Useful for unresolved imports (e.g. use get_crate_doc when seeing 'unresolved import tokio::sync') or understanding crate features.

Inputs: project_path (required), crate_name (required).

list_symbolsB

List all symbols in a crate. Use when implementing traits or exploring available types. Shows structs, enums, traits with their paths.

Inputs: project_path (required), crate_name (required).

search_docB

Search crate docs for specific features, error messages, or usage examples. Helps debug compilation issues or learn new APIs.

Inputs: project_path (required), crate_name (required), query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_crate_doc retrieves main documentation pages, list_symbols enumerates all symbols in a crate, and search_doc performs targeted searches within documentation. There is no overlap in functionality, making it easy for an agent to select the appropriate tool based on the task.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (get_crate_doc, list_symbols, search_doc) with clear, descriptive verbs. There are no deviations in naming conventions, making the tool set predictable and easy to understand.

    Tool Count3/5

    With only 3 tools, the server feels somewhat thin for a documentation-focused domain, as it might lack operations like updating or managing documentation. However, the tools cover core use cases, so it's borderline but not severely mismatched.

    Completeness4/5

    The tools provide good coverage for basic documentation tasks: retrieving main docs, listing symbols, and searching. Minor gaps exist, such as no direct support for navigating between documentation sections or handling version-specific docs, but agents can likely work around these limitations.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers