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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.