MCP Hub
Back to servers

gitrama-mcp

AI-powered Git workflow intelligence — 10 tools for commit messages, branch naming, PR descriptions, changelogs, and stream-based context management. Works with Cursor, Claude Desktop, Windsurf, VS Code, and all MCP clients.

Forks
1
Updated
Mar 1, 2026

🌿 Gitrama MCP Server

AI-powered Git intelligence for your IDE — smart commits, branch names, PR descriptions, changelogs, and workflow management.

PyPI Python License: MIT

What is this?

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

Install (< 60 seconds)

Step 1: Install the package

pip install gitrama-mcp

Or with uv:

uv pip install gitrama-mcp

This installs both the MCP server and the gitrama CLI.

Step 2: Connect to your IDE

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-mcp
VS 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"
      }
    }
  }
}

Step 3: Done.

Ask your AI: "Commit my staged changes" — and watch it call gitrama_commit.


Tools (11)

Repository Intelligence

ToolDescription
gitrama_askAsk any question about your repo — ownership, history, risk, changes

Commit Intelligence

ToolDescription
gitrama_commitGenerate an AI commit message for staged changes
gitrama_stage_and_commitStage files + commit in one step
gitrama_commit_qualityAnalyze quality of recent commit messages

Branch Management

ToolDescription
gitrama_branchCreate a new branch
gitrama_branch_suggestGet AI-suggested branch names from a description

PR & Changelog

ToolDescription
gitrama_prGenerate a PR description from branch diff
gitrama_changelogGenerate a changelog between refs

Stream (Workflow) Management

ToolDescription
gitrama_stream_statusShow current workflow stream
gitrama_stream_switchSwitch to a different stream
gitrama_stream_listList all streams in the repo

Tool Details

gitrama_ask

Ask a natural language question about your repository. Gitrama analyzes commit history, file structure, blame data, and diffs to answer.

Parameters:

ParameterTypeDefaultDescription
questionstringrequiredAny question about your repo
scopestring"auto"Context: "auto", "branch", "full", or "staged"
modelstring""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"

gitrama_commit

Generate an AI-powered commit message for staged changes.

Parameters:

ParameterTypeDefaultDescription
message_typestring"conventional"Style: "conventional", "detailed", or "simple"
contextstring""Optional context (e.g., "fixing auth bug")
modelstring""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"


gitrama_stage_and_commit

Stage files and commit in one step.

Parameters:

ParameterTypeDefaultDescription
filesstring"."Files to stage (. for all, or space-separated paths)
message_typestring"conventional"Commit style
contextstring""Optional context
modelstring""AI model override

Example prompt: "Stage and commit all my changes"


gitrama_commit_quality

Analyze recent commit message quality.

Parameters:

ParameterTypeDefaultDescription
countint10Number of commits to analyze (1-50)

Example prompt: "How good are our last 20 commit messages?"


gitrama_branch_suggest

Get AI-suggested branch names.

Parameters:

ParameterTypeDefaultDescription
descriptionstringrequiredTask description
modelstring""AI model override

Example prompt: "Suggest a branch name for adding OAuth2 support"


gitrama_pr

Generate a PR description.

Parameters:

ParameterTypeDefaultDescription
basestring""Target branch (default: main/master)
modelstring""AI model override

Example prompt: "Write a PR description for this branch"


gitrama_changelog

Generate a changelog.

Parameters:

ParameterTypeDefaultDescription
sincestring""Start ref (tag, branch, hash)
untilstring""End ref (default: HEAD)
formatstring"markdown""markdown" or "json"
modelstring""AI model override

Example prompt: "Generate a changelog since v1.1.4"


Configuration

Environment Variables

VariableDefaultDescription
GTR_CWDos.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)

HTTP Transport (for CI/CD)

GTR_MCP_TRANSPORT=streamable-http GTR_MCP_PORT=8765 gitrama-mcp

Then connect your client to http://localhost:8765/mcp.


Requirements

  • 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_KEY

Or use a local model:

gtr config --provider ollama --model llama3

Development

git 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.py

License

MIT — see LICENSE.


Built by Alfonso Harding · gitrama.ai

🌿

Reviews

No reviews yet

Sign in to write a review