mcp-git - Git MCP Server
A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
MCP Server Usage
This package is designed to be used as an MCP server with clients like Claude Desktop. Here's how to configure it:
Basic Configuration
Add this to your MCP client configuration:
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "mcp-git"]
}
}
}
Advanced Configuration
For custom settings:
{
"mcpServers": {
"git": {
"command": "npx",
"args": ["-y", "mcp-git"]
}
}
}
Installation Options
From Source
- Clone this repository
- Install dependencies:
bun install - Build:
bun run build - Run:
bun run start
Available Git Tools
The server provides these MCP-accessible Git operations:
Repository Operations
git_status- Show working tree statusgit_init- Initialize new repositorygit_log- View commit history (withmax_countparameter)
Change Management
git_diff_unstaged- View unstaged changesgit_diff_staged- View staged changesgit_diff- Compare with branch/commitgit_add- Stage filesgit_reset- Unstage changesgit_commit- Create commit
Branch Operations
git_create_branch- Create new branchgit_checkout- Switch branches
Content Inspection
git_show- View commit contents
Development
Prerequisites
- Bun v1.2.8 or later
- Git installed system-wide
Building
bun run build
Testing
bun test
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss proposed changes.
License
Recommend MCP Servers 💡
github.com/mrexodia/user-feedback-mcp
Simple MCP Server to enable a human-in-the-loop workflow in tools like Cline and Cursor.
mcp-code-executor
An MCP server enabling Large Language Models to execute Python code within configurable environments (Conda, virtualenv, UV virtualenv), supporting incremental code generation and dynamic environment configuration.
mcp-typescribe
An MCP server implementation enabling LLMs to work with new APIs and frameworks
falahgs/image-gen3-google-mcp-server
A MCP server using Google's Imagen 3.0 via Gemini API for image generation, integrated with Claude Desktop.
mcp-shell
Give hands to AI. MCP server to run shell commands securely, auditably, and on demand.
enkryptai/enkryptai-mcp-server
Integrates red-teaming, prompt auditing, and AI safety analysis into MCP-compatible clients