Skip to main content
mcpFirst-partyLow risk Safety Privacy
Anthropic logo

Git MCP Server for Claude

Official MCP server providing Git repository tools for reading, searching, and manipulating Git repositories

HarnessClaude CodeCodexCursorClaude Desktop

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://github.com/modelcontextprotocol/servers/blob/main/src/git/README.md, https://github.com/JSONbored/awesome-claude/blob/main/content/mcp/git-mcp-server.mdx
Brand
Anthropic
Brand domain
anthropic.com
Brand asset source
brandfetch
Package URL
/downloads/mcp/git-mcp-server.mcpb
Package SHA256
f7f4ab253a6a32a2cb2d8b024239dd024523ebd49047d08b8693df98cf83d0eb
Safety notes
Restrict access to intended repositories and review write operations because commands can alter branches, commits, and working trees.
Privacy notes
Source code, commit history, author metadata, file paths, and repository configuration may be sent through tool calls.
Author
Anthropic
Claim status
unclaimed
Last verified
2025-09-16

Decision playbook

Ready to evaluate for your workflow

Signals are comparatively strong, but you should still validate source, privacy posture, and package provenance for your environment.

Compare context
Selected

0

Current score

96

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as first-party.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Complete

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    Package marked verified.

    Done
  • Checksum metadata

    SHA-256 hash is present.

    Done

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Package install

Copy-ready — paste the snippet to get started.

3 minutes

Install command

Provided

Config snippet

Provided

Copy snippet

Provided

Prerequisites

10 to clear

Platforms

4 listed

Difficulty

0/100

Adoption plan

Balanced adoption plan

Current risk score 0/100. Use staged verification before broader rollout.

Risk 0

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    Package verification/checksum metadata is available.

    Done

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (6/6 signals complete).

Risk 0

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Present

Package integrity metadata is present.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

6/6 steps complete with no blocking gaps for this preset.

Risk 0

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is available.

Done

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

10 prerequisites to line up before setup.

0/10 ready
Install & runtime2Configuration1Permissions & scopes1Network & hosting2General43 minutes

Safety & privacy surface

Safety & privacy surface

1 safety and 1 privacy notes across 2 risk areas.

2 areas
  • SafetyExecution & processesRestrict access to intended repositories and review write operations because commands can alter branches, commits, and working trees.
  • PrivacyLocal filesSource code, commit history, author metadata, file paths, and repository configuration may be sent through tool calls.

Safety notes

  • Restrict access to intended repositories and review write operations because commands can alter branches, commits, and working trees.

Privacy notes

  • Source code, commit history, author metadata, file paths, and repository configuration may be sent through tool calls.

Prerequisites

  • Git installed (verify with: git --version, install via sudo apt install git (Linux) or brew install git (macOS))
  • Node.js and npx available (comes with Node.js, verify with: npx --version)
  • Local Git repository (server works with local repositories only, navigate to repository root directory)
  • File system read permissions for repository directory (check with ls -l or icacls)
  • Understanding of Git concepts (branches, commits, tags, repository structure)
  • Claude Desktop 0.7.0+ or Claude Code with MCP support
  • Understanding that server is read-only (safe exploration without making changes to repository)
  • Platform: macOS, Windows, or Linux (cross-platform support)
  • Ability to create and edit JSON configuration files (.mcp.json or claude_desktop_config.json)
  • Understanding of repository root directory (must be in repository root for MCP server to work)

Schema details

Install type
package
Reading time
1 min
Difficulty score
0
Troubleshooting
Yes
Breaking changes
No
Package metadata
Package verified
Yes
SHA-256
f7f4ab253a6a32a2cb2d8b024239dd024523ebd49047d08b8693df98cf83d0eb
Skill and platform metadata
Retrieval sources
https://github.com/modelcontextprotocol/servers/blob/main/src/git/README.mdhttps://modelcontextprotocol.io/introduction
Collection metadata
Estimated setup
3 minutes
Difficulty
beginner
Full copyable content
{
  "git": {
    "args": [
      "-y",
      "@modelcontextprotocol/server-git"
    ],
    "command": "npx"
  }
}

About this resource

Content

Empower Claude to explore and analyze your Git repositories safely with read-only access. The official Git MCP Server from Anthropic enables natural language queries to browse commit history, search code changes, compare branches, examine file evolution, and understand repository structure—all without making any modifications to your codebase.

Features

  • Access commit history, branch information, and repository status
  • Read files from any commit, branch, or tag
  • Search through commit messages, file contents, and repository structure
  • Compare changes between commits, branches, and files
  • Work with different branches and track changes
  • Safe exploration without making changes
  • Advanced Git repository management with branch operations, commit history analysis, and merge conflict resolution
  • Batch operations support for efficient bulk repository operations, file staging, and commit management with automatic error handling
  • Real-time repository monitoring capabilities with change detection support for tracking commits and triggering automated workflows

