
GitHub MCP Server
io.github.sumirati由 GitHub 帳號 sumirati 發布v2.2.0更新於 Oct 31, 2026
Developer-ready GitHub MCP server with 5-tool hybrid architecture and dynamic discovery.
概覽
在本機執行的 MCP 伺服器,透過 5 個工具與 83 個可探索動作,讓助理呼叫 GitHub REST API 處理儲存庫、程式碼與協作工作。
- 可以做什麼
- 探索並執行 GitHub 動作:依領域搜尋動作,再執行 83 個動作之一,輸入會經過驗證。
- 讀取儲存庫與程式碼:儲存庫中繼資料、檔案內容(含符號大綱與行範圍)、分支、提交與差異。
- 處理提取要求與議題:列出、檢視差異與審查、建立、更新、留言、合併,管理標籤與里程碑。
- 管理儲存庫設定:協作者與權限、Actions 變數與密鑰中繼資料、Webhook、主題、Gist、發行與標籤。
- 檢視 CI/CD 與安全:工作流程、執行紀錄、作業日誌、建置產物、提交狀態與 Dependabot 警示。
- 適用情境
- 適合希望助理在對話中直接操作 GitHub 儲存庫的情境,例如審查提取要求、閱讀程式碼、整理議題、排查 CI 失敗,或不必在本機複製就能提交小幅變更。5 工具混合模式對只需偶爾存取 GitHub 的代理更節省上下文。
- 執行需求
- 以 npx 或全域 npm 安裝方式在本機執行,需要 Node.js。需要 GitHub 個人存取權杖,放在 GITHUB_PERSONAL_ACCESS_TOKEN 中(也接受 GITHUB_TOKEN)。選用設定:GITHUB_API_URL(供 GitHub Enterprise 使用)、GITHUB_READ_ONLY、GITHUB_EXPOSE_ALL_TOOLS 與 MCP_OUTPUT_FORMAT。需要連線至 GitHub API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 GitHub MCP Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
GitHub MCP Server (@sumirati/mcp-github)
A modern, 2026 AI-native Model Context Protocol (MCP) server for GitHub REST API, engineered for autonomous AI agents and developer workflows.
[npm version] [License: MIT] [GitHub]
What makes v2 Unique: The 2026 5-Tool Hybrid Standard
In early MCP servers, exposing 50–100+ eager tool definitions flooded every LLM turn with thousands of redundant schema tokens ("System Prompt Tax") and degraded reasoning coherence.
@sumirati/mcp-github solves this with a 5-Tool Hybrid Surface:
- Glama TDQS Coherence Tier A (5/5): By exposing exactly 5 tools to the client, the server sits in the ideal 3–15 tool coherence sweet spot.
- Ultra-Lean System Prompt Tax: Drops schema overhead from 23,112 tokens (92,447 B) down to 1,125 tokens (4,498 B) (95.1% reduction), preserving context windows and maximizing LLM prompt-cache hits.
- Zero-Hop Hourly Drivers: The 3 operations developers and agents use constantly (
get_file_contents,get_repository,get_commit) remain eager tools for instant zero-hop execution. - 100% Platform Access on Demand: The entire platform surface of 83 actions across 13 domains is accessible on-demand via dynamic action discovery (
github_find_actions$\rightarrow$github_execute_action), delivering 91%–99% token savings with default high-density Markdown tables and summaries (format: "markdown" | "json"). - Resilient Fallback: If an agent directly invokes any catalog action name (e.g.
list_pull_requests), the server dynamically executes it with full input validation and projection.
Core Capabilities Across 13 Domains
- Repositories & Branch Governance (
repositories, 12 actions): Full repository lifecycle, branch management, branch protection rules (get_branch_protection), file reading (auto Base64-decoded, symbol outlines, line slicing), single-file commits, and forks. - Commits & Commit Statuses (
commits, 6 actions): Commit history, token-capped commit diffs (get_commit), atomic multi-file commits via Git Trees API (create_commit,push_files), and commit status checks. - Pull Requests & Code Reviews (
pull-requests, 11 actions): PR lifecycle (create,update,merge), review comments, inline diff reviews, and unified diff inspection with lockfile filtering. - Issues & Labels (
issues, 8 actions): Issue tracking, upstream indexed filtering, conversation comments, and label management. - Project Milestones (
milestones, 4 actions): Milestone creation, progress tracking, and deadline management. - Collaborators & Permissions (
collaborators, 4 actions): Audit and manage repository collaborators and permission levels. - Actions Variables & Secrets (
variables, 6 actions): Manage repository Actions configuration variables and inspect secret metadata. - Gists & Code Snippets (
gists, 5 actions): Full gist lifecycle for sharing multi-file code snippets and configurations. - GitHub Actions & CI/CD (
actions, 10 actions): Workflow inspection, workflow runs, job step breakdown, build artifacts (list_workflow_run_artifacts,get_workflow_run_artifact), smart failure log extraction (get_job_logs), run cancel/rerun, and manual workflow dispatch. - Releases & Git Tags (
releases, 5 actions): Release publishing, lightweight/annotated tag creation, and release asset inspection. - User, Organizations, Teams & Diagnostics (
user, 7 actions): Authenticated user identity, organization inspection, team creation (create_team), accessible repositories, and API health/rate-limit diagnostics (system_health_check). - Webhooks & Repository Topics (
webhooks, 4 actions): Audit repository event webhooks and manage repository topic tags. - Security & Dependabot (
security, 1 action): Audit Dependabot vulnerability alerts by state and severity.
Quickstart & Installation
Option 1: Run with npx (No installation needed)
Option 2: Install Globally
Option 3: Local Clone
Environment Configuration
Client Configuration
Google Antigravity / Claude Desktop / Cursor
Add to your MCP configuration file (mcp_config.json or claude_desktop_config.json):
Using npm / npx (Recommended):
Using local clone:
Complete Action Catalog Reference (83 Actions)
All 83 actions feature strict Zod input validation and 2-tier output projection:
1. The 5 Client-Exposed Tools (Hybrid Mode)
2. Repositories & Branches (repositories — 12 actions)
3. Git Commits & Statuses (commits — 6 actions)
4. Pull Requests & Code Reviews (pull-requests — 11 actions)
5. Issues & Labels (issues — 8 actions)
6. Project Milestones (milestones — 4 actions)
7. Collaborators & Roles (collaborators — 4 actions)
8. Actions Variables & Secrets (variables — 6 actions)
9. Gists & Code Snippets (gists — 5 actions)
10. GitHub Actions & CI/CD Observability (actions — 10 actions)
11. Releases & Git Tags (releases — 5 actions)
12. User, Organizations & Teams (user — 7 actions)
13. Webhooks & Topics (webhooks — 4 actions)
14. Security & Dependabot (security — 1 action)
Benchmarks: Reproducible Token Economy Proof (test/benchmark-test.js)
Grounded strictly in official GitHub REST API (2022-11-28) response schemas (test/fixtures/github-api-v3-fixtures.js) and verified on every npm test run via node test/benchmark-test.js:
How Token Compression Works
- System Prompt Tax Reduction (95.1% savings): Shrinks MCP
ListToolsschema footprint from 83 full tool schemas (23,112 tokens / 92,447 B) down to the 5-tool hybrid surface (1,125 tokens / 4,498 B). - Recursive Output Projection Filter (
projectOutput): Automatically strips GitHub REST API v3 hypermedia template URLs (*_urlRFC 6570 templates),avatar_url,gravatar_id,node_id,site_admin,_links, internalapi.github.comself-links, andnull/""fields. - Smart Diff & Lockfile Truncation: Commit and PR diffs automatically collapse dependency lockfiles (
package-lock.json,pnpm-lock.yaml,yarn.lock,go.sum,Cargo.lock,*.min.js) viaignore_lockfiles: trueby default. Passignore_lockfiles: falseto inspect full lockfile diffs. - Conservative Default Pagination: All list actions default to
per_page: 10(max: 100). - Default High-Density Markdown Format: Discovery (
github_find_actions), execution (github_execute_action), and all 3 eager tools default toformat: "markdown". - Unified Diff Truncation: PR (
max_lines) and commit (max_diff_lines) diffs default to 400 lines. - Safe Log Tailing: CI workflow job logs extract the failure block and teardown tail (
tail_lines, default: 100) with ANSI escape sequence stripping.
Roadmap
Completed in v2.1
- Upstream indexed filtering & strict pagination caps (
state,labels,assignee,creator,mentioned,milestone,since) - Client error resilience (Secondary rate limit / abuse detection, 403/404 scope diagnostics, empty-body 201/202 handling)
- Hardened output projection with recursion depth guard (
maxDepth = 32), RFC 6570 hypermedia URL stripping, and empty collection preservation - Nested child team & organization management (
create_team,get_organization) - Smart CI/CD failure log extraction & ANSI sequence stripping in
get_job_logs(strip_ansi,smart_failure) - Outline-first code symbol extraction & line range slicing in
get_file_contents(outline_only,start_line,end_line) - Atomic multi-file commits (
create_commit,push_files) supporting file creation, updates, and deletions via GitHub Git Trees API - Pre-flight mergeability & conflict verification (
get_mergeability) - Token scope self-auditing & permission pre-flight
Future Horizons (v2.x)
- Standardized collection
_summaryheaders to facilitate multi-turn history pruning in LiteLLM / Eigent agent orchestration - Remote Transports: Streamable SSE and HTTP remote server modes
- Scoped GraphQL query engine for relational deep inspections
- DevSecOps code scanning & secret scanning alert queries
- Scoped & rate-guarded code search within project repositories
Acknowledgements & Lineage
This project incorporates architectural concepts, schemas, and patterns from:
@modelcontextprotocol/sdk(MIT License) — Copyright (c) Anthropic, PBC.zod(MIT License) — Colin McDonnell.- GitHub REST API Specifications — GitHub, Inc.
jmrplens/gitlab-mcp-server— Dynamic action discovery and meta-dispatcher pattern concepts.@sumirati/mcp-gitlab— Sibling project architecture, 3-tier read-only mode, and token projection standards.
See NOTICE for complete third-party attribution details.
License
This project is licensed under the MIT License — Copyright (c) 2026 [email protected].
來源:README.md,提交 ce7318f
工具
0版本歷史
4- v2.2.0最新Oct 17, 2026
- v2.1.0Oct 16, 2026
- v1.3.1Oct 15, 2026
- v1.0.0Oct 15, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分