# git-courer [Health: Active]

**Category:** 🔄 Version Control  
**Repository:** https://github.com/Alejandro-M-P/git-courer  
**GitHub Stars:** 46  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/git-courer

## Description
Full git MCP server for LLM agents — 17 tools, AST annotator, auto-backups, real plumbing.

## Tools
Capabilities this server exposes over MCP:

- **status** — Full repo state: branch, changes, conflicts, stash, etc.
- **diff** — Diff with AST tags (`NEW_FUNC`, `MOD_SIG`, `DEPS`, `DEL`)
- **commit** — 3-phase LLM pipeline: preview, review, apply
- **branch** — Branch management
- **stage** — Staging area control
- **stash** — Stash management
- **history** — History inspection
- **sync** — Remote sync
- **pr-review** — Tests + conflicts + diff stats + divergence in one call
- **backup** — Undo amend/merge/rebase
- **rewrite** — History rewriting
- **integrate** — Branch integration
- **session** — Isolated worktree lifecycle

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/Alejandro-M-P/git-courer), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://raw.githubusercontent.com/blak0p/git-courer/main/scripts/install.sh | sh
```

2. Add to your MCP client:

```sh
git-courer mcp setup     # auto-configures your agent (OpenCode, Claude Code, Codex, pi, Antigravity)
```

## Documentation

## What git-courer does

git-courer exposes a broad Git workflow through MCP tools for agents working in repositories. Read operations include repository status, AST-tagged diffs, commit history, reflogs, blame data, and remote synchronization. Mutation tools cover commits, branches, staging, stashes, history rewrites, branch integration, and backups.

The commit workflow separates proposal from execution. A preview can analyze changed files, identify dependency relationships, classify the likely commit type, and prepare a structured summary. The agent can review that result before applying the commit. When enabled, a local LLM writes the commit message’s explanation; Go-based rules determine the commit type, with an option for the agent to override it.

## How it works

git-courer communicates through MCP with structured JSON rather than invoking Git through an agent-controlled shell. Before write operations, it creates an automatic backup so an operation can be restored through the backup interface. The server also includes a combined pull-request review operation that reports tests, conflicts, diff statistics, and branch divergence.

Sessions provide an isolated workflow for agents. Starting a session creates a worktree and branch, then redirects the other MCP operations to that worktree. Finishing closes the session and removes the worktree; discarding a session abandons it. This model is useful when several agent tasks need separate working directories.

The command-line application also provides setup, diagnostics, project initialization, configuration removal, updates, version prediction, and shell-command classification. Its hook classifier labels commands and does not deny them.

## Setup and configuration

Install with the project’s shell installer, Go install command, or Homebrew tap. The documented installation options are:

- `curl -fsSL https://raw.githubusercontent.com/blak0p/git-courer/main/scripts/install.sh | sh`
- `go install github.com/blak0p/git-courer@latest`
- `brew install blak0p/tap/git-courer`

Run `git-courer mcp setup` to configure the documented agent clients, then restart the agent. `git-courer doctor` reports detected client configuration paths, MCP configuration state, prompt injection status, hook status, and Claude Code inline hooks where applicable. Project settings can be created or updated with `git-courer init`.

The server supports a configuration option at `llm.enabled`. Setting it to `false` removes the local-LLM requirement: the agent supplies the commit message, while previewing, applying, and overriding the commit type remain available. Release generation is not available in this mode.

## Tools and capabilities

- Inspect status, diffs, history, reflogs, blame, conflicts, stashes, and branch state.
- Create, switch, delete, rename, and list branches.
- Stage, remove, restore, and clean files.
- Save, inspect, and pop stashes.
- Preview and apply commits through a reviewable workflow.
- Synchronize with remotes, integrate branches, and rewrite history.
- Review pull-request readiness using tests, conflicts, statistics, and divergence.
- Create isolated sessions with worktree lifecycle management.
- Restore earlier repository state through automatic backups.

## Limitations and notes

It explicitly names OpenCode, Claude Code, Codex, pi, and Antigravity for automatic setup; client support outside that list is not confirmed here. Release generation requires the LLM-enabled configuration. Automatic backups protect write operations, but repository recovery behavior still depends on the available backup state and the operation performed.

_Full upstream README: https://allmcps.com/mcp/git-courer/readme_

