Eight tools that follow a look, change, share loop.
MCP Git gives your agent eight tools that follow a simple loop: look at the checkout, change it, share the result. Every tool uses a strict schema, so an argument it does not define fails the call instead of being ignored.
See the checkout without changing it.
| Tool | Source | Use it to | Parameters |
|---|---|---|---|
git_inspect | MAIT | See the branch, how far it is ahead of or behind its upstream, and the staged and unstaged paths. Ask for the diff to also get size-limited line-level changes in place of the simple clean flag. | with_diff (optional, default false) |
git_log | MAIT | Page through a branch's history, or read one commit in full. | branch, max_count, offset, commit_id (all optional) |
git_diff | MAIT | Compare two refs with size-limited output. By default it covers a limited number of files, lines and bytes, and it marks the result as truncated so you know when something was left out. | from (required), to (required), max_files (default 50), max_lines (default 2,000), max_bytes (default 65,536) |
Why: read first, and read the structured fields. To list the files in a commit, call git_diff with the commit and its parent.
Branch, commit and manage repositories.
| Tool | Source | Use it to | Parameters |
|---|---|---|---|
git_branch | MAIT | List branches, create one or check one out. Creating works only from the develop branch, and a checkout needs a clean working tree. | action (required), name |
git_repo | MAIT | Clone a repository, start a new one, or manage submodules. A clone or init does not move the running service into the new folder. | action (required), url, path, ref, name |
git_commit | MAIT | Stage the paths you name and commit them in one call. The subject must follow the conventional commit format; during a rebase it only stages. | subject (required), bullets, patterns |
Why: git_commit records the whole staged snapshot, including anything already staged, so review first. A rejected message can leave the staging changed. Worktree actions are not offered.
A manual the agent can fetch.
git_manual is a prompt, not a tool. Fetch it with prompts/get. It returns one message with every tool's arguments, the standard workflows and the operating rules, such as inspecting before changing and fetching before a rebase. It teaches the agent; it adds no enforcement.
What to expect when a call fails.
A refusal can arrive as a tool error, or as a successful result with type: "error"; an agent checks both. The limits that matter:
| Limit | Value |
|---|---|
| Calls | git_repo capacity 5, refill 5/min; other tools capacity 30, refill 30/min; shared by clients |
| One call | 60-second response deadline including queues; active work retains capacity and exclusive write access until completion |
| Execution capacity | Four calls; reads also wait when these slots are occupied |
| Checkout | One per server: every client shares it, and writes run one at a time |
| Protected branches | Pushes to main, master and develop are refused; there is no force push |
| Diff | 50 files, 2,000 lines and 65,536 line-content bytes returned by default; oversized collections and results are refused |
Zero ahead and behind counts do not prove a branch is published. See Troubleshooting for every refusal and its fix.