GitHub Pages Retrieval MCP
This local MCP server lets AI agents securely configure, authenticate, index, search, and retrieve content from private GitHub Pages sites.
List and configure GitHub Pages search sources from HTTPS URLs, without overwriting existing configuration.
Check authentication status, open a visible browser for GitHub/SAML/MFA reauthentication, and validate completed auth sessions.
Fetch allowlisted GitHub Pages URLs through a dedicated persistent local browser profile.
Start background crawls to build or refresh a local SQLite index, with configurable page and concurrency limits.
Poll index status, locale counts, and paged page lists.
Search one source or all configured sources using a local multilingual trigram index, with filters and snippets.
Retrieve exact cached pages or indexed sections/headings with character limits to reduce token use.
Keep credentials, cookies, page content, and indexes local; it does not use the source repository, GitHub API, or embedding services.
Provides tools for searching and retrieving content from private GitHub Pages sites, including indexing site structure and enabling query-based access to page sections.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub Pages Retrieval MCP Find the row selection configuration in the Japanese table component"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub Pages Retrieval MCP
認証が必要なPrivate GitHub Pagesを、AIエージェントから検索するためのローカルMCPサーバーです。GitHub、SAML、MFAの認証は専用ブラウザでユーザー自身が完了し、取得したページはローカルのSQLite索引から検索します。
このMCPはローカル実行専用です。Cloud Agentやクラウド上のコードレビューから、ユーザーPCの認証済みブラウザや索引を利用することはできません。
特徴
初回にサイトURLを受け取り、検索対象(ソース)を自動設定します。
サイト内リンクをたどって索引を作成し、サイト構成の変更に追従して更新します。
複数サイト・複数言語を、サイト単位または横断で検索し、必要な節だけを取得します。
Cookie、ページ本文、検索索引はユーザーPC内に保持します。
検索結果はURL・見出し・短いスニペットを先に返し、ページ全文を毎回モデルへ渡さないため、トークン消費を抑えられます。
Related MCP server: search-docs
動作要件
Node.js 22.5以降
対応クライアント: Claude Code、GitHub Copilot CLI(いずれもプラグインとして導入)
初回起動時に、必要なNode.jsパッケージとPlaywright Chromiumを自動で導入します。
インストール
Claude Code
/plugin marketplace add ma-nakaya/github-pages-retrieval-mcp
/plugin install github-pages-retrieval@github-pages-retrieval-marketplaceGitHub Copilot CLI
copilot plugin marketplace add ma-nakaya/github-pages-retrieval-mcp
copilot plugin install github-pages-retrieval@github-pages-retrieval-marketplaceGitHub Pages検索用のAgent Skill(skills/github-pages-retrieval/)を同梱しており、Claude CodeとGitHub Copilot CLIの両方から利用できます。
使い方
エージェントにPrivate Pagesの内容を調べるよう依頼します。
検索対象が未設定なら、エージェントがサイトURLを質問します。URLを回答すると、ソースID、許可オリジン、専用ブラウザプロファイルが自動設定されます。
認証が必要な場合はローカルブラウザが開きます。GitHub、SAML、MFAを完了し、エージェントに完了したことを伝えます。
初回またはサイト更新時に索引を作成します。その後はコンポーネント名、API名、設定項目などを通常の言葉で検索できます。
依頼の例:
このPrivate Pagesを検索対象にして:
https://example.github.io/private-docs/
日本語版のテーブルコンポーネントで、行選択の設定を調べてツール一覧
Tool | 用途 |
| 設定済みの検索対象ソースを確認 |
| サイトURLからソース、許可オリジン、専用ブラウザプロファイルを自動設定(既存設定は上書きしない) |
| ソースの認証状態を取得 |
| 可視ブラウザを開き、再認証を開始 |
| 完了した認証セッションを検証し、状態を保存 |
| 許可済みURLのページを専用ブラウザ経由で直接取得 |
| 索引の作成・更新をバックグラウンドで開始 |
| 索引の状態とページ一覧をページング取得(既定50件) |
| ローカル索引をサイト単位または横断で検索 |
| 索引済みページまたは見出し単位の節を取得 |
通常の質問ではページ一覧に頼らず、search_pages_index で索引全体を直接検索し、fetch_indexed_section で必要な節だけを取得します。完全なページ一覧が必要な場合だけ、get_pages_index の次ページをたどります。
検索の仕組み
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に保存し、検索には多言語向けのFTS5 trigram検索を使います。埋め込みサービスは呼びません。
完全な更新が成功すると、サイトからリンクされなくなったページは索引から削除されます。途中で打ち切られた、または一部失敗した更新では、既存の索引を保持します。
複数サイトを登録できます。通常は対象サイトだけを検索し、横断検索を依頼した場合(
sourceIdにallを指定)だけ全サイトからまとめて検索します。認証と索引更新はサイトごとに行います。
設定
手動設定の例は config.example.json にあります。主な項目は次のとおりです。
項目 | 内容 |
| 設定・ブラウザプロファイル・索引の保存先ディレクトリ |
| ソースの識別子 |
| 検索対象サイトのURL |
| 認証状態の確認先URL |
| アクセスを許可するオリジン |
| サイトごとの専用ブラウザプロファイルの保存先 |
プラグインとして導入した場合、保存先はホストが提供する永続ディレクトリを使います。関連する環境変数は次のとおりです。
環境変数 | 内容 |
| 保存先ディレクトリの上書き(手動起動時に使用) |
| Claude Codeが提供する永続ディレクトリ |
| GitHub Copilot CLIが提供する永続ディレクトリ |
| 上記が無い場合の汎用の永続ディレクトリ(ランチャーが参照) |
| 設定ファイルのパス。プラグイン用ランチャーは保存先ディレクトリ配下の |
プラグイン更新後も認証状態を維持するには、プラグイン外の永続ディレクトリを指定してください。
手動で起動する場合は次のとおりです。
npm install
npm test
npm startローカルデータとセキュリティ
設定、ブラウザプロファイル、認証状態、検索索引は、非公開のローカルディレクトリへ保存されます。
アクセスするのは、設定されたPagesオリジン内のHTMLページだけです。
ソースリポジトリ、GitHub API、外部の埋め込みサービスは利用しません。
パスワード、MFAコード、CookieをMCPツールへ入力しません。
日常利用のChromeプロファイルは使わず、サイトごとの専用プロファイルを作成します。
取得したページ本文は信頼できない入力として扱い、根拠URLとともに回答に使います。
config.local.json、ブラウザプロファイル、検索索引をGitへコミットしないでください。
開発
コマンド | 内容 |
| 型チェック、単体テスト、プラグイン検証をまとめて実行 |
| 型チェックのみ( |
| 単体テスト( |
| プラグインマニフェストとMCP設定の検証 |
| MCPサーバーを起動( |
| プラグイン用ランチャーで起動(依存関係とChromiumを必要に応じて自動導入) |
ライセンス
MIT License(LICENSE を参照)
Available Tools
10 toolsbegin_source_reauthBegin source reauthenticationC
Opens a visible, persistent local browser at the configured GitHub Pages URL. The user completes GitHub, SAML, and MFA themselves.
Inputs: sourceId (required).
configure_pages_sourceConfigure a Pages sourceA
Persists a user-provided HTTPS Pages URL as a local search target, derives its exact origin allowlist, and creates a dedicated browser-profile path. Existing configuration is never replaced.
Inputs: startUrl (required), sourceId.
fetch_indexed_sectionFetch indexed page or sectionA
Returns one cached page or exact heading/anchor with a strict character cap. Prefer a heading returned by search_pages_index to minimize tokens.
Inputs: url (required), sourceId (required), heading, maxChars.
fetch_pages_contentFetch GitHub Pages contentB
Fetches one allowlisted GitHub Pages URL through its persistent local browser profile. It never reads the source repository.
Inputs: sourceId (required), url.
get_pages_indexGet compact Pages indexA
Returns index status, locale counts, and one page of a compact URL/title list. Use search_pages_index for named items; follow nextOffset only when a complete listing is required.
Inputs: sourceId (required), limit, locale, offset, +1 more.
get_source_auth_statusGet source authentication statusB
Returns the last known authentication state for a configured GitHub Pages source without exposing browser credentials.
Inputs: sourceId (required).
list_pages_sourcesList configured Pages sourcesA
Checks whether any Pages search targets are configured. Call this before authentication or search so an agent can request a site URL when the list is empty.
Inputs: no named parameters.
refresh_pages_indexRefresh Pages indexA
Starts a parallel background crawl of allowlisted rendered Pages links. Returns immediately; poll get_pages_index for compact progress and final statistics.
Inputs: sourceId (required), maxPages, concurrency.
search_pages_indexSearch Pages indexA
Searches one source or all configured sources in the local multilingual trigram index. Use sourceId all for cross-site search; each result includes its actual sourceId for fetch_indexed_section.
Inputs: query (required), sourceId (required), limit, locale, +2 more.
validate_source_authValidate source authenticationB
Validates a completed interactive authentication session against the configured protected Pages URL and persists only the resulting status.
Inputs: sourceId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes, but some overlap exists between fetch_pages_content and fetch_indexed_section (both retrieve content, one live and one cached), and the three auth-related tools (begin_source_reauth, validate_source_auth, get_source_auth_status) represent sequential steps that could be confused. Descriptions are clear enough to resolve most ambiguity.
All tool names follow a consistent verb_noun snake_case pattern (e.g., begin_source_reauth, fetch_pages_content, list_pages_sources). No casing or naming style deviations are present.
The 10 tools are well-scoped for the server's purpose of retrieving and indexing GitHub Pages content. Each tool covers a distinct step in the configuration, authentication, fetching, and search workflow without unnecessary bloat.
The tool surface covers the core lifecycle: configure, list, authenticate, fetch live content, build and query an index, and retrieve indexed sections. Minor gaps exist, such as no tool to delete or update a configured source, but these do not significantly hinder the primary use case.
Maintenance
Related MCP Connectors
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Web search and page-reading for AI agents. One-click OAuth connect, or a Caesar API key.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Web search, page reading, site crawling, data extraction and cited research. OAuth sign-in.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search the web, crawl websites, and perform intelligent RAG queries with semantic search capabilities. Includes integrated private search engine, vector database storage, and optional knowledge graph for AI hallucination detection in code repositories.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to search local Markdown documents using natural language, with automatic indexing and section-level retrieval.1017 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to index and search local files, websites, GitHub repos, and packages using hybrid retrieval with reranking, all through IDE chat.4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to index and search local files, websites, GitHub repos, and packages with hybrid AI-powered retrieval, all locally through IDE chat.Apache 2.0