GitHub Pages Retrieval MCP
Enables AI agents to search private GitHub Pages by authenticating in a dedicated browser and retrieving indexed sections from a local SQLite database, with support for multiple sites and languages.
README
GitHub Pages Retrieval MCP
認証が必要なPrivate GitHub Pagesを、AIエージェントから検索するためのローカルMCPです。GitHub、SAML、MFAは専用ブラウザでユーザー自身が完了し、取得したページはローカルのSQLite索引から検索します。
このMCPはローカル実行専用です。Cloud Agentやクラウド上のコードレビューから、ユーザーPCの認証済みブラウザや索引を利用することはできません。
できること
- 初回にサイトURLを受け取り、検索対象を自動設定
- サイト内リンクをたどり、構成変更に追従して索引を更新
- 複数サイトと複数言語を個別または横断で検索し、必要な節だけ取得
- Cookie、ページ本文、検索索引をユーザーPC内に保持
インストール
Claude Code
/plugin marketplace add ma-nakaya/github-pages-retrieval-mcp
/plugin install github-pages-retrieval@github-pages-retrieval-marketplace
GitHub Copilot CLI
copilot plugin marketplace add ma-nakaya/github-pages-retrieval-mcp
copilot plugin install github-pages-retrieval@github-pages-retrieval-marketplace
初回起動時に、必要なNode.jsパッケージとPlaywright Chromiumを自動で導入します。
GitHub Pages検索用のAgent Skillを同梱しており、Claude CodeとGitHub Copilot CLIの両方から利用できます。
使い方
- エージェントにPrivate Pagesの内容を調べるよう依頼します。
- 検索対象が未設定なら、エージェントがサイトURLを質問します。URLを回答すると、ソースID、許可オリジン、専用ブラウザプロファイルが自動設定されます。
- 認証が必要な場合はローカルブラウザが開きます。GitHub、SAML、MFAを完了し、エージェントに完了したことを伝えます。
- 初回またはサイト更新時に索引を作成します。その後はコンポーネント名、API名、設定項目などを通常の言葉で検索できます。
たとえば、次のように依頼できます。
このPrivate Pagesを検索対象にして:
https://example.github.io/private-docs/
日本語版のテーブルコンポーネントで、行選択の設定を調べて
検索の仕組み
flowchart TD
A[ユーザーの質問] --> B{検索対象は設定済みか}
B -- いいえ --> C[サイトURLをユーザーに確認]
C --> D[ソースと許可オリジンを設定]
B -- はい --> E{認証は有効か}
D --> E
E -- いいえ --> F[専用ブラウザを開く]
F --> G[ユーザーがGitHub・SAML・MFAを完了]
G --> H{索引の作成・更新が必要か}
E -- はい --> H
H -- はい --> I[画面上のリンクを並列巡回]
I --> J[ページを見出し単位に分割]
J --> K[(ローカルSQLite索引)]
H -- いいえ --> L[サイト・言語・語句で検索]
K --> L
L --> M[URL・見出し・短いスニペット]
M --> N[選択した節だけ取得]
N --> O[根拠URLとともに回答]
サイトマップには依存せず、画面上のナビゲーションリンクからページ構成を検出します。検索索引はローカルのSQLiteに保存し、サイト更新時だけ差分更新します。
検索結果はURL、見出し、短いスニペットを先に返し、必要な節だけ取得します。ページ全文を毎回モデルへ渡さないため、トークン消費を抑えられます。
ページ一覧は既定で50件ずつ返します。完全な一覧が必要な場合だけ次のページを取得し、通常の質問では一覧に頼らず索引全体を直接検索します。
複数サイトを登録できます。通常は対象サイトだけを検索し、横断検索を依頼した場合は全サイトからまとめて検索します。認証と索引更新はサイトごとに行います。
ローカルデータとセキュリティ
設定、ブラウザプロファイル、認証状態、検索索引は非公開のローカルディレクトリへ保存されます。Claude CodeはCLAUDE_PLUGIN_DATA、GitHub Copilot CLIはCOPILOT_PLUGIN_DATAとして提供する永続ディレクトリを利用します。手動起動時はGPR_PLUGIN_DATAで保存先を上書きできます。
- アクセスするのは設定されたPagesオリジン内のHTMLページだけです。
- ソースリポジトリ、GitHub API、外部の埋め込みサービスは利用しません。
- パスワード、MFAコード、CookieをMCPツールへ入力しません。
- 日常利用のChromeプロファイルは使わず、サイトごとの専用プロファイルを作成します。
config.local.json、ブラウザプロファイル、検索索引をGitへコミットしないでください。
プラグイン更新後も認証状態を維持するには、プラグイン外の永続ディレクトリを指定してください。
開発
Node.js 22.5以降を使用します。手動設定の例はconfig.example.jsonにあります。
npm install
npm test
npm start
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.