
Github Mcp
io.github.jaimenbell由 GitHub 帳號 jaimenbell 發布v0.1.1更新於 Nov 3, 2026
MCP server for the GitHub REST API: issues, PRs, repos; read always on, write env-gated.
概覽
面向 GitHub REST API 的本機 MCP 伺服器,讓助理讀取儲存庫、議題、PR、檔案與提交,議題/PR 寫入操作預設關閉。
- 可以做什麼
- 讀取儲存庫中繼資料、搜尋公開儲存庫、查詢公開使用者或組織資料
- 列出並取得議題與拉取請求,列出某個分支或參照上的提交
- 讀取儲存庫檔案內容,二進位檔案僅辨識而不解碼
- 建立議題、在議題或 PR 留言、開啟或關閉議題、加上標籤、在 PR 差異行張貼審查留言(寫入工具組,預設關閉)
- 適用情境
- 適合在桌面 MCP 主機中讓助理查詢 GitHub 儲存庫、議題、拉取請求與檔案內容;在刻意啟用寫入後,也可用來建立議題或留言。它是作品集性質的參考實作,並非 GitHub 官方 MCP 伺服器,不追求與官方版本功能一致。
- 執行需求
- 以本機 Python 程序執行(Python 3.12 以上),從 PyPI 套件 jaimenbell-github-mcp 安裝並寫入 MCP 主機設定。讀取工具不需權杖即可使用,但受 GitHub 未驗證速率限制;在 GITHUB_TOKEN 提供細粒度個人存取權杖可提高額度,寫入則必須提供。寫入還需將 GITHUB_MCP_ENABLE_WRITE 設為 1。需要能連線至 GitHub REST API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Github Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
github-mcp
[PyPI] [MCP Registry] [License: MIT] [tests] [CI]
A public read+write MCP server over the GitHub REST API, built to the desktop-mcp/rag-mcp/mcp-factory standard (own pyproject, fastmcp server, honest README, real test suite) with env-gated tool groups (write disabled by default). Not the official GitHub MCP server -- see below.
Quickstart (60 seconds)
The write tool group (issue/PR mutations) is off by default -- see
Env vars below to enable it.
What this is / is not
This is a reference portfolio implementation demonstrating a hardened read+write MCP server pattern over a real external SaaS API (GitHub) -- env-gated tool groups, typed error/rate-limit handling, auth that degrades gracefully, a real test suite. It exists to show, concretely, "I build read/write MCP servers over external APIs" with a link a client can click.
It is NOT the official GitHub MCP server. It does not aim for parity
with GitHub's own MCP offering (GraphQL, Actions, webhooks, GitHub Apps are
all out of scope -- see below). It started life as a factory-scaffolded
read-only demo (mcp-factory's
generated/github_read_server.py) and was hand-hardened into this
standalone read+write server -- the scaffold-then-harden path is itself part
of the story this repo tells.
Tools (14)
One row per tool -- the two groups below just control default-on/off state, not what exists.
read is always on and works unauthenticated (GitHub's 60 req/hr tier).
write is env-gated and OFF by default -- requires
GITHUB_MCP_ENABLE_WRITE=1 and GITHUB_TOKEN.
A disabled write call returns a structured policy_refusal error (never a
silent no-op, never a crash). A write call with the group enabled but no
token returns a structured auth_required error -- the group gate and the
token precondition are checked independently, both before any network call.
Write-safety-off-by-default
This is defense-in-depth, mirroring desktop-mcp's input group: harness-level
permission prompts are the first gate, but the server itself refuses every
write tool unless its own environment explicitly opts in with
GITHUB_MCP_ENABLE_WRITE=1, and even then refuses without a GITHUB_TOKEN.
A misconfigured or overly-permissive MCP host cannot turn on GitHub mutations
this process wasn't deliberately configured to allow. The registration this
repo ships with (see ~/.claude.json's github-mcp entry) has the write
group absent from env -- enabling it is a deliberate per-registration
operator choice, not a code change.
Honest-capabilities table
Every claim below maps to the file that implements it and the test(s) that verify it -- no capability is asserted without a corresponding implementation and test.
Limitations (read before relying on this)
- REST v1 only. No GraphQL API coverage.
- No webhooks / GitHub App auth. Fine-grained PAT only.
- No Actions/workflow-dispatch tools. Issue/PR CRUD is the v1 write surface.
- Unauthenticated read is rate-limited to 60 req/hr by GitHub itself (10
req/min for search) -- expect
rate_limitederrors under sustained unauthenticated use; setGITHUB_TOKEN(even a read-only fine-grained PAT) to raise this considerably. get_file_contenttruncates past 100KB and reports (rather than decodes) non-UTF-8 files.- No pagination beyond a single page for list endpoints (
limit, capped per-endpoint, is the only page-size control in v1). - Not registered with the mcp-factory hub. Ships as a standalone repo (own pyproject, system Python312 install), matching the rag-mcp/desktop-mcp model.
Env vars
Usage examples
Testing
CI (.github/workflows/ci.yml) runs this suite on every push/PR and fails
the build if the Tests badge above drifts from what the suite actually
reports -- see scripts/check_readme_counts.py.
Install
Setup / connect
pip install -r requirements.txton Python 3.12+.- (Optional) generate a fine-grained PAT scoped to the repos you want read+write access to (Issues: read/write, Pull requests: read/write, Contents: read is enough for v1). Read tools work with no token at all -- they just run at GitHub's unauthenticated 60 req/hr tier.
- Add to your MCP host config (e.g.
~/.claude.json):
- To enable write tools for a given deployment, add
"GITHUB_MCP_ENABLE_WRITE": "1"to that entry'senvblock. This is a registration-time operator decision, not a code change.
Registered in ~/.claude.json as github-mcp (stdio, system Python312,
read group always on, write group absent from env -- off).
Commercial support
Maintained by Jaimen Bell. For production MCP integrations, custom servers, or agent-reliability work, see jaimenbell.dev.
Building your own MCP server? The MCP Starter Kit has templates, a build playbook, and packaging war-stories from shipping this one.
mcp-name: io.github.jaimenbell/github-mcp
來源:README.md,提交 14758b7
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分