Git
About
Integrates with Git repositories to enable version control operations and automation, supporting both shell-based commands and the go-git library for flexible implementation.
Details
- Author
- geropl
- Repository
- geropl/git-mcp-go
- GitHub stars
- 18
- Categories
- Developer Tools, Other, Productivity, Design, AI, Infrastructure
- Tags
- #integration
Jump to
This MCP server provides the following Git operations as tools:
- git_status: Shows the working tree status
- git_diff_unstaged: Shows changes in the working directory that are not yet staged
- git_diff_staged: Shows changes that are staged for commit
- git_diff: Shows differences between branches or commits
- git_commit: Records changes to the repository
- git_add: Adds file contents to the staging area
- git_reset: Unstages all staged changes
- git_log: Shows the commit logs
- git_create_branch: Creates a new branch from an optional base branch
- git_checkout: Switches branches
- git_show: Shows the contents of a commit
- git_init: Initialize a new Git repository
- git_push: Pushes local commits to a remote repository (requires --write-access flag)
- git_list_repositories: Lists all available Git repositories
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
GitCommand (node, npx, python, etc.)/path/to/git-mcp-goArguments-
Argument 1
serve -
Argument 2
-r=/path/to/repo1,/path/to/repo2 -
Argument 3
--mode -
Argument 4
shell
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
go install github.com/geropl/git-mcp-go@latest
The setup command sets up the Git MCP server for use with an AI assistant. It copies itself to ~/mcp-servers/git-mcp-go and modifies the tools config (cline: cline_mcp_settings.json) to use that binary.
The easiest way to install and register the Git MCP server with Cline is to use the setup command:
bash
./git-mcp-go setup -r /path/to/git/repository --tool=cline --auto-approve=allow-local-only
./git-mcp-go setup -r=/path/to/repo1,/path/to/repo2 --tool=cline --auto-approve=allow-local-only
rm -f ./git-mcp-go
The setup command will:
1. Copy the executable to the Cline MCP directory
2. Create a registration script that configures Cline to use the Git MCP server
Alternatively, you can manually add this to your claude_desktop_config.json:
json"mcpServers": {
"git": {
"command": "/path/to/git-mcp-go",
"args": ["serve", "-r=/path/to/repo1,/path/to/repo2", "--mode", "shell"]
}
}
json"mcpServers": {
"git": {
"command": "/path/to/git-mcp-go",
"args": ["serve", "-r", "/path/to/git/repository"]
}
}
```
git_status
Shows the working tree status.
git_diff_unstaged
Shows changes in the working directory that are not yet staged.
git_diff_staged
Shows changes that are staged for commit.
git_diff
Shows differences between branches or commits.
git_commit
Records changes to the repository.
git_add
Adds file contents to the staging area.
git_reset
Unstages all staged changes.
git_log
Shows the commit logs.
git_create_branch
Creates a new branch from an optional base branch.
git_checkout
Switches branches.
git_show
Shows the contents of a commit.
git_init
Initialize a new Git repository.
git_push
Pushes local commits to a remote repository (requires `--write-access` flag).
git_list_repositories
Lists all available Git repositories.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"git": {
"cwd": "optional",
"env": {},
"args": [
"serve",
"-r=/path/to/repo1,/path/to/repo2",
"--mode",
"shell"
],
"shell": false,
"command": "/path/to/git-mcp-go"
}
}
}
Linux
{
"cwd": "optional",
"env": [],
"args": [
"serve",
"-r=/path/to/repo1,/path/to/repo2",
"--mode",
"shell"
],
"shell": false,
"command": "/path/to/git-mcp-go"
}
Macos
{
"cwd": "optional",
"env": [],
"args": [
"serve",
"-r=/path/to/repo1,/path/to/repo2",
"--mode",
"shell"
],
"shell": false,
"command": "/path/to/git-mcp-go"
}
Windows
{
"cwd": "optional",
"env": [],
"args": [
"serve",
"-r=/path/to/repo1,/path/to/repo2",
"--mode",
"shell"
],
"shell": false,
"command": "/path/to/git-mcp-go"
}
Git MCP Server (Go)
A Model Context Protocol (MCP) server for Git repository interaction and automation, written in Go. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
Features
This MCP server provides the following Git operations as tools:
- git_status: Shows the working tree status
- git_diff_unstaged: Shows changes in the working directory that are not yet staged
- git_diff_staged: Shows changes that are staged for commit
- git_diff: Shows differences between branches or commits
- git_commit: Records changes to the repository
- git_add: Adds file contents to the staging area
- git_reset: Unstages all staged changes
- git_log: Shows the commit logs
- git_create_branch: Creates a new branch from an optional base branch
- git_checkout: Switches branches
- git_show: Shows the contents of a commit
- git_init: Initialize a new Git repository
- git_push: Pushes local commits to a remote repository (requires --write-access flag)
- git_list_repositories: Lists all available Git repositories
Installation
Prerequisites
- Go 1.18 or higher
- Git installed on your system
Download Prebuilt Binaries
You can download prebuilt binaries for your platform from the GitHub Releases page.
Building from Source
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





