github-mcp-server
Enables comprehensive GitHub operations including repository management, push, releases, issues, PRs, GitHub Actions, secrets, security, profile, search, and a unique portfolio push tool to create repos from local folders.
README
GitHub MCP Server
A Model Context Protocol server that lets Claude Code (or any MCP client) operate GitHub end-to-end: repos, pushes, releases, GitHub Actions, issues, PRs, secrets, security, profile, and search.
Mirrors the design of the sister gitlab-mcp-server — same modular tools/ layout, same auth-via-.env pattern, same register(mcp) per module.
What it does
| Category | Examples |
|---|---|
| Portfolio launch (the hero tool) | github_push_portfolio — loops over every subfolder of a directory, creates each as a GitHub repo, commits, pushes |
| Repo lifecycle | create / update / delete / list / archive / transfer |
| Push & file ops | init-and-push, single-file edit, atomic batch commit, token-sanitized clone |
| Discoverability | topics, homepage, description, README badges, GitHub Pages |
| Releases | create + auto-generate release notes |
| Issues & PRs | create / list / comment / close / merge / review |
| GitHub Actions | list / trigger / cancel / rerun / get logs / analyze workflow failure / scaffold ci.yml |
| Secrets & variables | repo + org level |
| Security | enable Dependabot / secret scanning / code scanning, branch protection, audit |
| Profile | bio, profile README, pinned repos, stats |
| Community | stars, stargazers, traffic |
| Search | repos / code / users |
| Token lifecycle | validate auth, check scopes, list PATs |
Install
cd ~/.mcp-servers/github-mcp-server
pip install -r requirements.txt
cp .env.example .env
# Edit .env — set GITHUB_TOKEN to your fine-grained PAT
Configure Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"github": {
"command": "python3",
"args": ["/Users/youruser/.mcp-servers/github-mcp-server/server.py"]
}
}
}
Restart Claude Code. The tools become available with the mcp__github__ prefix.
Quick start — push your entire portfolio in one command
After install + config, in a Claude Code session:
"Use github_validate_auth to confirm my token works."
"Use github_push_portfolio with parent_dir=/path/to/GITHUB-PROJECTS/projects, visibility=public, and topics auto-derived from each repo's README."
That's it. Each subfolder becomes a public GitHub repo, ready to share.
Token scopes (fine-grained PAT)
| Scope | Why |
|---|---|
| Contents: write | Push code, edit files, create releases |
| Administration: write | Create / delete / archive repos, set topics, branch protection |
| Metadata: read | Repo metadata, search |
| Workflows: write | Trigger / cancel GitHub Actions |
| Pull requests: write | PR create / merge / review |
| Issues: write | Issue create / comment / close |
| Secrets: write | Set repo / org secrets |
| Pages: write | Enable GitHub Pages |
For Tier 1 (just portfolio push), only Contents: write + Administration: write + Metadata: read are required.
Folder structure
github-mcp-server/
├── server.py # FastMCP entry, registers all tool modules
├── config.py # Loads GITHUB_TOKEN from .env
├── requirements.txt
├── .env.example
├── .gitignore
├── README.md # this file
└── tools/
├── __init__.py
├── github_repo.py # create / update / list / delete / archive / transfer
├── github_push.py # init_and_push, push_portfolio (hero tool)
├── github_files.py # update_file, batch_commit, get_file, clone
├── github_meta.py # topics, homepage, badges, Pages
├── github_releases.py # release lifecycle + tags
├── github_actions.py # workflows: trigger, status, logs, failure analyzer
├── github_issues.py # issues + comments
├── github_prs.py # PRs + reviews
├── github_secrets.py # secrets + variables
├── github_security.py # Dependabot, secret/code scanning, branch protection, audit
├── github_profile.py # bio, profile README, pinned repos, stats
├── github_community.py # stars, stargazers, traffic
├── github_search.py # repo / code / user search
└── github_tokens.py # validate_auth, check_scopes, list_pats
Compared to GitHub's official MCP
GitHub publishes their own github/github-mcp-server. That one is more complete for general API surface; this one is portfolio-workflow tuned:
github_push_portfolio(loops a folder) doesn't exist in the official onegithub_analyze_workflow_failure(log → root cause → suggested fix) is customgithub_audit_repo(single call: protection on? Dependabot? README? license?) is custom- The token lifecycle tooling matches the pattern that lets you avoid orphan-token leaks
Use whichever fits your workflow. They can coexist if you give them different MCP server names.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。