
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 分