MCP servers that can get a diff

4 verified servers expose a tool that can get the diff of a change

To review a change, an agent has to see what actually changed. Getting a diff returns the lines added and removed, for a commit, a comparison, or a pull request, so the model reviews the real change rather than a summary of it.

These verified servers let an agent get the diff of a change.

Top pick

Git

Anthropic (Model Context Protocol)

Official

Reference MCP server for local Git: status, diffs, commits, branches, and history on a repo path.

version-control86,565
Tool:
  • git_diff

git_diff shows the differences between two branches or commits in a local checkout, the plain-git way to see exactly what a change touched.

Pick 2

GitHub

GitHub

Official

GitHub's official remote MCP server for repos, issues, pull requests, Actions, and code search.

version-control30,334
Tool:
  • get_commit

GitHub's get_commit returns a single commit's details and its diff in one call, the read behind reviewing or explaining one commit.

Pick 3

Bitbucket

MatanYemini

Community

A maintained MCP server for Bitbucket Cloud and Server: browse repos, drive pull requests, comments, tasks, and pipelines.

version-control143
Tool:
  • getPullRequestDiff

getPullRequestDiff returns the full diff for a Bitbucket pull request, the whole change under review in one patch.

Pick 4

Gitea

Gitea

Official

Gitea's official MCP server for repos, branches, issues, pull request reviews, releases, Actions, and wikis on any Gitea instance.

version-control73
Tool:
  • get_pull_request_diff

get_pull_request_diff returns a PR's diff on a self-hosted Gitea instance, the same review read on a forge you run yourself.

What to know

A diff is the unit of code review: the exact additions and deletions an agent reads to judge a change, find a bug, or write a summary. What you diff differs by tool. Plain git compares two branches or commits. GitHub's get_commit returns one commit's details and its diff. Bitbucket and Gitea return the diff for a whole pull request, the full set of changes under review. The output is the same shape everywhere, a patch the model can read hunk by hunk, but the scope you ask for is yours to pick.

Reviewing a moving PR means the diff changes as commits land, so re-fetching is usually right. What an agent gains by remembering is its own prior read: the lines it already reviewed and the issues it raised, so a second pass focuses on what is new in the diff rather than re-reading every hunk from scratch.

Questions

Commit diff, branch diff, or PR diff?
All three, depending on the tool. git_diff compares branches or commits; GitHub's get_commit gives one commit's diff; Bitbucket and Gitea return a whole pull request's diff. Pick by the scope you want to review, a single commit, a branch comparison, or an entire PR.
What format does the diff come in?
A patch, the standard added-and-removed-lines format an agent can read hunk by hunk. That is what lets a model reason about a change line by line, to spot a bug, check a fix, or summarize what the change does.