mcp-github-push
Enables Claude and other MCP clients to push project files directly to GitHub repositories without local cloning, with preview-and-confirm safety and batched single-commit updates.
README
mcp-github-push
MCP server yang berjalan di komputer kamu sendiri, menyimpan GitHub PAT secara lokal, dan melakukan git clone/commit/push sungguhan lewat git CLI asli — bukan lewat REST API yang mengharuskan isi setiap file diketik ulang dalam parameter tool call.
Berbentuk CLI terminal — install lewat npm, setup token sekali, lalu daftarkan ke MCP client kamu.
Cara kerja
- Claude bekerja di sandboxnya sendiri (clone, edit file, dsb).
- Setelah selesai, Claude menghasilkan
git diffdari perubahannya — teks ringkas, bukan isi file utuh. - Diff itu dikirim lewat tool call
git_apply_patchke MCP server ini, yang menerapkannya ke workspace lokalnya sendiri (clone terpisah, tersimpan di~/.config/mcp-github-push/workspaces/). - Setelah user meninjau (
git_status/git_diff) dan menyetujui, Claude memanggilgit_push— server ini yang menjalankangit commit+git pushsungguhan pakai token yang tersimpan di server.
Token GitHub kamu tidak pernah lewat chat/context Claude — token hanya ada di file config lokal dan disuntikkan langsung ke proses git saat fetch/push.
Kenapa ini beda dari connector GitHub bawaan?
- Bukan REST API per file. Push memakai
gitCLI asli di atas clone lokal, jadi mendukung ratusan file sekaligus lewat satu diff — bukan mengetik ulang isi tiap file dalam parameter JSON. - Wajib konfirmasi sebelum push.
git_pushmensyaratkan parameterconfirmed: true, yang hanya boleh diisi Claude setelah user menyetujui secara eksplisit di percakapan. - Token disimpan lokal, tidak pernah ke chat. File config permission
600di POSIX (Linux/macOS); di Windows mengikuti ACL folder user biasa.
Instalasi
Opsi A — Tanpa Node.js (executable siap pakai)
Tidak perlu install Node.js sama sekali. Download binary sesuai OS kamu dari halaman Releases:
- Windows:
mcp-github-push-win-x64.exe - Linux:
mcp-github-push-linux-x64 - macOS:
mcp-github-push-macos-x64
Jalankan dari terminal:
# 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
Lalu daftarkan path lengkap ke file exe di config MCP client:
{
"mcpServers": {
"github-push": {
"command": "C:\\path\\ke\\mcp-github-push-win-x64.exe",
"args": ["start"]
}
}
}
Opsi B — Lewat npm (butuh Node.js 18+)
npx @kintil555/mcp-github-push setup
Ikuti instruksi:
- Buat Personal Access Token (fine-grained direkomendasikan) dengan scope Contents: Read and write untuk repo yang ingin dipakai.
- Tempel token saat diminta (input disamarkan di terminal).
- Token diverifikasi otomatis dan disimpan di
~/.config/mcp-github-push/config.json.
Daftarkan ke MCP client
Tambahkan ke config MCP client kamu (mis. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"github-push": {
"command": "npx",
"args": ["-y", "@kintil555/mcp-github-push", "start"]
}
}
}
Restart client-nya. Tools yang tersedia untuk Claude:
| Tool | Fungsi |
|---|---|
github_whoami |
Cek token valid & lihat username |
git_sync_workspace |
Clone (kalau belum ada) atau fetch+checkout branch terbaru ke workspace lokal |
git_apply_patch |
Terapkan unified diff (dari git diff di sandbox Claude) ke workspace lokal |
git_status |
Lihat ringkasan file yang berubah, belum di-commit |
git_diff |
Lihat detail diff lengkap di workspace lokal |
git_push |
Commit + push sungguhan — hanya jalan setelah user setuju (confirmed: true) |
git_discard_workspace |
Hapus workspace lokal (mis. untuk clone ulang dari awal) |
Perintah CLI lain
npx @kintil555/mcp-github-push status # cek token masih valid
npx @kintil555/mcp-github-push logout # hapus token tersimpan
Build dari source
git clone https://github.com/kintil555/mcp-github-push.git
cd mcp-github-push
npm install
npm run build
CI di GitHub Actions otomatis build & type-check tiap push/PR ke main, dan publish ke npm saat rilis tag baru dibuat.
Prasyarat
gitCLI harus terinstall dan ada di PATH (server ini menjalankangitsungguhan, bukan REST API). Cek dengangit --version. Kalau belum ada: git-scm.com/downloads.
Keamanan
- Token disimpan di
~/.config/mcp-github-push/config.json. Permission600diterapkan di Linux/macOS; di Windows mengandalkan permission folder user default (NTFS ACL), bukanchmodUnix. - Token tidak pernah ditulis ke
.git/configdi workspace lokal — hanya disuntikkan sesaat ke prosesgitlewat header HTTP sementara saat fetch/push. - Gunakan fine-grained PAT yang dibatasi ke repo tertentu, bukan classic token dengan akses penuh.
- Set masa berlaku token dan rotasi berkala.
git_pushmensyaratkan parameterconfirmed: true— pastikan MCP client kamu menampilkan tool call untuk ditinjau user sebelum dieksekusi.
Lisensi
MIT
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.
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.
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.
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.
E2B
Using MCP to run code via e2b.