Git MCP Server

by danyelkirsch

Not rated
GitHub

About

An MCP server for performing Git operations.

Details

Author
danyelkirsch
Categories
Developer Tools, Other

Setup

Install Git MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/danyelkirsch/git-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

A Model Context Protocol (MCP) server for Git operations that provides comprehensive Git functionality to MCP clients like Claude Desktop.

- Context-aware: Automatically detects the current project based on working directory
- Comprehensive Git operations: status, branches, diffs, logs, file contents, commits, and more
- Multi-project support: Works seamlessly across different project directories
- Error handling: Proper MCP error responses
- Branch management: Create, switch, and manage branches
- Remote operations: Push, pull, and fetch from remote repositories

Option 1: Global Installation (Recommended)

git clone https://github.com/yourusername/git-mcp-server.git cd git-mcp-server npm install

Add this server to your Claude Desktop configuration file:

macOS:~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:%APPDATA%\Claude\claude_desktop_config.json

{ "mcpServers": { "git": { "command": "git-mcp-server", "args": [] } } }

For other MCP clients, use the server binary directly:

The server will automatically use the current working directory as the Git repository context.

Once configured, you can use Git operations through your MCP client. The server automatically detects the Git repository in your current working directory.

Ask your MCP client (like Claude) to perform Git operations:

- "What's the current git status?"
- "Show me the diff with the main branch"
- "Create a new branch called feature/new-feature"
- "Commit these changes with message 'Fix bug in parser'"
- "Push the current branch to origin"

You can test the server manually from any Git repository:

cd /path/to/your/git/repo git-mcp-server

- git_status- Get current git status
- git_current_branch- Get current branch name
- git_staged_changes- Get staged changes
- git_working_directory- Get current working directory info

- git_diff- Show diff between branches/commits
- git_log- Get commit history
- git_show_file- Show file contents at specific commit

- git_branches- List all branches
- git_checkout- Switch to different branch or create new branch

- git_add- Add files to staging area
- git_commit- Create commits with message and files

- git_pull- Pull changes from remote repository
- git_fetch- Fetch changes from remote without merging

- git_init- Initialize a new git repository

- Node.js 18+
- npm or yarn
- Git installed on your system
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request

MIT License - seeLICENSEfile for details.

git-mcp-server/ ├── package.json # Project dependencies and scripts ├── tsconfig.json # TypeScript configuration ├── src/ │ └── index.ts # Main server implementation ├── build/ │ └── index.js # Compiled JavaScript (generated) └── README.md # This file

- npm run build- Build the TypeScript code
- npm run dev- Watch mode for development
- npm start- Run the built server

Gitee API integration, repository, issue, and pull request management, and more.

A CLI for interacting with GitKraken APIs. Includes an MCP server via gk mcp that not only wraps GitKraken APIs, but also Jira, GitHub, GitLab, and more.

A Claude Kubernetes MCP server, built in Go. The server integrates with ArgoCD, GitLab, Claude AI, and Kubernetes to enable advanced control and automation of Kubernetes environments.

Creates commit messages from staged files in a local git repository.

Perform Git operations on Azure DevOps repositories using a Personal Access Token (PAT).

Interact with Atlassian Bitbucket Cloud to manage repositories, pull requests, workspaces, and code.

An MCP server for interacting with the AtomGit API for version control and code hosting.

Access the Bitbucket Cloud API for automation, CI/CD pipelines, and integrations.

Manage Bitbucket repositories, pull requests, and pipelines via the Bitbucket API for both Cloud and Server.

Manage pull requests on Bitbucket Server.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.