MCP Catalogs
Home

git-mcp-server

by cyanheads·215·Score 52

A comprehensive MCP server that provides AI agents with 28 Git operations including clone, commit, branch management, and more.

developer-toolsai-llmfile-system
52
Forks
8
Open issues
this month
Last commit
2d ago
Indexed

Overview

The git-mcp-server by cyanheads enables AI agents to interact with Git repositories through the Model Context Protocol. It offers a wide range of Git operations organized into seven categories: repository management, staging and commits, history and inspection, analysis, branching and merging, remote operations, and advanced workflows. The server supports both STDIO and HTTP transport modes with authentication options including JWT and OAuth. It's built with TypeScript using modern software architecture principles including dependency injection, pluggable storage backends, and comprehensive error handling.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:AI-assisted code review and commit management
you:Automated repository maintenance and version control
you:Integration of Git operations into AI agent workflows
you:Does this server support commit signing?
you:What authentication methods are supported?

When to choose this

Choose this when you need comprehensive Git operations through MCP for AI agents, especially when you're already working with TypeScript-based systems and need both STDIO and HTTP support.

When NOT to choose this

Avoid this if you need a pure JavaScript solution without TypeScript dependencies or require direct integration with specific Git providers beyond standard CLI.

Tools this server exposes

12 tools extracted from the README
  • git_init

    Initialize a new Git repository

  • git_clone

    Clone a repository from a remote URL

  • git_status

    Show working tree status

  • git_add

    Add file contents to the staging area

  • git_commit

    Record changes to the repository

  • git_log

    Show commit history

  • git_branch

    List, create, or delete branches

  • git_checkout

    Switch branches or restore working tree files

  • git_merge

    Join two or more development histories together

  • git_push

    Update remote refs with local commits

  • git_pull

    Fetch and integrate remote changes

  • git_diff

    Show changes between commits, commit and working tree, etc

Comparable tools

github-mcpgit-toolshell-mcpfilesystem-mcp

Installation

Installation

The git-mcp-server can be installed and run with either Node.js or Bun:

# Node.js
npx @cyanheads/git-mcp-server@latest

# Bun
bunx @cyanheads/git-mcp-server@latest
Claude Desktop Configuration

Add the following to your Claude Desktop config file (claude_desktop_config.json):

{
  "mcpServers": {
    "git-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["@cyanheads/git-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info",
        "GIT_BASE_DIR": "~/Developer/",
        "LOGS_DIR": "~/Developer/logs/git-mcp-server/",
        "GIT_USERNAME": "your-username",
        "GIT_EMAIL": "your-email",
        "GIT_SIGN_COMMITS": "true"
      }
    }
  }
}

For Bun users, replace the command with bunx.

FAQ

Does this server support commit signing?
Yes, GPG/SSH signing is enabled by default for commits, merges, rebases, cherry-picks, and tags. It falls back to unsigned on failure while providing signed/signingWarning fields in responses.
What authentication methods are supported?
The server supports three authentication modes: none (default), JWT, and OAuth. JWT and OAuth can be configured for authenticated deployments.

Compare git-mcp-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.