Practical overview
When it fits
Use it when an MCP client needs to expose concrete Git operations on local repositories to an AI agent, including workflows that involve more than reading repository state.
Who it is for
- Developers configuring MCP-compatible AI agents to work with local Git repositories.
- Builders creating agent workflows for version control, branching, integration or worktree tasks.
Documented uses
- Let an agent inspect repository status, diffs, history and Git objects.
- Give an agent tools to stage and commit changes or synchronize remotes.
- Support agent workflows involving branches, merges, rebases, cherry-picks, stashes, tags and worktrees.
Requirements & limits
The public repository is licensed under Apache-2.0. The documented runtimes are Node.js 20 or later and Bun 1.2 or later.
- Choose STDIO or Streamable HTTP for the MCP connection; the README’s example client configuration uses STDIO.
- The server’s configured base directory and Git identity are relevant to the repositories and commit operations the agent can work with.
- The documented toolset includes remote operations such as fetch, pull and push as well as local repository management.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Configure the server for an MCP client
Add the Git MCP Server to an MCP client using the documented STDIO setup.
Before you start
- Node.js 20 or later, or Bun 1.2 or later
- An MCP client configuration file
- Values for the Git username and email environment variables
Steps
Add a server entry to the MCP client configuration with the command
npxand argument@cyanheads/git-mcp-server@latest.Set
MCP_TRANSPORT_TYPEtostdioand provideGIT_BASE_DIR,LOGS_DIR,GIT_USERNAMEandGIT_EMAILin the environment.For Bun, use
bunxinstead ofnpx.
Expected outcome
The MCP client configuration points to the Git MCP Server using STDIO and includes the documented repository directory and Git identity settings.
Guide limitations
- The guide covers client configuration, not verification of a running connection or execution of Git operations.
- For Streamable HTTP, the README specifies setting
MCP_TRANSPORT_TYPE=httpandMCP_HTTP_PORT; this recipe does not cover HTTP setup.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- cyanheads/git-mcp-server · Official homepage title · retained in its source language

