Git logo

Git

Analyze local Git repositories through MCP tools for history, diffs, blame, statistics, and branch status.

Install Git

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for git, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

The git MCP server exposes local Git repository analysis through tools for history, diffs, blame, statistics, and branches. It runs native Git commands through a Node.js MCP process, so it does not require the GitHub API. Provide an absolute repository path to most operations, then use filters or refs to narrow results. Reach for it when an agent needs repository context such as change history, line ownership, branch divergence, or activity patterns.

Use cases

  • Inspect commit history for a file or contributor
  • Compare branches, tags, or commits
  • Trace line ownership with blame data
  • Summarize repository activity and changed files
  • Check branch divergence and merge status

Key features

  • Filtered Git log queries
  • Structured diffs between refs
  • Line-level blame analysis
  • Repository activity statistics
  • Branch status and merge filters

Tools5

What Git lets your agent do. Expand a tool for its parameters.

Self-reported~101 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

Last commit7mo agoMost recent push to the default branch.
Tools exposed5Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Git works

What git MCP server does

The git MCP server gives AI agents structured access to analysis of local Git repositories. It covers five common inspection tasks: commit history, comparisons between Git references, line-level authorship, repository activity statistics, and branch status. The tools operate on repositories available on the machine running the MCP process rather than on a hosted Git service.

Use git_log to inspect commits and optionally filter them by author, date range, or file path. git_diff compares two commits, branches, or tags and can return either change details or a summary of the change statistics. git_blame reports the commit and author associated with each line, including an optional line range or historical reference.

git_stats summarizes repository activity, including commit and contributor information, activity over time, and frequently changed files. git_branch reports branch information such as the latest commit, ahead or behind counts, and merge status. It can also include remote-tracking branches.

How it works

The git MCP server uses native Git commands and communicates with an MCP client over its configured process. Each request supplies a repository location, and the server performs the corresponding Git inspection operation there. Most tools require repoPath as an absolute path; git_blame additionally requires a file path relative to the repository root.

The tools provide defaults for common queries. Log requests return 20 commits unless another count is supplied. Diffs compare HEAD~1 with HEAD by default. Statistics list 10 top contributors and 10 most-changed files by default. Branch comparisons use main or master as the default base when available.

Setup and configuration

Running this git MCP server requires Node.js 18 or newer and Git installed and available through PATH. From the repository checkout, install dependencies and build the project:

Terminal
npm install
npm run build

Register the generated Node.js entry point in the MCP client configuration. The command uses the built dist/index.js file, with its path changed to match the local checkout:

config.json
{
  "mcpServers": {
    "git-tools": {
      "command": "node",
      "args": ["/path/to/mcp-git-tools/dist/index.js"]
    }
  }
}

Tools and capabilities

  • git_log: returns commit history with author, date, count, and path filters.
  • git_diff: compares refs, optionally limits the comparison to a path, and supports summary-only output.
  • git_blame: returns line-by-line authorship for a file, a selected range, or a specified ref.
  • git_stats: reports commits, contributors, activity over time, and commonly changed files.
  • git_branch: lists branches with last-commit details, ahead or behind counts, and merged or unmerged filtering.

Limitations and notes

The git MCP server analyzes local repositories and does not require the GitHub API. The provided tools are for repository inspection; the material does not describe commands for editing files, creating commits, switching branches, or pushing changes. Repository paths must be accessible to the host process, and Git must be installed correctly for requests to work.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Git

git is an MCP server that connects AI agents to local Git repositories through native Git commands. Its main tools retrieve commit logs, compare refs with diffs, inspect line authorship with blame, summarize repository statistics, and analyze branch status without requiring the GitHub API.

Install it by using Node.js 18 or newer, ensuring Git is available in PATH, then run npm install and npm run build in the repository. Add the resulting dist/index.js file as the node command in your MCP client configuration.

It analyzes local Git repositories that are accessible to the process running the server. Most tools require an absolute repoPath, while git_blame takes a filePath relative to the repository root. The server does not require the GitHub API.

No modification capability is described.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGit AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/git-2?style=directory)](https://allmcps.com/mcp/git-2)
HTML Embed
<a href="https://allmcps.com/mcp/git-2"><img src="https://allmcps.com/api/badge/git-2?style=directory" alt="Git on AllMCPs" /></a>