mcp-git-server
Verified Safeby mvecchiett
Overview
Enables an LLM (like Claude Desktop) to securely interact with Git repositories through a set of MCP tools, automating local development workflows.
Installation
python git_server.pyEnvironment Variables
- GIT_ALLOWED_DIRS
- PYTHONIOENCODING
Security Notes
The server uses `subprocess.run` to execute native Git commands. Critical path validation is implemented using `os.path.abspath` and `os.path.commonpath` to restrict operations to explicitly allowed directories (`GIT_ALLOWED_DIRS`), preventing path traversal and unauthorized access. Explicitly closes stdin for subprocess calls to prevent hangs. No `eval` or obfuscation. Security relies heavily on correct `GIT_ALLOWED_DIRS` configuration and pre-configured system Git credentials for remote operations.
Similar Servers
claude-code-mcp
Acts as an MCP server to enable LLMs to run Claude Code CLI in one-shot mode, bypassing permissions for complex coding, file system, Git, and terminal operations.
git-mcp-server
A Model Context Protocol (MCP) server that provides Git-specific tools and resources for AI/LLM agents to interact with version control systems.
consult-llm-mcp
An MCP server that allows AI agents like Claude Code to consult stronger, more capable AI models (e.g., GPT-5.2, Gemini 3.0 Pro) for complex code analysis, debugging, and architectural advice.
dev-kit-mcp-server
A Model Context Protocol (MCP) server targeted for agent development tools, providing scoped authorized operations in the root project directory.