MCP Server PR Pilot
A Model Context Protocol server that generates pull request descriptions, commit messages, and code reviews from actual code changes using git diff.
README
MCP Server PR Pilot
<img src="sample.gif" alt="Demo of MCP Server PR Pilot" width="1080" />
A Model Context Protocol (MCP) server that helps you create pull request (PR) descriptions, commit messages, and code reviews based on the actual code changes in your repository. It provides the output of git diff and a summarization instruction, making it easy to generate meaningful PR descriptions, commit messages, and reviews using LLMs or other tools.
Example PR/Commit/Review Workflow
This server is designed to automate and improve your pull request documentation, commit message generation, and code review process.
Available Tools
-
summarize_pr- Summarize the changes in this branch for a pull request.- Input:
branch(string, optional): The branch to diff against (defaults tomain).
- Input:
-
review_changes- Review the changes in my working directory.- Input:
branch(string, optional): The branch to diff against (defaults tomain).
- Input:
-
generate_commit- Generate a conventional commit message for my staged changes. -
generate_docs- Generate documentation updates based on the code changes.- Input:
branch(string, optional): The branch to diff against (defaults tomain).
- Input:
Installation and Running
This project uses uv for dependency management and running scripts.
Using uv (recommended)
Ensure uv is installed. You can run the server directly from the project directory:
# Navigate to the project root directory first
cd path/to/mcp-servers/mcp-pr-pilot
# Install dependencies (if needed) and run the server script
uv run mcp-server-pr-pilot
Using PIP (for distribution or alternative setup)
If the package were published, you could install it via pip:
pip install mcp-server-pr-pilot
After installation, you could run it as a script:
python -m mcp_server_pr_pilot
For development, you typically run it using uv run as shown above.
Configuration
Configure for MCP Clients (e.g., Claude.app, Inspector)
Add an entry to your client's MCP server configuration. The exact key ("pr-pilot" in the examples) can be chosen by you.
Important: The configuration needs to point uv to the correct project directory using the --directory argument. The path style (/ vs \) depends on your operating system and how you run uv.
<details> <summary>Default: Using uv Directly (Linux/macOS/WSL)</summary>
This is the standard approach if your MCP client and the server run in the same Linux, macOS, or WSL environment.
// Example for mcp.json or Claude settings
"mcpServers": {
"pr-pilot": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-servers/mcp-pr-pilot", // Unix-style path
"run",
"mcp-server-pr-pilot"
]
}
}
</details>
<details> <summary>Windows Client + WSL Server</summary>
This configuration is recommended if your MCP client runs on Windows, but you want the server to execute within WSL. It uses wsl.exe to invoke uv inside WSL.
Requirements:
uvmust be installed inside your WSL distribution.- Adjust the path to
uvinside WSL (e.g.,/home/user/.cargo/bin/uv) if it's not in the WSLPATH. - Use the
/mnt/...style path for the--directoryargument accessible from within WSL.
// Example for mcp.json or Claude settings on Windows
"mcpServers": {
"pr-pilot": {
"command": "wsl.exe",
"args": [
"/home/your-user/.cargo/bin/uv", // uv WSL PATH
"--directory",
"/mnt/d/repos/mcp-servers/mcp-pr-pilot", // WSL-style path to project
"run",
"mcp-server-pr-pilot"
]
}
}
</details>
<details> <summary>Alternative: Using uv Directly on Windows</summary>
This assumes uv is installed directly on Windows and your MCP client also runs directly on Windows.
- Use the Windows-style path (
D:\...) for the--directoryargument. - Be mindful of potential
.venvconflicts if you also use WSL (see below).
// Example for mcp.json or Claude settings on Windows
"mcpServers": {
"pr-pilot": {
"command": "uv",
"args": [
"--directory",
"D:\path\to\mcp-servers\mcp-pr-pilot", // Windows-style path
"run",
"mcp-server-pr-pilot"
]
}
}
</details>
Handling .venv Conflicts (Different Environments)
- Problem:
uv runcreates a.venvdirectory specific to the operating system/environment (e.g., Linux vs. Windows). If you switch between running the server directly on Windows and running it via WSL (or native Linux), the existing.venvmight be incompatible. - Solution: Before switching environments, delete the
.venvdirectory in themcp-pr-pilotproject root.uv runwill then create a fresh, compatible one for the environment you are using.
Debugging
You can use the MCP inspector to debug the server by prefixing the command and arguments from your configuration with npx @modelcontextprotocol/inspector.
# Example using the Default (Linux/macOS/WSL) configuration:
npx @modelcontextprotocol/inspector uv --directory /path/to/mcp-servers/mcp-pr-pilot run mcp-server-pr-pilot
# Example using the Recommended (Windows Client + WSL Server) configuration:
npx @modelcontextprotocol/inspector wsl.exe /home/your-user/.cargo/bin/uv --directory /mnt/d/repos/mcp-servers/mcp-pr-pilot run mcp-server-pr-pilot
# Example using the Alternative (Direct Windows) configuration:
npx @modelcontextprotocol/inspector uv --directory D:\path\to\mcp-servers\mcp-pr-pilot run mcp-server-pr-pilot
Contributing
We encourage contributions to help expand and improve this PR Pilot MCP server. Whether you want to add new features, enhance existing functionality, or improve documentation, your input is valuable.
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements.
License
mcp-server-pr-pilot is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。