Git for coding

Pick 3 of 3 for codingOfficialAnthropic (Model Context Protocol)86,565

For a coding setup, the reference Git server is the third of three picks, and it covers the local history layer the other two do not. This Anthropic reference server operates on the working tree, so an agent stages changes and writes proper commits instead of leaving a dirty checkout for a human to tidy up.

It ranks third because the other picks cover facts and collaboration, but its job is essential. Without it, a coding agent produces changes that never become clean, attributable commits.

How Git fits

git_status shows the working tree, git_diff_unstaged and git_diff_staged show what changed before and after staging, and git_diff compares branches or commits. git_add stages files, git_commit records them with a message, and git_reset unstages when the agent changes course. git_create_branch and git_checkout isolate work on a branch, git_log and git_show read history, and git_branch lists branches. That set lets an agent turn its edits into a tidy, reviewable commit history on the local repo.

The siblings cover the parts Git does not. Context7 supplies version-accurate library documentation so the agent codes against the real API, and GitHub adds the hosted layer, searching code across repositories and managing issues and pull requests. Git itself does not fetch docs or touch the remote; it works on the checkout in front of it. Compose the three as retrieval for facts, Git for local history, and GitHub for collaboration.

Tools you would use

ToolWhat it does
git_statusShows the working tree status.
git_diff_unstagedShows changes in the working directory not yet staged.
git_diff_stagedShows changes that are staged for commit.
git_diffShows differences between branches or commits.
git_commitRecords staged changes to the repository with a message.
git_addAdds file contents to the staging area.
git_resetUnstages all staged changes.
git_logShows the commit logs with optional date filtering.
git_create_branchCreates a new branch from an optional base.
git_checkoutSwitches to the given branch.
Full Git setup and config →

FAQ

What does the Git server add over GitHub's server?
The local side. GitHub operates on the hosted platform, issues, pull requests, remote files, while the Git server works on the checkout on disk: git_status, git_add, git_commit, git_diff, and branch tools. It is how an agent writes clean local commits.
Can the Git server push to a remote?
Its tools operate on the local repository, status, diffs, commits, branches, and history, rather than pushing to a hosted remote. For remote operations like pull requests and code search across GitHub, pair it with the GitHub server, which covers the hosted layer.