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.
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:
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 READMEgit_initInitialize a new Git repository
git_cloneClone a repository from a remote URL
git_statusShow working tree status
git_addAdd file contents to the staging area
git_commitRecord changes to the repository
git_logShow commit history
git_branchList, create, or delete branches
git_checkoutSwitch branches or restore working tree files
git_mergeJoin two or more development histories together
git_pushUpdate remote refs with local commits
git_pullFetch and integrate remote changes
git_diffShow changes between commits, commit and working tree, etc
Comparable tools
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@latestClaude 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
Last updated · Auto-generated from public README + GitHub signals.