Kuan-Lun/git-mcp-server
3.2
If you are the rightful owner of git-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A minimal MCP server that provides Git command functionalities for LLM clients to interact with local repositories.
git-mcp-server
A minimal MCP (Model Context Protocol) server that exposes a few Git commands as tools, so LLM clients (e.g. ChatGPT, Claude, MCP Inspector) can inspect and commit changes in local repositories.
Features
git_status(repo_path=".")git_log(repo_path=".", n=5)git_diff(repo_path=".", staged=False)git_commit(repo_path, message)
Requirements
- Python 3.11+
- Git installed and available in
PATH mcpPython package
Installation
uv init git-mcp-server # or manually create a venv
uv add "mcp[cli]"
Or with pip:
pip install "mcp[cli]"
Usage
Development with MCP Inspector
mcp dev server.py
Then use MCP Inspector to invoke tools with a repo_path that points to an
existing Git repository.
Run as a plain MCP server
python server.py
Then configure your MCP-compatible client (e.g. ChatGPT, Claude Desktop) to launch the server with:
- Command:
python /absolute/path/to/server.py