Use Cases

  • Analyze commit patterns and development history
  • Understand code evolution over time
  • Examine specific commits and their changes
  • Compare different versions of files
  • Search for commits mentioning specific topics
  • Generate repository documentation
  • Build automated version control workflows that sync external systems with Git repositories for real-time code management and collaboration

Installation

Claude Code

  1. Create a .mcp.json file in your project root directory (must be in Git repository root)
  2. Add the Git server configuration with npx command and @modelcontextprotocol/server-git package
  3. Verify installation: claude mcp list
  4. Test connection: claude mcp status git

Claude Desktop

  1. Open your Claude Desktop configuration file (see configPath below)
  2. Add the Git MCP server configuration with npx command and @modelcontextprotocol/server-git package
  3. Restart Claude Desktop
  4. Navigate to a Git repository root directory and ask Claude about recent commit history to verify connection

Requirements

  • Git installed (verify with: git --version, install via sudo apt install git (Linux) or brew install git (macOS))
  • Node.js and npx available (comes with Node.js, verify with: npx --version)
  • Local Git repository (server works with local repositories only, navigate to repository root directory)
  • File system read permissions for repository directory (check with ls -l or icacls)
  • Understanding of Git concepts (branches, commits, tags, repository structure)
  • Claude Desktop 0.7.0+ or Claude Code with MCP support
  • Understanding that server is read-only (safe exploration without making changes to repository)
  • Platform: macOS, Windows, or Linux (cross-platform support)
  • Ability to create and edit JSON configuration files (.mcp.json or claude_desktop_config.json)
  • Understanding of repository root directory (must be in repository root for MCP server to work)

Configuration

{
  "git": {
    "args": ["-y", "@modelcontextprotocol/server-git"],
    "command": "npx"
  }
}

Examples

Show me the recent commit history

Common usage pattern for this MCP server

Ask Claude: "Show me the recent commit history"

What branches exist in this repository?

Common usage pattern for this MCP server

Ask Claude: "What branches exist in this repository?"

Find commits mentioning bug fix

Common usage pattern for this MCP server

Ask Claude: "Find commits mentioning bug fix"

What changed in the last 5 commits?

Common usage pattern for this MCP server

Ask Claude: "What changed in the last 5 commits?"

Compare this file between two commits

Common usage pattern for this MCP server

Ask Claude: "Compare this file between two commits"

Create Commit with Message

Stage files and create a commit with a descriptive message

// Create Git commit
await git.add({
  files: ["src/components/Button.tsx", "src/utils/helpers.ts"],
});
const commit = await git.commit({
  message: "feat: Add new Button component",
  author: "Claude <claude@example.com>",
});

Security

  • Read-only access to repositories
  • Works with local Git repositories only
  • No remote operations performed
  • Safe exploration without making changes
  • Respects existing file permissions
  • Git repository access grants code modification capabilities - ensure Git MCP server is configured with restricted repository paths and never granted access to sensitive repositories
  • Git credentials and SSH keys must be securely stored and never exposed in client-side code or public repositories - use environment variables and secure credential management
  • Git commit history and repository structure may expose code architecture and development patterns - ensure Git resource identifiers are kept private and not shared in public configurations
  • Rate limiting and resource management are critical for Git MCP servers - implement proper error handling, retry logic, and resource monitoring to prevent repository corruption
  • Git operations execute with user privileges and could potentially modify or delete code - review server configuration and restrict access to specific repositories only

Troubleshooting

Not a Git repository error when accessing features

Navigate to Git repository root directory before using MCP server. Run git status locally to verify directory is initialized. Initialize repository with git init if needed.

Permission denied accessing repository files

Run ls -l (Unix) or icacls (Windows) on repository directory to check user has read permissions. Verify MCP server process user matches repository owner. Add user to appropriate group if needed: sudo usermod -a -G groupname username.

Git command not found or unavailable error

Install Git: sudo apt install git (Linux) or brew install git (macOS) or download from https://git-scm.com/downloads (Windows). Verify installation: git --version. Ensure Git binary is in system PATH environment variable.

Cannot read commits or repository history

Verify .git directory exists and isn't corrupted. Check repository permissions allow read access. Run git fsck to check repository integrity. Clone fresh copy if repository is corrupted.

Git MCP server authentication errors with credentials

Verify Git credentials are valid. Check SSH key permissions (should be 600). Ensure credential helper is configured correctly. For HTTPS, verify username and password/token are correct.

Git operations failing with permission errors

