Back to Home
mvecchiett icon

mcp-git-server

Verified Safe

by 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

Run Command
python git_server.py

Environment 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

Stats

Interest Score0
Security Score8
Cost ClassMedium
Avg Tokens500
Stars0
Forks0
Last Update2025-11-23

Tags

GitLLMMCPDevelopmentSecurityAgent