GitHub Intelligence MCPサーバー
コミット 2026年10月21日GitHubリポジトリのissue、pull request、commitなどの調査・分析に必要な、構造化され検証済みのJSONデータをAIクライアントに提供します。
別名 Dayyan-Saeed/Github-Intelligence-Mcp
- スター
- 2
- ツール
- 7
- ダウンロード数(30日間)
- —
- 最新バージョン
- —
- 最終コミット
- 2026年10月21日
- ライセンス
- MIT
GitHub Intelligence MCPとは
GitHubリポジトリのissue、pull request、commitなどの調査・分析に必要な、構造化され検証済みのJSONデータをAIクライアントに提供します。 7個のツールを提供しており、get_repository, search_repositories, get_issuesなどがあります。
プロジェクトのREADMEから生成された概要
GitHub Intelligence MCP server について
このサーバーは、Claude、Cursor、OpenCodeなどのAIクライアント内から、GitHubリポジトリの健全性やメトリクスを分析することを可能にします。LLMがリポジトリの統計情報を推測するのではなく、開発者やAIエージェントに対して、決定論的で検証済みのJSONデータを提供します。データの取得と構造化という負荷の高い作業を肩代わりすることで、モデルが計算ミスに陥ることなく、推論に集中できる環境を実現します。
ユーザーは、Python 3.12とuvを使用して、stdio経由でこのサーバーをローカルで実行します。接続するには、GITHUB_TOKEN環境変数を通じてGitHub Personal Access Tokenを提供する必要があります。サーバーは、get_repository、search_repositories、get_issues、get_pull_requests、get_recent_commits、get_contributors、get_releasesなどの読み取り専用ツールを提供します。すべてのリスト操作は、安定性を確保するために1から100個のアイテムの範囲内で安全に制限されています。
このツールは、メタデータ、contributor、release履歴に関する信頼できる事実を必要とするユーザー向けに設計されています。Pydanticモデルを使用して安定した出力コントラクトを保証しているため、返されるデータは常に構造化されており、予測可能です。また、GitHub APIの問題を明確で安全なメッセージに変換するためのエラーハンドリングも組み込まれています。
できること
- 1リポジトリのアクティビティを比較する2つの異なるリポジトリ間で、スター数、issueの健全性、および最近のアクティビティをAIに比較させます。
- 2主要なcontributorを特定する特定のプロジェクトに貢献している最もアクティブな開発者のリストを要求します。
- 3最近のソフトウェアリリースを追跡するリポジトリ内で最近マージまたはリリースされた内容を確認します。
- 4リポジトリのissueを監査する特定のラベルやステータスでフィルタリングして、リポジトリ内のissueを検索・分析します。
プロジェクトの README から作成されています。すべてのユースケースは、その引用と照らし合わせて確認されています。
GitHub Intelligence MCPツール 7
READMEから検出get_repositorysearch_repositoriesget_issuesget_pull_requestsget_recent_commitsget_contributorsget_releases
| get_repository | — | |
| search_repositories | — | |
| get_issues | — | |
| get_pull_requests | — | |
| get_recent_commits | — | |
| get_contributors | — | |
| get_releases | — |
設定
GITHUB_TOKEN
| 名前 | 説明 | 種類 |
|---|---|---|
| GITHUB_TOKEN | — |
自動チェック
実行日 2026年11月14日完全なレポート →まだ検証されていません。サーバーには80点のスコア、重大な問題がないこと、および検証に必要な十分なデータが必要です。 チェックの仕組み · 点数を上げるための改善点
- ソースリポジトリがリンクされており、アクセス可能dayyan-saeed/github-intelligence-mcp is public and reachablegithub.com/dayyan-saeed/github-intelligence-mcp ↗合格
- パッケージがこのリポジトリをソースとして指定未チェック
- ビルドの来歴 (Sigstore 証明)未チェック
- オープンソースライセンス (OSI)MITspdx.org/licenses/MIT.html ↗合格
- 過去1年以内にコミットまたはリリースありLast commit or release 2026-10-21github.com/dayyan-saeed/github-intelligence-mcp ↗合格
- OpenSSF Scorecard未チェック
- パッケージ名が有名なパッケージに酷似していない未チェック
- パッケージおよびその依存関係に重大な勧告なし未チェック
- モデルへの隠れた指示がない7 tool descriptions and the README read; no override phrases, credential paths or hidden characters合格
- 破壊的なツールがラベル付けされているNo tool named like delete, drop or exec合格
- リモートエンドポイントが MCP ハンドシェイクに応答未チェック
README
GitHubで見るGitHub Intelligence MCP
Live Dashboard: https://github-intelligence-mcp-ashy.vercel.app/
An intelligent, structured MCP (Model Context Protocol) server for investigating and analyzing GitHub repositories.
MCP-compatible AI clients (OpenCode, Claude, Cursor, etc.) connect to this server and gain read-only tools that return deterministic, validated, structured JSON about any GitHub repository — metadata, issues, pull requests, commits, contributors, releases, and search.
Why it exists
AI agents answering questions like "analyze facebook/react" or "find stale issues" need reliable facts. Computing repository metrics with an LLM is slow, expensive, and error-prone. This server does the deterministic work in code — fetching, validating, bounding, and structuring GitHub data — so the LLM can focus on what it is good at: reasoning and explanation.
Architecture
┌───────────────────────────── MCP client (LLM) ─────────────────────────────┐
│ asks questions, reasons over structured results │
└───────────────────────────────┬───────────────────────────────────────────┘
│ MCP protocol (stdio JSON-RPC)
┌───────────────────────────────▼───────────────────────────────────────────┐
│ server.py MCPServer assembly + tool registration │
├───────────────────────────────────────────────────────────────────────────┤
│ tools/* tool boundary: validation, logging, clean errors │
├───────────────────────────────────────────────────────────────────────────┤
│ github/* async GitHub REST client (httpx), payload mapping │
├───────────────────────────────────────────────────────────────────────────┤
│ models/* stable Pydantic response models (output contract) │
└───────────────────────────────┬───────────────────────────────────────────┘
│ HTTPS + Bearer token
▼ GitHub REST API v3
Key layers are strictly separated: the github package knows nothing about
MCP; the tools package contains no HTTP logic; the models package defines
a stable output contract decoupled from raw API payloads. See
docs/architecture.md for the reasoning behind every
decision.
Available tools (Phase 1 MVP)
| Tool | Description |
|---|---|
get_repository |
Structured metadata for one repository (stars, forks, license, timestamps, …) |
search_repositories |
Search repos; optional sort (stars, forks, help-wanted-issues, updated), order, bounded limit |
get_issues |
Issues filtered by state/labels/sort — pull requests automatically excluded |
get_pull_requests |
PRs with created/updated/closed/merged timestamps and draft flag |
get_recent_commits |
Commits from the last N days (1–365) with author/committer info |
get_contributors |
Top contributors by contribution count |
get_releases |
Recent releases with tag, author, draft/prerelease flags |
All list operations accept a limit clamped to 1–100, enforced twice:
once by the generated input schema, once inside the service layer.
Example interaction
An MCP client calling the server over stdio:
{"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {"name": "get_repository", "arguments": {"owner": "facebook", "repo": "react"}}}
returns structured content:
{
"name": "react",
"full_name": "facebook/react",
"stars": 238000,
"open_issues": 612,
"license": "MIT",
"default_branch": "main",
"created_at": "2013-05-24T16:15:54Z"
}
Natural-language prompts the tools support:
- "Compare stars, issue health, and recent activity of X and Y."
- "Who are the most active contributors of this repository?"
- "What was merged or released here recently?"
Installation
Requirements: Python 3.12+ and uv.
git clone <repository-url>
cd github-intelligence-mcp
uv sync
cp .env.example .env # then set GITHUB_TOKEN in .env
Create a GitHub token at https://github.com/settings/tokens — a fine-grained token with read-only access is sufficient.
Running locally
uv run github-intelligence-mcp # stdio transport (default)
Connecting to an MCP client
Example OpenCode configuration (opencode.json):
{
"mcp": {
"github-intelligence": {
"type": "local",
"command": ["uv", "run", "--directory", "/path/to/github-intelligence-mcp", "github-intelligence-mcp"],
"environment": { "GITHUB_TOKEN": "your-token" }
}
}
}
Claude Desktop (claude_desktop_config.json) uses the equivalent
mcpServers block with command/args.
Configuration
| Variable | Required | Default | Purpose |
|---|---|---|---|
GITHUB_TOKEN |
yes | — | GitHub PAT used for all requests |
GITHUB_API_URL |
no | https://api.github.com |
API root (useful for GitHub Enterprise) |
LOG_LEVEL |
no | INFO |
DEBUG…CRITICAL; logs go to stderr |
REQUEST_TIMEOUT_SECONDS |
no | 30 |
Per-request HTTP timeout |
CACHE_ENABLED |
no | false |
Reserved for Phase 4 response caching |
CACHE_TTL_SECONDS |
no | 300 |
Reserved for Phase 4 response caching |
Secrets are never hardcoded and never logged: the token lives in a
SecretStr and is only materialized inside the Authorization header.
Error handling
Domain exceptions map to clean, user-safe messages — never stack traces, never credentials:
| Situation | Client sees |
|---|---|
| Unknown/private repo | Repository 'owner/repo' was not found or is inaccessible. |
| Bad token | GitHub rejected the configured credentials. Check GITHUB_TOKEN. |
| Rate limit exhausted | GitHub API rate limit exceeded. Please retry after the provided reset time. Reset at: … |
| Missing permission | The configured token does not have permission to access this resource. |
| Invalid input | Field-specific validation message |
Transient failures (5xx, network errors) retry up to 3 times with capped exponential backoff. Client errors are never retried.
Repository health algorithm (Phase 2 roadmap)
Phase 2 adds deterministic scoring — no LLM involved — using explainable, documented weights:
| Component | Weight | Signals |
|---|---|---|
| Activity | 25% | commits 30/90 days, active contributors, recent PRs/releases |
| Issue health | 20% | stale-issue ratio, closure activity, average age (stale = open & untouched ≥ 90 days) |
| PR health | 20% | open/stale PR counts, merge cadence (stale = open ≥ 30 days) |
| Contributor health | 15% | active contributor count, concentration / bus-factor risk |
| Release activity | 10% | release intervals over 30/90-day windows |
| Documentation | 10% | README/docs/license presence signals |
Each component yields a 0–100 score with published formulas so results are reproducible.
Security model
- Read-only V1: no write operations exist to misuse; attack surface stays minimal.
- Input allow-lists prevent path traversal via
owner/repo. - Pagination and retries are bounded by construction.
- Logs contain tool names, repos, durations, statuses — never tokens or headers.
- Unanticipated exceptions are masked by the SDK; clients only see curated messages.
Testing
uv run pytest # 100% offline — respx mocks every HTTP call
Unit tests cover config, validation, models, client behavior (auth headers,
error mapping, retries, rate limits, pagination), and service filtering.
Integration tests drive the real MCPServer instance end-to-end: schema
generation, dispatch, structured output, and error translation.
Docker
docker build -t github-intelligence-mcp .
docker run --rm -i -e GITHUB_TOKEN=ghp_xxx github-intelligence-mcp
Multi-stage build on python:3.12-slim, runs as non-root, installs from the
committed uv.lock, and receives secrets only at runtime.
Development
See docs/development.md. Quality gates:
uv run ruff check .
uv run ruff format --check .
uv run mypy .
uv run pytest
CI runs all four on every push and pull request.
Roadmap
- Phase 2 — deterministic health analysis, maintenance-risk detection, repository comparison
- Phase 3 — MCP resources (
github://repo/{owner}/{repo}/…) and guided prompts - Phase 4 — SQLite response cache with per-endpoint TTLs, advanced rate-limit handling, GraphQL
- Phase 5 — LangGraph autonomous investigation agent
- Phase 6 — Next.js dashboard
License
GitHub Intelligence MCPのよくある質問
GitHub Intelligence MCPが提供するツールは
7個のツールを提供しており、get_repository, search_repositories, get_issues, get_pull_requests, get_recent_commitsなどがあります。
GitHubからどのようなデータを取得できますか?
このサーバーは、構造化されたメタデータ、issue、pull request、commit、contributor、およびreleaseを提供します。
このサーバーを使用するにはGitHubトークンが必要ですか?
はい、GitHub Personal Access Token (PAT) が必要です。読み取り専用権限を持つfine-grained tokenで十分です。
このサーバーでリポジトリに変更を加えることはできますか?
いいえ、現在のバージョンは読み取り専用であり、書き込み操作は含まれていません。
リポジトリが見つからない場合、エラーはどのように処理されますか?
サーバーはスタックトレースの代わりに、ユーザーにとって分かりやすい安全なメッセージを返します。