Verify repository permissions allow read/write access. Check file system permissions for .git directory. Ensure user has necessary Git repository permissions. For remote operations, verify SSH key or credentials are authorized.

Git MCP server connection timeouts or network errors

Check network connectivity to Git remote. Verify SSH connectivity for remote repositories. Increase request timeout values. Implement connection pooling and retry mechanisms with exponential backoff.

Git merge conflicts or branch operation failures

Check for uncommitted changes before merge operations. Verify branch exists and is accessible. Resolve merge conflicts manually if needed. Ensure working directory is clean before branch operations.

Source citations

Add this badge to your README

Show that Git MCP Server for Claude is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/git-mcp-server.svg)](https://heyclau.de/entry/mcp/git-mcp-server)

How it compares

Git MCP Server for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

1 trust signal differ across this comparison (Source provenance).

Field

Official MCP server providing Git repository tools for reading, searching, and manipulating Git repositories

Open dossier

Official MCP server providing secure file system operations for Claude Desktop and Claude Code

Open dossier

Official MCP server providing read-only access to PostgreSQL databases with schema inspection and query capabilities

Open dossier

Analyze, troubleshoot, and optimize Plaid integrations for banking data and financial account linking

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage verifiedPackage verifiedPackage verifiedPackage verified
Source provenanceDiffersSource-backedNo submission linkNo submission linkNo submission link
Submitter
Install riskLow riskLow riskLow riskLow risk
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
BrandAnthropic logoAnthropicAnthropic logoAnthropicAnthropic logoAnthropicPlaid logoPlaid
Categorymcpmcpmcpmcp
Sourcefirst-partyfirst-partyfirst-partyfirst-party
AuthorAnthropicAnthropicAnthropicPlaid
Added2025-09-162025-09-152025-09-162025-09-18
Platforms
Claude CodeCodexCursorClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Claude CodeClaude Desktop
Source repo
Safety notesRestrict access to intended repositories and review write operations because commands can alter branches, commits, and working trees.Limit allowed roots to the specific folders Claude needs because file operations can read, write, overwrite, or delete local data.Use a read-only database user with restricted schemas unless write access is explicitly needed and reviewed.Use sandbox or restricted Plaid credentials and avoid exposing production banking tokens outside the required workflow.
Privacy notesSource code, commit history, author metadata, file paths, and repository configuration may be sent through tool calls.Local file contents, filenames, directory structure, and system paths may be sent through the MCP client and model context.Queried schemas, table names, rows, connection details, and application data may be exposed through tool calls.Account-linking data, balances, transactions, institution identifiers, and financial metadata may be sent through model context.
Prerequisites
  • Git installed (verify with: git --version, install via sudo apt install git (Linux) or brew install git (macOS))
  • Node.js and npx available (comes with Node.js, verify with: npx --version)
  • Local Git repository (server works with local repositories only, navigate to repository root directory)
  • File system read permissions for repository directory (check with ls -l or icacls)
  • Node.js 14 or higher installed (verify with: node --version)
  • npx available (comes with Node.js, verify with: npx --version)
  • File system read/write permissions for directories you want to access
  • Understanding of absolute vs relative paths (must use absolute paths in configuration for security)
  • PostgreSQL database (local or remote PostgreSQL server)
  • PostgreSQL connection string (PostgreSQL connection URI with user, password, host, port, and database format)
  • Node.js and npx (for running @modelcontextprotocol/server-postgres package)
  • Network access (if connecting to remote PostgreSQL server)
  • Plaid account (create account on Plaid Dashboard to get API credentials)
  • API credentials (client_id and secret from Plaid Dashboard)
  • SSE or HTTP transport support (remote MCP server at https://api.dashboard.plaid.com/mcp/sse or https://api.dashboard.plaid.com/mcp)
  • Internet connection (remote Plaid API access required)
Install
claude mcp list && claude mcp status git
claude mcp list && claude mcp status filesystem
claude mcp list && claude mcp status postgres
claude mcp list && claude mcp status plaid
Config
{
  "mcpServers": {
    "git": {
      "args": [
        "-y",
        "@modelcontextprotocol/server-git"
      ],
      "command": "npx",
      "type": "stdio"
    }
  }
}
Manual-only setup:
{
  "filesystem": {
    "args": [
      "-y",
      "@modelcontextprotocol/server-filesystem",
      "/path/to/allowed/directory"
    ],
    "command": "npx"
  }
}
Manual-only setup:
{
  "postgres": {
    "args": [
      "-y",
      "@modelcontextprotocol/server-postgres",
      "postgresql://localhost/mydb"
    ],
    "command": "npx"
  }
}
{
  "mcpServers": {
    "plaid": {
      "url": "https://api.dashboard.plaid.com/mcp/sse",
      "type": "sse"
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.