mcp-github-push

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.

Category
Visit Server

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

  1. Claude bekerja di sandboxnya sendiri (clone, edit file, dsb).
  2. Setelah selesai, Claude menghasilkan git diff dari perubahannya — teks ringkas, bukan isi file utuh.
  3. Diff itu dikirim lewat tool call git_apply_patch ke MCP server ini, yang menerapkannya ke workspace lokalnya sendiri (clone terpisah, tersimpan di ~/.config/mcp-github-push/workspaces/).
  4. Setelah user meninjau (git_status / git_diff) dan menyetujui, Claude memanggil git_push — server ini yang menjalankan git commit + git push sungguhan 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 git CLI 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_push mensyaratkan parameter confirmed: true, yang hanya boleh diisi Claude setelah user menyetujui secara eksplisit di percakapan.
  • Token disimpan lokal, tidak pernah ke chat. File config permission 600 di 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:

  1. Buat Personal Access Token (fine-grained direkomendasikan) dengan scope Contents: Read and write untuk repo yang ingin dipakai.
  2. Tempel token saat diminta (input disamarkan di terminal).
  3. 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

  • git CLI harus terinstall dan ada di PATH (server ini menjalankan git sungguhan, bukan REST API). Cek dengan git --version. Kalau belum ada: git-scm.com/downloads.

Keamanan

  • Token disimpan di ~/.config/mcp-github-push/config.json. Permission 600 diterapkan di Linux/macOS; di Windows mengandalkan permission folder user default (NTFS ACL), bukan chmod Unix.
  • Token tidak pernah ditulis ke .git/config di workspace lokal — hanya disuntikkan sesaat ke proses git lewat 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_push mensyaratkan parameter confirmed: true — pastikan MCP client kamu menampilkan tool call untuk ditinjau user sebelum dieksekusi.

Lisensi

MIT

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

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.

Official
Featured
Python
graphlit-mcp-server

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.

Official
Featured
TypeScript
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured