mcpField
プ
プロジェクトディレクトリ概要

プロジェクトディレクトリ概要

Local
github.com/yhanawaDeveloper Tools0Updated 76w ago

About プロジェクトディレクトリ概要

This project serves Gemini, Anthropic, and OpenAPI documentation through MCP for developers who need API references in a client. It includes a crawler and reads content from local JSON or YAML files.

Key features

  1. 01Serve Gemini and Anthropic documentation
  2. 02Read OpenAPI YAML files
  3. 03Crawl web pages and save documentation
  4. 04Use preset or custom crawl rules

Use cases

  1. 01Look up Gemini API documentation in Claude
  2. 02Look up Anthropic API documentation in Claude
  3. 03Consult OpenAPI documentation from local YAML
  4. 04Crawl documentation sites with path and page limits

MCP support

The project includes several MCP server programs that provide local JSON documentation or OpenAPI YAML content to clients such as Claude.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

プロジェクトディレクトリ概要

このプロジェクトは、MCP サーバーを使用して API ドキュメントを参照する方法を提供します。reference の機能を使用して実装されています。

ディレクトリ構成

  • README.md: このファイル。プロジェクトの概要と使用方法を記載しています。
  • crawl_all.py: 特定のウェブページをクロールするスクリプト。(使用方法は後述)
  • document/: クローリングした結果が保存されるディレクトリ。
  • gemini_docs.py: gemini_docs.json の内容を MCP サーバー経由で提供するメインプログラム。
  • anthropic_docs.py: anthropic_docs.json の内容を MCP サーバー経由で提供するメインプログラム。
  • openapi_docs.py: openapi.yaml の内容を MCP サーバー経由で提供するメインプログラム。

使用方法

詳細なセットアップ手順については、公式クイックスタートガイドを参照してください。事前に本リポジトリをクローンしてください。

  1. ドキュメントの用意 document の中身は本リポジトリには含めておりません。各自クローリングして document 内に保存してください。詳しい方法については本 readme 末尾に記載があります。

  2. uv のインストール

curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 仮想環境の有効化
uv venv
source .venv/bin/activate
  1. 依存関係のインストール
uv add "mcp[cli]" PyYAML
  1. プログラムの動作確認

例として、gemini_docs.py を実行します。

uv run gemini_docs.py
  1. claude_desktop_config.json の更新

以下の設定を追加または更新してください。

{
  "mcpServers": {
    "gemini_docs_resource": {
      "command": "uv",
      "args": [
        "--directory",
        "mcp_server ディレクトリへのパス",
        "run",
        "gemini_docs.py"
      ]
    }
  }
}

注: 実行がうまくいかない場合は、uv を絶対パスに変更してください。また、必要に応じて gemini_docs.py を anthropic_docs.py または openapi_docs.py に変更してください。

  1. Claude の再起動

設定を反映させるために Claude を再起動してください。

各 MCP サーバーについて

  • gemini_docs.py: クローリング結果が JSON ファイルとして保存され、その内容を利用します。
  • anthropic_docs.py: クローリング結果が JSON ファイルとして保存され、その内容を利用します。
  • openapi_docs.py: OpenAPI ドキュメントはクローリングできないため、GitHub リポジトリからダウンロードしたファイルを参照します。このプログラムは YAML 形式のファイルを読み取るように設計されています。

クローリング

crawl_all.py を使用して、プリセットに基づき gemini と anthropic のドキュメントをクロールできます。

python crawl_all.py --preset gemini
python crawl_all.py --preset anthropic

また、プリセットを使用せず、任意の設定でクロールすることも可能です。

python crawl_all.py \
  --base-url "https://example.com" \
  --start-path "/docs" \
  --output_file "document/example_docs.json" \
  --selector "main" \
  --path-pattern "^/docs/.*" \
  --delay 0.5 \
  --max-pages 100
主なコマンドラインオプション
オプション説明
--presetgemini または anthropic を指定すると、事前定義された設定でクロールを開始します。
--base-urlクロール対象サイトのベース URL(例: https://example.com)。
--start-pathクロール開始パス(例: /docs)。
--output_fileクロール結果の保存先ファイルパス(例: document/example_docs.json)。
--selectorページ内でコンテンツを取得するための CSS セレクタ(デフォルト: main)。
--delay各リクエスト間の待機時間(秒)(デフォルト: 0.5 秒)。
--use-selenium動的ページ対応のため Selenium を使用する場合に指定します。
--wait-timeSelenium 使用時のページ読み込み待機時間(秒)(デフォルト: 5 秒)。
--additional-pathsクロール対象に追加するパスのリスト。
--path-patternクロール対象とする URL パスの正規表現パターン。
--max-pages最大クロールページ数(例: 200 ページまで)。
--debugデバッグモードを有効にして詳細なログを出力します。

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.