MCP server for Git intelligence — status, diff, blame, branches, merge, stage, commit, push, pull, checkout, stash, fetch, reset, cherry_pick, revert, tag. Works with any MCP-compatible client (Cursor, Claude Desktop, LibreChat, etc.).
Roadmap — Planned features, phases, and timeline.
Contributing — How to contribute.
Read
get_status— Working tree and staged changesget_commit_history— Recent commits with author, date, messageget_diff— Diffs for working tree, staged, or between refsget_blame— Who last modified each line of a fileget_branches— Local and remote branchesget_remotes— List remotes and URLs (for push/pull targets)get_reflog— Reflog (recovery, lost commits, branch history)get_show— Show a specific commit (message, author, diff)get_config— Read Git config (specific key or all)get_log— Commit log with filtersget_describe— Human-readable ref description (e.g. v1.2.3-5-gabc1234)get_ls_files— List tracked (or staged, others) filesget_shortlog— Summarize commits by authorget_ignore— Read .gitignore (and optional .git/info/exclude)get_current_branch— Get current branch namesuggest_commit_message— Staged diff for AI to suggest commit messages
Write
init— Initialize a new Git repository (git init; supports bare)clone— Clone a repository from URL (git clone)stage— Stage files for commit (git add)unstage— Unstage files (git reset)commit— Create a commit with staged changespush— Push to remote (protected branches blocked)force_push— Force push (opt-in via GIT_MIND_ALLOWED_ACTIONS; protected branches blocked)pull— Pull from remotecheckout— Switch branch or restore filecreate_branch— Create and optionally checkout a branchdelete_branch— Delete local branch (protected branches blocked)branch_rename— Rename a branch (protected branches blocked)merge— Merge a branch into the current branch (cannot merge into protected branches)stash— Stash changes (push/pop/list)fetch— Fetch from remote (updates refs, no merge)reset— Reset HEAD (soft/mixed only; --hard blocked)cherry_pick— Apply a commit onto current branch (protected branches blocked)revert— Create revert commit (protected branches blocked)tag— List tags or create lightweight/annotated tagrebase— Rebase current branch onto another (action: rebase/abort/continue; protected branches blocked)remote— Add, remove, or set URL of remotes (config file + dry-run; protected remotes like origin blocked from remove)mv— Move or rename files (git mv; tracks rename for better diff history)archive— Create tar/zip archive of repo at a ref (release bundles; dry-run)bisect— Binary search to find bug-introducing commit (start/bad/good/reset/run)worktree— Manage multiple working trees (add/list/remove)get_describe— Human-readable ref description (e.g. v1.2.3-5-gabc1234)
Configuration (optional config file + environment variables; env overrides file)
- Config file — Place
git-mind.config.jsonor.git-mind.jsonin the working directory (or setGIT_MIND_CONFIG_FILE). See git-mind.config.example.json and Safety Model. GIT_MIND_ALLOWED_ACTIONS— Comma-separated list of allowed operations (default:stage,unstage,commit). Addinit,clone,push,force_push,pull,checkout,create_branch,delete_branch,branch_rename,merge,stash,fetch,reset,cherry_pick,revert,tag,rebase,remote,mv,archive,bisect,worktreeto enable init, clone, sync, branching, merge, stash, fetch, reset, cherry_pick, revert, tag, rebase, remote, branch_rename, mv, archive, bisect, worktree, and optional force_push.GIT_MIND_PROTECTED_BRANCHES— Branches to protect from push/delete/merge (default:main,master)GIT_MIND_PROTECTED_REMOTES— Remotes to protect from removal (default:origin; config file supports array)GIT_MIND_STRICT_MODE— Set to1to disable force operationsGIT_MIND_DRY_RUN— Set to1to simulate critical ops (init, clone, push, pull, merge, delete_branch, reset, cherry_pick, revert, rebase, remote, archive, bisect, worktree) without executing
- Cursor — Claude Desktop — ChatGPT — LibreChat
npm install -g git-mind-mcp
# or
npx git-mind-mcp# Use current directory as repo
npx git-mind-mcp
# Specify repo path
npx git-mind-mcp /path/to/your/repoSee LibreChat Integration for detailed setup. Quick start — add to librechat.yaml:
mcpServers:
git-mind:
type: stdio
command: npx
args:
- -y
- git-mind-mcp
- /path/to/your/repo # optional; omit to use process cwd
timeout: 30000For submodule or local development setup, see LibreChat Integration.
Requires Node.js >= 22. Use nvm (or fnm, asdf) for version management:
nvm use # or: fnm use / asdf install
npm install
npm run build
npm run dev # Run with tsx (no build needed)
npm test.nvmrc and .node-version specify Node 22 for nvm/fnm/asdf.
Why Node 22? We target Node 22 LTS for improved performance, native ESM stability, and alignment with the current Node LTS schedule. If you need Node 20 support, use v1.x.
MIT