mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-18 08:13:24 +02:00
mcp-git
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.
Available Tools
git_read_file: Read contents of a file at a specific Git referencegit_list_files: List all files in a repository or subdirectorygit_file_history: Get commit history for a specific filegit_commit: Create Git commits with messages and specified filesgit_search_code: Search repository content with pattern matchinggit_get_diff: View diffs between Git referencesgit_get_repo_structure: View repository file structuregit_list_repos: List available Git repositories
Installation
Using uv
When using uv no specific installation is needed. We will
use uvx to directly run mcp-git.
Using PIP
Alternatively you can install mcp-git via pip:
pip install mcp-git
After installation, you can run it as a script using:
python -m mcp_git
Configuration
Configure for Claude.app
Add to your Claude settings:
"mcpServers": {
"mcp-git": {
"command": "uvx",
"args": ["mcp-git", "--repository", "path/to/git/repo"]
}
}
Alternatively, if using pip installation:
"mcpServers": {
"mcp-git": {
"command": "python",
"args": ["-m", "mcp_git", "--repository", "path/to/git/repo"]
}
}
Configure for Zed
Add to your Zed settings.json:
"context_servers": [
"mcp-git": {
"command": "uvx",
"args": ["mcp-git"]
}
],
Alternatively, if using pip installation:
"context_servers": {
"mcp-git": {
"command": "python",
"args": ["-m", "mcp-git"]
}
},
Contributing
For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests welcome!