Git 工具
Provides a Git workbench through MCP tools for reviewing repository status and diffs, staging and unstaging changes, discarding changes, committing, viewing commit history, pulling and pushing branches, and managing stashes, including AI-generated Conventional Commits-style commit messages.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
zcode-plugin-git
Git workbench side panel for ZCode, built on MCP Apps — review, stage, and commit changes without leaving the chat, with AI-generated commit messages.
English | 简体中文
Features
Git side panel — branches, ahead/behind, staged & working-tree changes (renames, conflicts, and untracked files included)
List & tree views — collapsible directory tree with single-child chains merged (
a/b/c); view preference rememberedDiff viewer — inline unified diff per file, switchable side-by-side compare, adjustable context (±10 / ±20 lines / full file), previous/next change navigation, and a minimap overview (add/del coloring, viewport indicator, click/drag to jump)
Image compare — image files open as an old-vs-new side-by-side preview across staged / worktree / HEAD versions (>2MB is skipped with a hint)
File actions — stage, unstage, and discard (inline confirmation for destructive ones), plus bulk actions per section
Pull & stash — one-click
git pull; stash push (including untracked), pop, apply, and list with a count badgeCommit history — a clock button opens the recent commit list (paged load-more); click any commit to expand its full diff, switchable between unified and side-by-side views
AI commit messages — generate Conventional Commits messages from the staged diff via host model sampling (
sampling/createMessage), with an optional custom prompt; also available as the/git:commitslash commandLive updates — status refreshes every 3s while the panel is visible; open diffs follow their files across stage/unstage
Related MCP server: Git Code Review MCP
Requirements
ZCode host with MCP Apps support
Node.js ≥ 18
giton PATH
Install
Built artifacts are committed under plugins/git/dist/, so installing from a checkout needs no build step.
Add as a marketplace source (recommended)
zcode plugins marketplace add https://github.com/wudx/zcode-plugin-gitThen install the Git 工具 plugin from the marketplace and open the Git panel in the sidebar.
From source
git clone https://github.com/wudx/zcode-plugin-git
cd zcode-plugin-git
npm install
npm run build
zcode plugins marketplace add /path/to/zcode-plugin-gitDevelopment
npm install # esbuild + MCP SDK (build-time only)
npm run build # bundle server + panel into plugins/git/dist/
npm run smoke # MCP protocol smoke tests against a temp git repo
node scripts/serve-panel.mjs # open http://127.0.0.1:8137/mock to test the panel UIAfter changing source, run npm run build, then refresh the marketplace and update the plugin in ZCode (source is not hot-reloaded).
Project layout
marketplace.json Marketplace manifest (add this repo as a source)
plugins/
git/
.zcode-plugin/plugin.json Plugin manifest (sidebar surface + MCP server)
commands/commit.md /git:commit slash command
icon.png
server/server.mjs MCP server source (14 git tools + panel resource)
ui/src/ Panel source (vanilla JS + @modelcontextprotocol/ext-apps)
dist/ Build output (committed — what actually runs)
server.mjs Bundled MCP server (zero runtime dependencies)
ui/panel.html Panel page with all JS/CSS inlined
scripts/
build.mjs Build script
smoke.mjs MCP protocol smoke tests
serve-panel.mjs Static server for the panel test bench
mock-host.html Mock ZCode host (ui/initialize + tool/sampling stubs)MCP tools
Tool | Description |
| Branch, ahead/behind, staged/worktree/conflict file lists, stash count |
| Single-file diff ( |
| Diffs for many paths in one call (one |
|
|
|
|
| Discard worktree changes / delete untracked files (dangerous) |
| Commit the index (message read from stdin, multi-line UTF-8) |
| Recent commit history |
| Full diff of a commit ( |
|
|
| Push the current branch to its upstream (sets upstream with |
|
|
| Pop the latest stash entry |
| Apply a stash entry (keep it) |
| List stash entries (ref + subject) |
| Read a file's content at worktree/index/HEAD (images as base64 for panel preview) |
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Plain-English git for agents: 22 tools to branch, commit, push and tag. Free tier.
Edit your live web app by chatting: preview changes in a sandbox, then open a pull request.
Edit your live web app by chatting: preview changes in a sandbox, then open a pull request.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to interact with local Git repositories for operations like status, commits, branching, and diffs, plus GitHub API integration for managing pull requests when authenticated.-
- AlicenseBqualityDmaintenanceEnables AI assistants to perform code reviews by providing access to staged files, git diffs, and repository file content. It allows users to evaluate changes and context within any local git repository before committing or pushing.34 npmISC
- FlicenseNot gradedqualityDmaintenanceEnables AI-powered git assistance including commit message generation, branch naming, and branch analysis using conventional commits and git status/diff/log.1-
- AlicenseNot gradedqualityBmaintenanceEnables Codex users to review workspace and staged files, preview diffs, stage or unstage changes, generate AI-written Chinese Conventional Commit messages from staged diffs, and switch, merge, update, and push branches from a local panel. All Git operations run through a locally registered MCP service without a cloud deployment.MIT