scaleup-trading/git-server
If you are the rightful owner of git-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 henry@mcphub.com.
A modular, efficient MCP server providing Git repository context to Claude Desktop with support for multiple repositories, workspaces, and intelligent file tracking.
Multi-Repository Git MCP Server
A modular, efficient MCP (Model Context Protocol) server that provides Git repository context to Claude Desktop with support for multiple repositories, workspaces, and intelligent file tracking.
š License
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0). You are free to use, copy, modify, and share this software for personal, non-commercial purposes, provided you give appropriate credit to the original author. Commercial use, including selling the software or using it in commercial services, is prohibited without explicit permission from the author. See the file or https://creativecommons.org/licenses/by-nc/4.0/ for full details.
Usage Terms
- Personal Use: You can use, modify, and share the software for personal projects, research, or non-commercial purposes.
- Attribution: You must include the original copyright notice, a link to the license, and indicate if changes were made.
- No Commercial Use: You may not use this software for commercial purposes, such as selling it, offering it as part of a commercial service, or using it in a business to generate revenue, without permission from the author.
- Contact for Commercial Use: If you wish to use this software commercially, please contact @shishir-bondre for licensing arrangements.
šÆ Key Features
- Multi-Repository Support: Dynamically switch between multiple git repositories
- Workspace Management: Create curated file sets for focused work
- Intelligent File Tracking: Persistent state with efficient diff-based updates
- Flexible Update Modes: Control how file changes are communicated to Claude
- Smart File Filtering: Respects .gitignore, .dockerignore, and .mcpignore patterns
- Token Efficiency: Only send what's needed when it's needed
š Modular Architecture
The server is organized into focused modules for better maintainability:
git-mcp-server/
āāā src/ # Source code
ā āāā git_mcp_server.py # Main server orchestration
ā āāā core/ # Core functionality
ā ā āāā file_manager.py # File operations and ignore patterns
ā ā āāā state_manager.py # Persistent state management
ā ā āāā diff_processor.py # Content diffing and update modes
ā ā āāā workspace_manager.py # Workspace creation and management
ā ā āāā git_operations.py # Git-specific operations
ā ā āāā repository_manager.py # Multi-repository management
āāā scripts/ # Build and run scripts
ā āāā run_docker_mcp.sh # Docker wrapper script
ā āāā build.sh # Build Docker image
ā āāā setup.sh # One-command setup
ā āāā test_mcp.sh # Test script
āāā config/ # Configuration files
ā āāā .mcpignore.example # Example ignore patterns
āāā tests/ # Unit and integration tests
ā āāā test_core.py # Core functionality tests
āāā docs/ # Documentation
ā āāā installation.md # Installation guide
ā āāā usage.md # Usage examples and update modes
ā āāā api.md # API/tool reference
āāā Dockerfile # Docker container configuration
āāā requirements.txt # Python dependencies
āāā LICENSE # Creative Commons Attribution-NonCommercial 4.0 License
āāā README.md # Project overview
Module Responsibilities
git_mcp_server.py
: Main MCP server, handles protocol and tool routingfile_manager.py
: File I/O, ignore patterns, file discovery and filteringstate_manager.py
: Persistent state storage for files and workspacesdiff_processor.py
: Content diffing with multiple update modesworkspace_manager.py
: Workspace creation, loading, and managementgit_operations.py
: Git status, commit history, branch inforepository_manager.py
: Multi-repo discovery and switching
š Getting Started
See for detailed setup instructions, including cloning the repository, installing dependencies, and running with Docker.
šļø Usage and Tools
Refer to for usage examples, workflows, and update modes, and for a complete list of available tools and resources.
š§ Configuration
Custom Ignore Patterns
Create a .mcpignore
file in your repository root to define custom ignore patterns. Use as a template:
# Custom MCP ignores
build/
dist/
*.log
*.tmp
docs/generated/
coverage/
Directory Structure
/Users/john/Projects/ # Base directory
āāā api-server/ # Git repo 1
āāā web-app/ # Git repo 2
āāā mobile-app/ # Git repo 3
āāā docs-site/ # Git repo 4
šļø Build & Deploy
See for instructions on building the Docker image and deploying the server.
šÆ Benefits
For Token Efficiency
- Workspace-based: Only load files you're actively working on
- Diff-based updates: Send only changes, not entire files
- Smart filtering: Automatic ignore pattern respect
- Persistent state: Remember what Claude has seen
For Developer Experience
- Multi-repo support: Switch between projects seamlessly
- Flexible updates: Choose how changes are communicated
- Focused workspaces: Create context for specific tasks
- Persistent across sessions: State survives Docker restarts
For Code Quality
- Modular architecture: Easy to understand and maintain
- Comprehensive logging: Debug issues easily
- Error handling: Graceful failure recovery
- Type hints: Better code documentation
This modular architecture makes the codebase much more maintainable while providing powerful features for efficient repository management! š