The official Git MCP server enables AI agents to interact with local Git repositories. It provides tools for reading file history, viewing diffs between commits or branches, listing branches and tags, searching through commit logs, and showing repository status. All operations are read-only for safety. Essential for code review, codebase analysis, and understanding project history without needing GitHub API access.
Automated score · from 3 of 5 checks · v1.1-github-security · today
uvx mcp-server-git
{
"mcpServers": {
"git": {
"args": [
"mcp-server-git",
"--repository",
"/path/to/repo"
],
"command": "uvx"
}
}
}[](https://agentforge.community/server/git?ref=badge)
<a href="https://agentforge.community/server/git?ref=badge"><img src="https://agentforge.community/api/badge/git" alt="Καταχωρημένο στο AgentForge" /></a>
Get git diff
{
"type": "object",
"required": [
"path"
],
"properties": {
"ref": {
"type": "string"
},
"path": {
"type": "string"
}
}
}// Input
{
"ref": "HEAD~1",
"path": "."
}// Output
{
"diff": "+added line\\n-removed line",
"files_changed": 3
}Get git commit log
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
},
"max_count": {
"type": "integer"
}
}
}// Input
{
"path": ".",
"max_count": 5
}// Output
{
"commits": [
{
"hash": "abc",
"author": "John",
"message": "Fix bug"
}
]
}The official Git MCP server enables AI agents to interact with local Git repositories. It provides tools for reading file history, viewing diffs between commits or branches, listing branches and tags, searching through commit logs, and showing repository status. All operations are read-only for safety. Essential for code review, codebase analysis, and understanding project history without needing GitHub API access.
Git provides 3 tools including diff, log, status.
Yes, Git is completely free to use with no usage limits on the free tier.
Get git status
{
"type": "object",
"required": [
"path"
],
"properties": {
"path": {
"type": "string"
}
}
}// Input
{
"path": "."
}// Output
{
"modified": [
"src/app.ts"
],
"untracked": [
"new-file.ts"
]
}You can install Git using the following command: uvx mcp-server-git. After installation, add the provided config snippet to your Claude Desktop or Cursor configuration.
Git is listed under the Development Tools category in the AgentForge MCP registry.
To connect Git, click the "Connect Agent" button on this page to get the configuration snippet. Add it to your MCP client (Claude Desktop, Cursor, or any MCP-compatible tool). Your AI agent will then have access to all of Git's tools via the Model Context Protocol.