This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
npx @mintlify/mcp add git-mcp --client claude
Debugging
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector uvx mcp-server-git
Or if you've installed the package in a specific directory or are developing on it:
cd path/to/servers/src/git
npx @modelcontextprotocol/inspector uv run mcp-server-git
Running tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
will show the logs from the server and may help you debug any issues.
Development
If you are doing local development, there are two ways to test your changes:
- Run the MCP inspector to test your changes. See Debugging for run instructions.
- Test using the Claude desktop app. Add the following to your
claude_desktop_config.json
:
Available tools
git_status
Shows the working tree status
git_diff_unstaged
Shows changes in working directory not yet staged
git_diff_staged
Shows changes that are staged for commit
git_diff
Shows differences between branches or commits
git_commit
Records changes to the repository
git_add
Adds file contents to the staging area
git_reset
Unstages all staged changes
git_log
Shows the commit logs
git_create_branch
Creates a new branch
git_checkout
Switches branches
git_show
Shows the contents of a commit
git_init
Initializes a Git repository