mcp-github-push
mcp-github-push
轻量级 MCP 服务器,让 Claude(或其他 MCP 客户端)能够直接将项目推送到 GitHub,无需在电脑上执行 git clone/git pull。作为 GitHub 连接器的替代方案,更节省 token,且不会占用本地存储。
采用终端 CLI 形式——通过 npm 安装,一次性设置 token,然后注册到你的 MCP 客户端即可。
为什么这与内置的 GitHub 连接器不同?
不会将仓库克隆到磁盘。 所有操作直接通过 GitHub REST/Git Data API 完成,因此不占用本地存储。
一次提交包含多个文件。 使用 Git Data API(blob → tree → commit → ref),将多个文件的更改合并为一次整洁的提交,而不是每个文件都产生一次提交。
推送前必须确认。 必须先调用
github_preview_push工具来显示更改摘要;只有在用户明确同意后,才能调用github_push_confirmed。Token 本地存储,安全。 配置文件权限为
600,仅所有者用户可读。
Related MCP server: ship-it-mcp
安装
选项 A — 无需 Node.js(可直接使用的可执行文件)
完全不需要安装 Node.js。从 Releases 页面 下载适合你操作系统的二进制文件:
Windows:
mcp-github-push-win-x64.exeLinux:
mcp-github-push-linux-x64macOS:
mcp-github-push-macos-x64
从终端运行:
# Windows (PowerShell/CMD)
mcp-github-push-win-x64.exe setup
# Linux/macOS
chmod +x mcp-github-push-linux-x64
./mcp-github-push-linux-x64 setup然后在 MCP 客户端配置中注册 exe 文件的完整路径:
{
"mcpServers": {
"github-push": {
"command": "C:\\path\\ke\\mcp-github-push-win-x64.exe",
"args": ["start"]
}
}
}选项 B — 通过 npm(需要 Node.js 18+)
npx @kintil555/mcp-github-push setup按照说明操作:
创建 Personal Access Token(推荐使用 fine-grained)并授予目标仓库 Contents: Read and write 权限。
在提示时粘贴 token(终端输入会被隐藏)。
Token 会自动验证并保存到
~/.config/mcp-github-push/config.json。
注册到 MCP 客户端
将其添加到你的 MCP 客户端配置中(例如 Claude Desktop 的 claude_desktop_config.json):
{
"mcpServers": {
"github-push": {
"command": "npx",
"args": ["-y", "@kintil555/mcp-github-push", "start"]
}
}
}重启客户端。可供 Claude 使用的工具:
工具 | 功能 |
| 检查 token 是否有效并查看权限范围 |
| 检查仓库是否存在 |
| 创建新仓库 |
| 从仓库读取文件内容 |
| 预览推送前的更改(不进行任何修改) |
| 实际推送——仅在用户同意后执行 |
其他 CLI 命令
npx @kintil555/mcp-github-push status # cek token masih valid
npx @kintil555/mcp-github-push logout # hapus token tersimpan从源码构建
git clone https://github.com/kintil555/mcp-github-push.git
cd mcp-github-push
npm install
npm run buildGitHub Actions 中的 CI 会在每次推送到 main 或 PR 时自动构建并执行类型检查,并在创建新版本标签时发布到 npm。
安全性
Token 保存在
~/.config/mcp-github-push/config.json,权限为600。使用限定到特定仓库的 fine-grained PAT,而不是具有完全访问权限的 classic token。
设置 token 有效期并定期轮换。
github_push_confirmed的设计确保 AI 模型无法在未提供confirmed: true参数的情况下推送——请确保你的 MCP 客户端也在执行前向用户展示工具调用以供审查。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityFmaintenanceEnables Claude or any MCP client to drive the GitHub Copilot cloud agent via its REST API, allowing it to research, edit, and open pull requests on repositories without manual intervention.11MIT
- FlicenseNot gradedqualityCmaintenanceEnables to interact with GitHub repositories directly from Claude, supporting actions like viewing repos, checking status, committing and pushing changes, and managing pull requests.
- FlicenseAqualityBmaintenanceAutomates GitHub workflows (branch creation, testing, commit/push, PR) through natural language instructions in Claude Code.8
- FlicenseNot gradedqualityBmaintenanceEnables GitHub repository operations (list/read files, create branches, commit files, open/list PRs) via an authless remote MCP server that keeps your GitHub token encrypted on Cloudflare, with access limited to allowed repositories.
Related MCP Connectors
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
A MCP server built for developers enabling Git based project management with project and personal…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kintil555/mcpserver-claude'
If you have feedback or need assistance with the MCP directory API, please join our Discord server