Local Git MCP Server
Overview
Local Git MCP Server is a Python-based server that allows users to manage local Git repositories using the Message-based Communication Protocol (MCP).
To use the Local Git MCP Server, run the server with the command: python git_server.py [--repositories-dir ./repositories] to specify the directory for your repositories.
- Create and manage local Git repositories - Validate repository names - Perform essential Git operations such as creating repositories, adding files, committing changes, pulling, pushing, and generating diffs.
- Managing multiple local Git repositories for development projects.
- Facilitating collaboration among team members by providing a centralized Git server.
- Automating Git operations in a controlled environment.
Add to your AI client
Use these steps to connect Local Git MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"local-git-mcp-server-okdshin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"local-git-mcp-server-okdshin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"local-git-mcp-server-okdshin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"local-git-mcp-server-okdshin": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"local-git-mcp-server-okdshin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"local-git-mcp-server-okdshin": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-local-git-mcp-server-okdshin"
]
}
}
}FAQ
What programming language is used for Local Git MCP Server?
The server is built using Python.
Can I customize the repository directory?
Yes! You can specify the repository directory when starting the server.
What dependencies are required to run the server?
The server requires GitPython, Pydantic, MCP Server, Black, and isort.