Git Commit Generator MCP server

Generates conventional commit messages from staged git changes by analyzing diffs and file status to create properly formatted commits with optional type and scope parameters.
Back to servers
Setup instructions
Provider
Theoklitos Bampouris
Release date
Jul 02, 2025
Language
Go
Stats
8 stars

The MCP Git Commit Generator is a tool that automates the creation of conventional commit messages by analyzing your staged git changes using Model Context Protocol (MCP). It integrates with various MCP clients like VS Code, Cursor, Claude Desktop, and Windsurf.

Installation Options

Using uvx (Recommended)

uvx mcp-git-commit-generator

Using pip

pip install mcp-git-commit-generator

Or with uv:

uv pip install mcp-git-commit-generator

Using Docker

docker run -i --rm --mount type=bind,src=${HOME},dst=${HOME} ghcr.io/theoklitosbam7/mcp-git-commit-generator:latest

Available Tools

generate_commit_message

This tool creates a conventional commit message based on your staged git changes.

Parameters:

  • repo_path (optional): Path to the git repository (uses current directory by default)
  • commit_type (optional): Conventional commit type (e.g., feat, fix, docs)
  • scope (optional): Scope of the change (e.g., file or module name)

check_git_status

Provides an overview of your current git repository state.

Parameters:

  • repo_path (optional): Path to the git repository (uses current directory by default)

MCP Client Configuration

VS Code

Add one of these configurations to your VS Code mcp.json file:

Using uvx (Recommended)

{
  "servers": {
    "mcp-git-commit-generator": {
      "command": "uvx",
      "args": ["mcp-git-commit-generator"]
    }
  }
}

Using Docker

{
  "servers": {
    "mcp-git-commit-generator": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--mount",
        "type=bind,src=${userHome},dst=${userHome}",
        "ghcr.io/theoklitosbam7/mcp-git-commit-generator:latest"
      ]
    }
  }
}

Cursor

Add to your Cursor MCP configuration file (typically at ~/.cursor/mcp.json):

With uvx

{
  "mcpServers": {
    "mcp-git-commit-generator": {
      "command": "uvx",
      "args": ["mcp-git-commit-generator"]
    }
  }
}

Windsurf

Configure in your Windsurf MCP server settings (typically at ~/.codeium/windsurf/mcp_config.json):

{
    "mcpServers": {
      "mcp-git-commit-generator": {
        "command": "uvx",
        "args": ["mcp-git-commit-generator"]
      }
    }
}

Claude Desktop

Add to your Claude Desktop configuration file:

{
  "mcpServers": {
    "mcp-git-commit-generator": {
      "command": "uvx",
      "args": ["mcp-git-commit-generator"]
    }
  }
}

Quick Start Guide

  1. Install the package using one of the methods above

  2. Configure your MCP client using one of the configurations provided

  3. Stage your changes in a git repository:

    git add <files>
    
  4. Use the tools through your MCP client:

    • Use check_git_status to see your current repository state
    • Use generate_commit_message to create a conventional commit message
  5. Commit your changes with the generated message

Troubleshooting

Common Issues

  • "Path is not a valid git repository": Ensure you're in a directory with a .git folder
  • "No staged changes found": Run git add <files> to stage your changes first
  • "Git is not installed": Install Git from git-scm.com
  • Docker permission issues: Ensure Docker can access your home directory
  • MCP connection fails: Verify your client configuration matches the examples above

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "mcp-git-commit-generator" '{"command":"uvx","args":["mcp-git-commit-generator"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "mcp-git-commit-generator": {
            "command": "uvx",
            "args": [
                "mcp-git-commit-generator"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "mcp-git-commit-generator": {
            "command": "uvx",
            "args": [
                "mcp-git-commit-generator"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later