Git MCP Server
OfficialAbout
The Git MCP server provides comprehensive tools to read, search, and manipulate Git repositories. It enables AI assistants to perform Git operations, analyze repository history, search through commits, and manage branches without leaving your development environment.
Features
- Read and analyze Git repositories
- Search through commit history
- View file changes and diffs
- Manage branches and tags
- Access repository metadata
- Examine commit logs and authors
Installation
Using Claude Desktop
Add this configuration to your Claude Desktop config file:
{
"mcpServers": {
"git": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-git"
]
}
}
}
Using Cursor
Configure in your Cursor settings (Settings > MCP):
{
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git"]
}
}
How to Use
Once installed, you can ask your AI assistant to:
- "Show me the recent commits in this repository"
- "What files were changed in the last commit?"
- "Search for commits mentioning 'authentication'"
- "Show me the diff for this file"
- "List all branches in this repository"