GitHub MCP Server (Custom)
Enables AI agents to perform full CRUD operations on GitHub, including repositories, issues, pull requests, branches, comments, reviews, and merges through the Model Context Protocol.
README
GitHub MCP Server (Custom)
A custom Model Context Protocol (MCP) server giving an AI agent full
CRUD access to GitHub: repositories, issues, pull requests, branches,
comments, reviews, and merges. Built with the official Python mcp SDK
(FastMCP) and GitHub's REST API via httpx.
23 tools total — see server.py for the full list. Highlights:
| Area | Tools |
|---|---|
| Repos | list_repos, get_repo |
| Issues | list_issues, get_issue, create_issue, update_issue, close_issue, add_issue_comment, list_issue_comments |
| Branches | list_branches, get_branch, create_branch, delete_branch |
| Pull Requests | list_pull_requests, get_pull_request, create_pull_request, update_pull_request, merge_pull_request, list_pr_files |
| Reviews | list_pr_reviews, create_pr_review |
| Commits | list_commits, get_commit |
Setup
-
Install dependencies
pip install -r requirements.txt -
Create a GitHub token
Go to https://github.com/settings/tokens and create either:
- a classic PAT with the
reposcope, or - a fine-grained PAT with
Contents,Issues,Pull requests, andMetadataset to Read & write, scoped to the repos you want the agent to touch.
- a classic PAT with the
-
Set the token as an environment variable
export GITHUB_TOKEN=ghp_your_token_here -
Run it standalone (optional sanity check)
python server.pyIt will sit and wait for an MCP client to connect over stdio — that's expected, it's not a web server.
Connecting it to Claude Desktop
Add this to your claude_desktop_config.json
(%APPDATA%\Claude\claude_desktop_config.json on Windows,
~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"github": {
"command": "python",
"args": ["/absolute/path/to/server.py"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Restart Claude Desktop and the GitHub tools will show up in the tool picker.
Connecting it to your own agent pipeline (e.g. the Jira → GitHub → Teams project)
Since this is a standard MCP stdio server, any MCP-compatible client or SDK can spawn it as a subprocess and talk to it over stdin/stdout — including a .NET host if you're using the MCP C# SDK, or the Python/TypeScript SDKs if your orchestrator is polyglot. Point the client at:
command: python
args: ["/absolute/path/to/server.py"]
env: { "GITHUB_TOKEN": "<token>" }
Extending it
To add a new tool, just add a new @mcp.tool()-decorated function to
server.py that calls _request(method, path, ...) against the
GitHub REST API. The docstring becomes
the tool's description shown to the model, and type hints become the
input schema — so keep both accurate.
Notes
- All write operations (
create_*,update_*,delete_*,merge_*) make real changes on GitHub — there's no dry-run mode. Consider testing against a scratch repo first, especiallymerge_pull_requestanddelete_branch. - Rate limits follow GitHub's standard REST API limits (5,000 requests/hour for authenticated requests as of this writing) — the server doesn't do its own throttling.
- Errors from GitHub (bad auth, 404s, merge conflicts, etc.) are raised as
RuntimeErrorwith the API's response body included, so the calling agent gets a readable message to react to.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。