mcp-git
MCP server that lets LLMs explore Git repositories — commit history, diffs, branches, and search. Single binary, read-only.
Install
Usage
# Current directory
# Specific repo
# Multiple repos
# Custom limits
Configuration
Claude Code
Claude Desktop
Cursor / VS Code
Tools
| Tool | Description |
|---|---|
list_repos |
Show all connected repositories with current branch |
log |
Show commit history with author, date, and message |
diff |
Show changes between two refs (commits, branches, tags) |
show_commit |
Show details of a specific commit |
list_branches |
List local and remote branches |
search_commits |
Search commit messages for a query string |
All tools accept an optional repo parameter when multiple repositories are connected.
CLI Options
| Flag | Default | Description |
|---|---|---|
--repo |
. |
Path to a Git repository (repeatable) |
--max-diff-lines |
500 |
Maximum diff output lines |
--max-log-entries |
50 |
Maximum log entries returned |
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.