Git MCP Server
An MCP (Model Context Protocol) server enabling LLMs and AI agents to interact with Git repositories. Provides tools for comprehensive Git operations including clone, commit, branch, diff, log, status, push, pull, merge, rebase, worktree, tag management, and more, via the MCP standard. STDIO & HTTP.
Overview
Git MCP Server is a Model Context Protocol (MCP) server that provides comprehensive Git functionality for Large Language Models (LLMs), enabling them to perform version control operations through a secure and standardized interface.
To use Git MCP Server, clone the repository from GitHub, install the dependencies, and configure it in your MCP client settings. After that, you can integrate its operations with your Git workflows.
- Core Git operations including repository management and file handling - Bulk operations for executing multiple Git commands in sequence - Safety features for path validation and error reporting
- Integrating version control capabilities within LLM applications.
- Automating repository management tasks using AI agents.
- Enhancing development environments with secure Git operations.
Add to your AI client
Use these steps to connect Git MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"git-mcp-server-cyanheads": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"git-mcp-server-cyanheads": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"git-mcp-server-cyanheads": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"git-mcp-server-cyanheads": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"git-mcp-server-cyanheads": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"git-mcp-server-cyanheads": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git-mcp-server-cyanheads"
]
}
}
}FAQ
What is the Model Context Protocol (MCP)?
MCP is a standardized communication protocol that allows LLMs to interact with external systems, such as Git servers.
Is Git MCP Server open source?
Yes! Git MCP Server is open source under the Apache License 2.0.
Can I contribute to Git MCP Server?
Absolutely! Contributions are welcome; just follow the guidelines provided in the repository.