Skip to main content
MCP Server

Tools to read, search, and manipulate Git repositories

Share
980 stars TypeScript MIT Updated: 2025-05-10

Send to Your Agent

Copy this prompt and paste it into Claude, Cursor, or any MCP client to install instantly.

Install the Git MCP server for me.

Server: Git
Description: Tools to read, search, and manipulate Git repositories
Install command: npx -y @modelcontextprotocol/server-git

GitHub: https://github.com/modelcontextprotocol/servers/tree/main/src/git

Please install this MCP server and confirm when ready.

Paste into any AI agent with MCP support — works with Claude Desktop, Cursor, Cline, and more.

Quick Install

Config file: ~/Library/Application Support/Claude/claude_desktop_config.json

  1. Open Claude Desktop app
  2. Go to Settings → Developer → Edit Config
  3. Paste the config below into the file
  4. Restart Claude Desktop
{
  "mcpServers": {
    "git": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-git"
      ]
    }
  }
}

Add this to your ~/Library/Application Support/Claude/claude_desktop_config.json

Installation Methods

npx Run directly with npx
npx -y @modelcontextprotocol/server-git
docker Run with Docker
docker run -i --rm mcp/git

Tools (10)

git_status

Shows the working tree status for a Git repository

git_diff_unstaged

Shows changes in working directory not yet staged for commit

git_diff_staged

Shows changes that are staged for commit

git_diff

Shows differences between branches or commits

git_commit

Commits staged changes with a message

git_add

Stages files for commit

git_reset

Unstages files or resets to a specific commit

git_log

Shows commit history for a repository

git_branch

Lists, creates, or deletes branches

git_checkout

Switches branches or restores working tree files

Compatibility

Claude Desktop
Cursor
Cline
VS Code
Devin (formerly Windsurf)

About

A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.

Key Features

  • Repository status — Check working tree status at a glance
  • Diff viewing — See unstaged, staged, and branch differences
  • Commit management — Stage, commit, and view history
  • Branch operations — List, create, switch, and delete branches
  • Complete Git workflow — Full repository manipulation through natural language

Use Cases

  • Code review assistance — "Show me what changed in the last commit"
  • Commit message generation — "Stage these files and commit with a descriptive message"
  • Branch management — "Create a feature branch and switch to it"
  • History exploration — "Show me all commits from last week"
  • Diff analysis — "What's the difference between main and this branch?"

Related Resources

Compare LLM Pricing

This server works with Claude, GPT-4o, and other models. Compare API costs side-by-side to find the cheapest option for your workflow.