Git MCP
@selfagency
关于 Git MCP
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"git": {
"command": "npx",
"args": [
"-y",
"@selfagency/git-mcp@latest"
],
"env": {
"GIT_REPO_PATH": "/path/to/your/repo"
}
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
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.
版本控制 分类下的更多 MCP 服务器
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.
Linear MCP Server
clinea private MCP server for accessing Linear
MCP Atlassian
soopersetMCP server for Atlassian tools (Confluence, Jira)
Gerrit Review MCP Server
cayirtepeomerThis MCP server provides integration with Gerrit code review system, allowing AI assistants to review code changes and their details through a simple interface.
Git MCP Server
cyanheadsA Git MCP server for AI agents. STDIO & Streamable HTTP.
评论