git
A Model Context Protocol server for Git repository interaction and automation.
mcp-server-git is a Model Context Protocol server designed to facilitate interaction and automation with Git repositories using Large Language Models. It provides a suite of tools to read, search, and manipulate Git repositories, making it easier for developers to manage their codebases. The server is currently in early development, and its functionality is expected to evolve as it matures. Users can perform various Git operations such as checking the status of the working directory, viewing diffs, committing changes, and managing branches. The server can be installed using different methods, including UV and PIP, and is compatible with platforms like Claude Desktop, VS Code, and Zed. It also supports debugging and development features to assist users in troubleshooting and extending the server's capabilities.
Features
- Git repository interaction and automation
- Tools for reading, searching, and manipulating Git repositories
- Compatible with various platforms like Claude Desktop, VS Code, and Zed
- Supports debugging and development features
- Installation via UV and PIP
MCP Tools
- git_status: Shows the working tree status
- git_diff_unstaged: Shows changes in working directory 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
- git_checkout: Switches branches
- git_show: Shows the contents of a commit
- git_init: Initializes a Git repository
Usage with Different Platforms
claude_desktop
{'uvx': {'script': '\n"mcpServers": {\n "git": {\n "command": "uvx",\n "args": ["mcp-server-git", "--repository", "path/to/git/repo"]\n }\n}\n'}, 'docker': {'script': '\n"mcpServers": {\n "git": {\n "command": "docker",\n "args": ["run", "--rm", "-i", "--mount", "type=bind,src=/Users/username,dst=/Users/username", "mcp/git"]\n }\n}\n'}, 'pip': {'script': '\n"mcpServers": {\n "git": {\n "command": "python",\n "args": ["-m", "mcp_server_git", "--repository", "path/to/git/repo"]\n }\n}\n'}}
vs_code
{'uvx': {'script': '\n{\n "mcp": {\n "servers": {\n "git": {\n "command": "uvx",\n "args": ["mcp-server-git"]\n }\n }\n }\n}\n'}, 'docker': {'script': '\n{\n "mcp": {\n "servers": {\n "git": {\n "command": "docker",\n "args": [\n "run",\n "--rm",\n "-i",\n "--mount", "type=bind,src=${workspaceFolder},dst=/workspace",\n "mcp/git"\n ]\n }\n }\n }\n}\n'}}
zed
{'uvx': {'script': '\n"context_servers": [\n "mcp-server-git": {\n "command": {\n "path": "uvx",\n "args": ["mcp-server-git"]\n }\n }\n],\n'}, 'pip': {'script': '\n"context_servers": {\n "mcp-server-git": {\n "command": {\n "path": "python",\n "args": ["-m", "mcp_server_git"]\n }\n }\n},\n'}}