github-mcp
An MCP server that enables AI assistants to interact with GitHub via a fine-grained personal access token — pushing commits, managing branches, opening and merging PRs, creating issues, and reading repositories. It runs locally with no telemetry and supports a read-only mode.
README
@iiinigence/github-mcp
Push commits, manage branches, open PRs, and read repos — by just asking your AI.
An open-source MCP server for GitHub, developed by IIInigence. Works with Claude Desktop, Claude Code, and any MCP-compatible client.
Because it runs on your machine with your token, your AI assistant can ship code to GitHub even from cloud sandboxes that can't push directly — the API calls originate from your device, not the sandbox.
Easiest install — one file, no terminal (Claude Desktop)
- Download
iiinie-github.mcpbfrom the latest release - In Claude Desktop: Settings → Extensions → Advanced settings → Install Extension → pick the downloaded file. Claude shows what you're getting; click Install.
- Paste your GitHub token (see below) and optionally a default owner/org. Done.
Nervous about giving an AI push powers? Flip on Read-only mode in the same form: Claude can read repos and PRs but can't change a thing until you turn it off.
Get a token (2 minutes)
Create a fine-grained personal access token at GitHub → Settings → Developer settings → Fine-grained tokens:
- Repository access: Only select repositories — pick just the repos you want your AI to work with
- Permissions → Repository permissions:
- Contents: Read and write
- Pull requests: Read and write
- Issues: Read and write
- Actions: Read-only
- Metadata: Read-only (added automatically)
Never use a classic token with broad scopes — fine-grained scoping is the whole safety story.
Quick start (manual / npx route)
Add to Claude Desktop — Settings → Developer → Edit Config:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@iiinigence/github-mcp"],
"env": {
"GITHUB_TOKEN": "github_pat_your_token_here",
"GITHUB_DEFAULT_OWNER": "your-username-or-org",
"READ_ONLY": "false"
}
}
}
}
Restart Claude Desktop, then try: "Use whoami to check my GitHub connection, then list my repos."
Tools
15 tools. Tools marked 🔒 are destructive: the assistant is instructed to always get your explicit confirmation before calling them, and READ_ONLY blocks them entirely.
| Tool | What it does |
|---|---|
whoami |
Verify the token — who is authenticated |
list_repos |
Repositories the token can access, recently pushed first |
list_branches |
Branches with latest commit SHAs |
get_file |
Read a file (UTF-8) or list a directory at any ref |
list_commits |
Recent commits on a branch |
push_files |
The core write tool — commit multiple files to a branch in one commit and push. Creates the branch if needed. Never force-pushes. |
create_branch |
Create a branch from another branch |
delete_branch 🔒 |
Delete a branch (refuses the default branch) |
open_pr |
Open a pull request (normal or draft) |
list_prs / get_pr |
Browse PRs; details include changed files & mergeability |
merge_pr 🔒 |
Merge a PR (merge / squash / rebase) |
create_issue |
Open a new issue |
comment_on_issue |
Comment on an issue or PR |
list_workflow_runs |
Check GitHub Actions CI status after a push |
Configuration
| Env var | Required | Description |
|---|---|---|
GITHUB_TOKEN |
✅ | Fine-grained personal access token |
GITHUB_DEFAULT_OWNER |
— | Default owner/org when tools don't specify one |
READ_ONLY |
— | true = everything readable, all writes blocked (default false) |
GITHUB_BASE_URL |
— | Override for GitHub Enterprise (e.g. https://github.example.com/api/v3) |
Safety notes
- Use a fine-grained token scoped to only the repos your AI should touch. Rotate it if it may have leaked.
push_filesnever force-pushes, anddelete_branchrefuses the repository's default branch.- Keep yourself as the approval step: have your assistant push to feature branches and open PRs you review, rather than committing to main.
- Start with
READ_ONLY: "true"if you want to connect before granting write powers.
Privacy
This connector runs locally, collects no data, has no telemetry, and talks only to GitHub's API. Your token is stored on your device by Claude Desktop and sent only to GitHub. Full policy: PRIVACY.md.
Who built this
IIInigence — a software development agency: custom software, AI automations, full platforms. This connector is part of our video series on connecting Claude to your business tools, one at a time. See also our SendGrid connector.
Want something like this built for your business? Tell us what you'd build.
Development
git clone https://github.com/iiinigence/github-mcp.git
cd github-mcp
npm install
npm run build
GITHUB_TOKEN=github_pat_xxx node dist/index.js
MIT licensed. PRs welcome.
This is an independent project by IIInigence. It is not affiliated with, endorsed, or sponsored by GitHub, Inc. "GitHub" is a trademark of GitHub, Inc., used here only to describe compatibility.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。