
Self-hosted GitHub MCP server
io.github.adelaidasofia由 GitHub 帳號 adelaidasofia 發布v0.1.0更新於 Oct 24, 2026
Self-hosted GitHub MCP server. PAT auth, stdio transport, transport-agnostic so it works with…
概覽
自架的 GitHub MCP 伺服器,讓助理用個人存取權杖檢視拉取請求、讀寫儲存庫檔案並掃描 Dependabot 警示。
- 可以做什麼
- 透過健康檢查工具驗證權杖是否有效、查看速率限制餘量,並確認權杖實際具備的權限範圍。依狀態列出拉取請求,取得單一 PR 的檢查執行狀態與可合併狀態。以 squash、merge 或 rebase 方式合併 PR,可選擇刪除分支。透過 Contents API 讀取檔案,並以 SHA 冪等地建立或更新檔案。列出 Dependabot 警示並依嚴重程度分組計數。
- 適用情境
- 適合在多個 MCP 用戶端或多個 Claude 帳號之間共用同一個 GitHub 權杖的情境,也適合希望工具面小而可稽核、只涵蓋拉取請求、儲存庫檔案與 Dependabot 警示,而不需要大而全 GitHub 伺服器時使用。
- 執行需求
- 以 Python 套件形式透過 uv 安裝,作為本機程序經 stdio 執行,僅限桌面端。需要一個 GitHub 個人存取權杖,預設從 macOS 鑰匙圈讀取,其他環境從 GITHUB_TOKEN(或 GH_TOKEN)環境變數讀取。最低權限:Contents 讀寫、Pull requests 讀寫、Dependabot alerts 唯讀。可選 GITHUB_API_BASE 用於 GitHub Enterprise Server。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Self-hosted GitHub MCP server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
github-mcp
[License] [GitHub stars] [Last commit] [Open issues] [PyPI version] [PyPI downloads] [Built by Mycelium AI]
Self-hosted GitHub MCP server. Personal-access-token auth, stdio transport, transport-agnostic so it works with Claude Code (any account), Codex CLI, Cursor, or any MCP-compliant client. No claude.ai OAuth dependency.
Written in Python on top of FastMCP. Slots into the same install pattern as other community Python MCP servers.
Why this exists
The official github/github-mcp-server (Go, 60+ tools) is excellent if you want a kitchen-sink server tied to a single agent platform's auth flow. This one is scoped for operators who:
- Switch between multiple Claude accounts, Codex CLI, Cursor, or other MCP clients and want the same GitHub auth across all of them.
- Prefer a small, audited tool surface scoped to PR + repo file + Dependabot operations.
- Want a Python install that lives alongside their other MCP servers.
If neither applies, run github/github-mcp-server instead — that's the right call.
Tool surface (v0.1.0)
Future versions expand: workflows, releases, issues, rulesets, secret-scan alerts, branch protection, repo settings.
Secret hygiene (read this first)
v0.1.1+ reads the PAT from macOS Keychain by default. Env-var fallback is still supported for non-macOS / CI, but the Keychain path is the recommended setup because the secret never enters argv or process env — safe from ps aux, pgrep -fl, lsof, /proc/<pid>/environ, panic dumps, CI logs, debuggers, or any LLM agent running an introspection command.
Do NOT install with an inline --env:
PR/incident lineage: this hygiene path was added 2026-05-19 after a pgrep -fl chrome-devtools-mcp dumped a PAT-bearing claude process into a session transcript. See adelaidasofia/github-mcp Keychain migration (TODO: link PR once merged).
For non-macOS environments, fall back to env:
Minimum scopes for the v0.1 tool surface: Contents R/W, Pull requests R/W, Dependabot R.
Install
Open Claude Code, paste:
Legacy install
Or as a one-off without persistent install:
Auth
The server reads the GitHub PAT from environment, in this precedence:
GITHUB_TOKENGH_TOKEN
Fine-grained tokens recommended.
Scope matrix
v0.1 floor: Metadata + Contents (R/W) + Pull requests (R/W) + Dependabot alerts (R) is enough to use every tool in this release.
Future-proof: granting the full table now means new MCP tools can ship without rotating the PAT. Equivalent to checking "all repository permissions" in the fine-grained PAT UI. Trade-off: broader blast radius if the token leaks. Reasonable for a personal-dev token on an encrypted laptop with FileVault; reconsider for shared or production deployments.
The MCP introspects scopes via health_check — call it after wiring up to confirm what your token actually has.
Optional: GITHUB_API_BASE for GitHub Enterprise Server. Defaults to https://api.github.com.
Wire into an MCP client
Claude Code
Add to ~/.claude/.mcp.json (or any .mcp.json in the project root):
Codex CLI
Add to ~/.codex/config.toml:
Cursor
~/.cursor/mcp.json follows the Claude Code shape. Same env block.
Any other MCP-compliant client
Configure it to spawn the github-mcp command and pipe stdio. The server speaks standard MCP over stdio.
Verify
The server will wait on stdin for MCP traffic. In another shell, exercise health_check via your client.
Test
Telemetry
This plugin sends a single anonymous install signal to myceliumai.co the first time it loads in a Claude Code session on a given machine.
What is sent:
- Plugin name (e.g.
slack-mcp) - Plugin version (e.g.
0.1.0)
What is NOT sent:
- No user identifiers, names, emails, tokens, or API keys
- No file paths, message content, or anything from your work
- No IP address is stored after dedup processing
Why: Helps the maintainer know which plugins people actually install, so attention goes to the ones that get used.
Opt out: Set the environment variable MYCELIUM_NO_PING=1 before launching Claude Code. The hook will skip the network call entirely. Already-pinged installs leave a sentinel at ~/.mycelium/onboarded-<plugin> — delete it if you want to reset state.
License
MIT.
來源:README.md,提交 72805e4
工具
0版本歷史
1- v0.1.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分