MCP server for git operations over stdio
Find a file
Simon Cornet 0d8690a130
All checks were successful
ci/woodpecker/push/lint-test-release Pipeline was successful
refactor: replace hardcoded base dir with pwd-based path resolution
repo_path now resolves against current working directory instead of
~/Documents/siempie/. Absolute paths also supported. Clone destination
uses pwd instead of hardcoded siempie path.
2026-06-03 10:00:34 +02:00
.woodpecker ci(woodpecker): merge pipelines and add gitleaks as dependency for lint/test/release 2026-06-01 16:31:58 +02:00
.gitignore chore: add gitignore for binary 2026-06-01 17:29:24 +02:00
.goreleaser.yaml refactor: safe type assertions, configurable TRUSTED_BASE_DIR, array git_add, askpass clone, strip goreleaser 2026-06-03 09:15:38 +02:00
.markdownlint-cli2.jsonc docs: add readme and markdownlint config 2026-06-01 17:00:36 +02:00
git.go refactor: replace hardcoded base dir with pwd-based path resolution 2026-06-03 10:00:34 +02:00
go.mod chore(package): update module github.com/mark3labs/mcp-go to v0.54.1 2026-06-01 14:35:36 +00:00
go.sum refactor: safe type assertions, configurable TRUSTED_BASE_DIR, array git_add, askpass clone, strip goreleaser 2026-06-03 09:15:38 +02:00
main.go refactor: safe type assertions, configurable TRUSTED_BASE_DIR, array git_add, askpass clone, strip goreleaser 2026-06-03 09:15:38 +02:00
readme.md refactor: replace hardcoded base dir with pwd-based path resolution 2026-06-03 10:00:34 +02:00
renovate.json ci: add renovate config 2026-06-01 16:32:50 +02:00
tools.go refactor: replace hardcoded base dir with pwd-based path resolution 2026-06-03 10:00:34 +02:00

mcp-git

MCP server for git operations over stdio, scoped to current working directory.

Tools

Tool Description
git_clone Clone a repo using token auth
git_status Show working tree status
git_add Stage files for commit
git_commit Create a conventional commit
git_push Push to origin/main
git_pull Pull from origin/main
git_log Show recent commit history
git_diff Show working tree or staged diff
git_branch List or create branches
git_checkout Switch branches

Build

go build -o mcp-git .

Usage

Add to your MCP client config:

{
  "mcpServers": {
    "mcp-git": {
      "command": "/path/to/mcp-git"
    }
  }
}

The server communicates over stdio using the MCP protocol. All repo paths are resolved relative to the current working directory, or as absolute paths.