Git MCP
@selfagency
About Git MCP
No overview available yet
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"git": {
"command": "npx",
"args": [
"-y",
"@selfagency/git-mcp@latest"
],
"env": {
"GIT_REPO_PATH": "/path/to/your/repo"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Git MCP?
Git MCP is a Git server for the Model Context Protocol that exposes the full Git workflow—inspect, write, branch, remote, stash, rebase, LFS, git-flow, and documentation lookup—to any MCP-compatible AI agent. It is built for coding agents in tools like GitHub Copilot, Claude Code, Cursor, and OpenAI Codex.
How to use Git MCP?
Run directly via npx with no installation, or install globally with npm. The repository path is set with the --repo-path CLI argument or the GIT_REPO_PATH environment variable, with a per-call override option. Additional safety and signing behavior is configured through environment variables.
Key features of Git MCP
- 11 grouped tools with over 60 actions for everyday Git workflows
- Safety-first: destructive operations require explicit confirmation
- GPG/SSH signing support for commits and tags
- Git LFS and Git Flow workflow support without external CLIs
- Documentation lookup from git-scm.com and man pages
- URI-addressable read-only MCP Resources for status, log, branches, and diff
Use cases of Git MCP
- Inspecting repository state and searching history through an AI agent
- Automating branching, staging, committing, and pushing via coding assistants
- Performing recovery operations like reflog inspection, undo, and reset
- Managing Git Flow or LFS workflows without installing separate CLI tools
- Fetching Git documentation and man pages from within an LLM
FAQ from Git MCP
What are the runtime requirements?
Node.js and a local Git installation. The server is powered by simple-git and cross-platform on macOS, Linux, and Windows (Git for Windows).
How does the server handle destructive operations?
Destructive operations require explicit confirmation. Force push and hook bypass are opt-in via environment variables that default to false.
How is the repository path configured?
Pass --repo-path on the CLI or set GIT_REPO_PATH as an environment variable. The repo_path can also be overridden per-call.
What MCP transport does the server use?
The server communicates over stdio, making it compatible with any MCP client that can call tools and resources.
Does the server support commit and tag signing?
Yes. GPG/SSH signing is supported for commits and tags, with optional server-level auto-sign via environment variables.
More Version Control MCP servers
MCP Linear
tacticlaunchMCP server that enables AI assistants to interact with Linear project management system through natural language, allowing users to retrieve, create, and update issues, projects, and teams.
GitHub Actions 工作流使用说明
HenryHaosonYuque mcp server
MCP Git Ingest
adhikaspA Model Context Protocol (MCP) server that helps read GitHub repository structure and important files.
Bitbucket Server MCP
garc33GitMCP
idosalPut an end to code hallucinations! GitMCP is a free, open-source, remote MCP server for any GitHub project
Comments