Git Prompts MCP Server - UBOS

✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

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.

(This repository draws heavy inspiration from MarkItDown MCP server and the example Git MCP server.)

Installation

Manual Installation

  1. Clone this repository
  2. Install dependencies: uv sync --frozen

Usage

As a MCP Server for Zed Editor

Add the following to your settings.json:

"context_servers": {
  "git_prompt_mcp": {
    "command": {
      "path": "uv",
      "args": [
        "--directory",
        "/path/to/local/git_prompts_mcp_server",
        "run",
        "git-prompts-mcp-server",
        "/path/to/repo/", // parent folder of the .git directory
        "--excludes", // exclude files and directories from diff results
        "**/uv.lock",
        "--excludes",
        "**/.gitignore",
        "--format", // format for diff results
        "json"  // options: json, text
      ]
    },
    "settings": {}
  }
}

Commands

The server responds to the following commands:

  1. /git-diff <ancestor_branch_or_commit>: Populate the diff results between HEAD and the specified ancestor branch or commit.
  2. /generate-pr-desc <ancestor_branch_or_commit>: Generate a pull request description based on the diff results between HEAD and the specified ancestor branch or commit.
  • Note: This is largely the same as /git-diff, but it includes instructions for generating a pull request description at the end of the output.
  1. /git-cached-diff: Populate the diff results for the staged changes and HEAD.

Examples:

  1. /generate-pr-desc main
  2. /git-diff dev
  3. /git-cached-diff

License

MIT License. See LICENSE for details.

Featured Templates

View More
AI Assistants
Image to text with Claude 3
150 968
AI Assistants
Talk with Claude 3
153 1021
AI Characters
Your Speaking Avatar
163 586
Customer service
AI-Powered Product List Manager
140 517

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.