Git PR Description Generator

by ceshine

1 stars
266 downloads
Not rated
GitHub

About

Analyzes Git repository changes to automatically generate contextually relevant pull request descriptions based on commit differences.

Details

Author
ceshine
Repository
ceshine/git-prompts-mcp-server
GitHub stars
1
Downloads
266
License
MIT License
Categories
Design, Developer Tools, AI, Infrastructure, Automation

- Generates Git-diff-based prompts for MCP-compatible clients.
- Provides commands like /git-diff, /generate-pr-desc, /git-cached-diff, /git-commit-messages, and /generate-commit-message.
- Offers equivalent MCP tools: git-diff, git-cached-diff, git-unstaged-diff, and git-commit-messages.
- Supports file exclusion patterns using pathlib.PurePath.
- Configurable output format: JSON (default) or text.
- Works as a Gemini CLI extension for easy installation and auto-updates.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Git PR Description Generator
    Command (node, npx, python, etc.) uvx
    Arguments
    • Argument 1 --from
    • Argument 2 git+https://github.com/ceshine/git-prompts-mcp-server.git
    • Argument 3 git-prompts-mcp-server
    • Argument 4 /path/to/repo/
    • Argument 5 --excludes
    • Argument 6 **/uv.lock
    • Argument 7 --format
    • Argument 8 json

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Prerequisites: Python 3.12+ and uv. For Zed Editor, add a configuration block to settings.json specifying the uvx command with arguments for repository path, excludes, and output format. For Gemini CLI, install the extension via gemini extension install https://github.com/ceshine/git-prompts-mcp-server.git --auto-update; commands and tools become available in Git repositories. The server relies on the current working directory being part of a Git repository. Environment variables GIT_REPOSITORY, GIT_EXCLUDES, and GIT_OUTPUT_FORMAT can be set for configuration.

/git-diff <ancestor_branch_or_commit>

Populate the diff results between HEAD and the specified ancestor branch or commit.

/generate-pr-desc <ancestor_branch_or_commit>

Generate a pull request description based on the diff results and commit history between HEAD and the specified ancestor branch or commit.

/git-cached-diff

Populate the diff results for the staged changes and HEAD.

/git-commit-messages <ancestor_branch_or_commit>

Get commit messages between the ancestor and HEAD.

/generate-commit-message [num_commits]

Generate commit message based on the diff between the files in the staging area (the index) and the HEAD. Additionally, it points out any potential issues in the changes at the end of the output. `num_commits` defaults to 5. Set to 0 to exclude commit history.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "git pr description generator": {
            "env": {},
            "args": [
                "--from",
                "git+https://github.com/ceshine/git-prompts-mcp-server.git",
                "git-prompts-mcp-server",
                "/path/to/repo/",
                "--excludes",
                "**/uv.lock",
                "--format",
                "json"
            ],
            "shell": false,
            "command": "uvx"
        }
    }
}

Linux

{
    "env": [],
    "args": [
        "--from",
        "git+https://github.com/ceshine/git-prompts-mcp-server.git",
        "git-prompts-mcp-server",
        "/path/to/repo/",
        "--excludes",
        "**/uv.lock",
        "--format",
        "json"
    ],
    "shell": false,
    "command": "uvx"
}

Macos

{
    "env": [],
    "args": [
        "--from",
        "git+https://github.com/ceshine/git-prompts-mcp-server.git",
        "git-prompts-mcp-server",
        "/path/to/repo/",
        "--excludes",
        "**/uv.lock",
        "--format",
        "json"
    ],
    "shell": false,
    "command": "uvx"
}

Windows

{
    "env": [],
    "args": [
        "--from",
        "git+https://github.com/ceshine/git-prompts-mcp-server.git",
        "git-prompts-mcp-server",
        "/path/to/repo/",
        "--excludes",
        "**/uv.lock",
        "--format",
        "json"
    ],
    "shell": false,
    "command": "uvx"
}

Git Prompts MCP Server

This repository provides a Model Context Protocol (MCP) server that offers several commands to generate prompts based on the Git repository's content.

Tests

<p>
<a href="https://glama.ai/mcp/servers/@ceshine/git-prompts-mcp-server">
Git Prompts Server MCP server
</a>
</p>

<p>
<a href="https://mseep.ai/app/ceshine-git-prompts-mcp-server">
MseeP.ai Security Assessment Badge
</a>
</p>

Acknowledgements

- This repository draws heavy inspiration from MarkItDown MCP server and the example Git MCP server.
- The AGENTS.md was adapted from the example in this blog post: Getting Good Results from Claude Code.

Usage

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.