AI-powered Git intelligence for your IDE — smart commits, branch names, PR descriptions, changelogs, and workflow management.
Gitrama MCP Server exposes Gitrama's CLI as 10 MCP tools that any AI assistant can use. Instead of typing gtr commit in your terminal, your AI assistant calls the tool directly — analyzing your code changes, generating commit messages, suggesting branch names, and more.
Works with: Cursor · Claude Desktop · Claude Code · Windsurf · VS Code (Copilot) · Zed · any MCP-compatible client
pip install gitrama-mcpOr with uv:
uv pip install gitrama-mcpThis installs both the MCP server and the gitrama CLI.
Cursor
Add to .cursor/mcp.json in your project (or global settings):
{
"mcpServers": {
"gitrama": {
"command": "gitrama-mcp"
}
}
}Claude Desktop
Add to claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"gitrama": {
"command": "gitrama-mcp"
}
}
}Claude Code
claude mcp add gitrama gitrama-mcpVS Code (Copilot)
Add to .vscode/settings.json:
{
"mcp": {
"servers": {
"gitrama": {
"command": "gitrama-mcp"
}
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"gitrama": {
"command": "gitrama-mcp"
}
}
}Zed
Add to Zed settings (⌘,):
{
"context_servers": {
"gitrama": {
"command": {
"path": "gitrama-mcp"
}
}
}
}Ask your AI: "Commit my staged changes" — and watch it call gitrama_commit.
| Tool | Description |
|---|---|
gitrama_ask |
Ask any question about your repo — ownership, history, risk, changes |
| Tool | Description |
|---|---|
gitrama_commit |
Generate an AI commit message for staged changes |
gitrama_stage_and_commit |
Stage files + commit in one step |
gitrama_commit_quality |
Analyze quality of recent commit messages |
| Tool | Description |
|---|---|
gitrama_branch |
Create a new branch |
gitrama_branch_suggest |
Get AI-suggested branch names from a description |
| Tool | Description |
|---|---|
gitrama_pr |
Generate a PR description from branch diff |
gitrama_changelog |
Generate a changelog between refs |
| Tool | Description |
|---|---|
gitrama_stream_status |
Show current workflow stream |
gitrama_stream_switch |
Switch to a different stream |
gitrama_stream_list |
List all streams in the repo |
Ask a natural language question about your repository. Gitrama analyzes commit history, file structure, blame data, and diffs to answer.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
question |
string | required | Any question about your repo |
scope |
string | "auto" |
Context: "auto", "branch", "full", or "staged" |
model |
string | "" |
AI model override |
Example prompts:
- "Who owns the auth module?"
- "When did we last change the payment logic?"
- "What's the riskiest file in this repo?"
- "Summarize what happened on this branch"
- "What changed in the last 3 days?"
- "Explain the purpose of src/utils/retry.py"
Generate an AI-powered commit message for staged changes.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
message_type |
string | "conventional" |
Style: "conventional", "detailed", or "simple" |
context |
string | "" |
Optional context (e.g., "fixing auth bug") |
model |
string | "" |
AI model override (e.g., "gpt-4o", "claude-sonnet-4-20250514") |
Example prompt: "Commit my changes with a conventional message, context: refactoring the payment module"
Stage files and commit in one step.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
files |
string | "." |
Files to stage (. for all, or space-separated paths) |
message_type |
string | "conventional" |
Commit style |
context |
string | "" |
Optional context |
model |
string | "" |
AI model override |
Example prompt: "Stage and commit all my changes"
Analyze recent commit message quality.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
count |
int | 10 |
Number of commits to analyze (1-50) |
Example prompt: "How good are our last 20 commit messages?"
Get AI-suggested branch names.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
description |
string | required | Task description |
model |
string | "" |
AI model override |
Example prompt: "Suggest a branch name for adding OAuth2 support"
Generate a PR description.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
base |
string | "" |
Target branch (default: main/master) |
model |
string | "" |
AI model override |
Example prompt: "Write a PR description for this branch"
Generate a changelog.
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
since |
string | "" |
Start ref (tag, branch, hash) |
until |
string | "" |
End ref (default: HEAD) |
format |
string | "markdown" |
"markdown" or "json" |
model |
string | "" |
AI model override |
Example prompt: "Generate a changelog since v1.1.4"
| Variable | Default | Description |
|---|---|---|
GTR_CWD |
os.getcwd() |
Working directory for git operations |
GTR_MCP_TRANSPORT |
"stdio" |
Transport: "stdio" or "streamable-http" |
GTR_MCP_HOST |
"0.0.0.0" |
HTTP host (when using streamable-http) |
GTR_MCP_PORT |
"8765" |
HTTP port (when using streamable-http) |
GTR_MCP_TRANSPORT=streamable-http GTR_MCP_PORT=8765 gitrama-mcpThen connect your client to http://localhost:8765/mcp.
- Python 3.10+
- Git installed and in PATH
- A Gitrama API key or local Ollama instance
Set your API key:
gtr config --key YOUR_API_KEYOr use a local model:
gtr config --provider ollama --model llama3git clone https://github.com/ahmaxdev/gitrama-mcp.git
cd gitrama-mcp
pip install -e ".[dev]"
# Test with MCP Inspector
mcp dev src/gitrama_mcp/server.pyMIT — see LICENSE.
Built by Alfonso Harding · gitrama.ai
🌿