Model-agnostic Java MCP server providing git workflow tools — branches, commits, commit message generation, and PR descriptions. Works on any git repo. No hardcoded LLM provider — swap Anthropic ↔ OpenAI ↔ Ollama in config.
gitpilot exposes git operations as typed MCP tools that Claude Code (or any MCP client) can call:
| Tier | Tool | AI? | What it does |
|---|---|---|---|
| 1 | gitStatus |
No | Current branch, staged/unstaged/untracked files |
| 1 | gitCreateFeatureBranch |
No | Create and switch to feat/<name> |
| 1 | gitCommit |
No | Stage all + commit with provided message |
| 1 | gitShowStagedChanges |
No | Staged diff + recent commits (context for a commit message) |
| 2 | gitGenerateCommitMessage |
Yes | Generate conventional commit message from staged diff |
| 2 | gitGeneratePrDescription |
Yes | Generate structured PR body from branch diff |
Tier 1 works with zero API keys. Tier 2 needs an LLM provider configured.
Claude Code / MCP Client
│
├── stdio (MCP) ── gitpilot (Java)
│ git tools: status, branch, commit, PR description
│ operates on any local git repo via JGit
│
└── ... other MCP servers ...
- Java 21+
- A git repo (defaults to CWD; override with
GIT_REPO_PATH) - Gradle wrapper (
./gradlew) — IntelliJ generates it on project open
cd gitpilot
./gradlew bootRun$env:ANTHROPIC_API_KEY = "sk-ant-..."
./gradlew bootRunThe server starts and listens on stdio for MCP JSON-RPC messages.
{
"mcpServers": {
"gitpilot": {
"command": "cmd",
"args": ["/c", "C:\\Users\\kartik\\Desktop\\code\\gitpilot\\gradlew.bat", "bootRun"],
"env": {
"GIT_REPO_PATH": "C:\\Users\\kartik\\Desktop\\code\\ai_dashboard"
}
}
}
}Add ANTHROPIC_API_KEY to env for AI tools.
See docs/01-Architecture.md for the full picture.
- Model-agnostic: AI tools use Spring AI
ChatClient. Swap providers in config. - Git-first: Tier 1 tools are pure JGit — useful with zero AI dependencies.
- MCP-native:
@Toolbeans, stdio transport. Any MCP client can call them.
See CLAUDE.md for full conventions and workflow.
./gradlew compileJava # build checkPrivate — solo project.