Git Prompts MCP Server
by ceshine
This repository provides a Model Context Protocol (MCP) server that generates prompts based on a Git repository's content. It offers commands to retrieve diffs and generate pull request descriptions.
Last updated: N/A
What is Git Prompts MCP Server?
The Git Prompts MCP Server is a server that implements the Model Context Protocol (MCP) to provide Git-related information for generating prompts. It allows users to retrieve diffs between branches or commits and generate pull request descriptions based on those diffs.
How to use Git Prompts MCP Server?
To use the server, you need to install it manually by cloning the repository and installing the dependencies using uv sync --frozen
. Then, configure your MCP client (e.g., Zed Editor) to connect to the server by specifying the command to run the server, including the path to the repository and any desired excludes or format options. The server exposes commands like /git-diff
, /generate-pr-desc
, and /git-cached-diff
that can be invoked by the client.
Key features of Git Prompts MCP Server
Generates prompts based on Git repository content
Retrieves diffs between branches or commits
Generates pull request descriptions
Supports excluding files and directories from diff results
Supports different formats for diff results (JSON, text)
Use cases of Git Prompts MCP Server
Generating commit messages
Creating pull request descriptions
Summarizing changes in a branch
Providing context for code reviews
Automating Git-related tasks
FAQ from Git Prompts MCP Server
What is MCP?
What is MCP?
MCP stands for Model Context Protocol. It's a protocol for communication between a client and a server that provides context for a model.
What is the purpose of this server?
What is the purpose of this server?
This server provides Git-related information to be used as context for generating prompts.
How do I install the server?
How do I install the server?
Clone the repository and install the dependencies using uv sync --frozen
.
How do I configure Zed Editor to use this server?
How do I configure Zed Editor to use this server?
Add the provided configuration to your settings.json
file, adjusting the paths as needed.
What commands are available?
What commands are available?
The server responds to the following commands: /git-diff
, /generate-pr-desc
, and /git-cached-diff
.