Provides Model Context Protocol commands to generate Git-based prompts, including diff results and pull request descriptions, enhancing code review and repository insights.
Unlock the full potential of Git Prompts MCP Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
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.)
uv sync --frozen
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 (the server use fnmatch in the backend) "*/uv.lock", "--excludes", "uv.lock", "--excludes", ".gitignore", "--format", // format for diff results "json" // options: json, text ] }, "settings": {} } }
The server responds to the following commands:
/git-diff
: Populate the diff results between HEAD and the specified ancestor branch or commit./generate-pr-desc
: Generate a pull request description based on the diff results between HEAD and the specified ancestor branch or commit./git-diff
, but it includes instructions for generating a pull request description at the end of the output./git-cached-diff
: Populate the diff results for the staged changes and HEAD.Examples:
/generate-pr-desc main
/git-diff dev
/git-cached-diff
MIT License. See LICENSE for details.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!