- Home
- MCP servers
- Git Prompts
Git Prompts
- python
2
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ceshine-git-prompts-mcp-server": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ceshine/git-prompts-mcp-server.git",
"git-prompts-mcp-server",
"/path/to/repo/",
"--excludes",
"**/uv.lock",
"--format",
"json"
],
"env": {
"GIT_EXCLUDES": "*/uv.lock,*.log",
"GIT_REPOSITORY": "/path/to/repo/.git",
"GIT_OUTPUT_FORMAT": "json"
}
}
}
}You can run a dedicated Model Context Protocol (MCP) server that generates prompts from the content of your Git repository. This server exposes commands to produce diffs, commit messages, and pull request descriptions, helping you craft thoughtful code reviews and documentation directly from your project history.
How to use
To use this MCP server, run it locally and connect your MCP client to the provided stdio interface. The server offers commands to fetch diffs, generate commit messages, and compose PR descriptions based on your repository’s history and staging area.
How to install
Prerequisites you need before starting are Python 3.12+ and the uv tool.
-
Ensure you have Python 3.12+ installed.
-
Install and run uv (or ensure it is available in your path).
-
Add the MCP server configuration to your client settings as shown below.
{
"context_servers": {
"git_prompt_mcp": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/ceshine/git-prompts-mcp-server.git",
"git-prompts-mcp-server",
"/path/to/repo/", // parent folder of the .git directory
"--excludes", // Exclude files and directories from diff results (the server uses pathlib.PurePath behind the scenes)
"**/uv.lock",
"--format", // format for diff results
"json" // options: json, text
],
"env": {}
}
}
}
Additional configuration and usage notes
Environment variables that affect the server behavior are described here and may be set in your client or hosting environment.
Commands and tools you can use
The server provides a set of MCP commands and associated tools to work with your Git repository. You can run these commands from your MCP client to gather diffs, commit messages, and PR descriptions.
Environment and prerequisites details
-
GIT_REPOSITORY: Path to the Git repository. This is supplied automatically by the MCP client environment.
-
GIT_EXCLUDES: Comma-separated file patterns to exclude from diff results.
-
GIT_OUTPUT_FORMAT: Output format for diff results. Accepts json (default) or text.
Available tools
git-diff
Get a diff between HEAD and a specified ancestor commit or branch to understand changes.
git-cached-diff
Get a diff for staged changes in the index relative to HEAD, helping you review pending updates.
git-commit-messages
Fetch commit messages between an ancestor and HEAD to summarize recent history.
generate-pr-desc
Create a pull request description based on the diff and commit history between HEAD and a given ancestor.
generate-commit-message
Generate a commit message based on diffs between staging area and HEAD, highlighting potential issues.