PRPilot MCP Agent
Analyzes GitHub Pull Requests (PRs) by querying status, CI checks, reviews, comments, and local git state, and provides next-step suggestions in Chinese.
README
PRPilot MCP Agent
PRPilot 是一个面向开源新手的 PR 状态分析助手。用户给出 GitHub PR 链接和可选的本地仓库路径后,Agent 会通过 MCP 工具查询 PR 基本状态、CI / Checks、评论与 Review、本地 Git 状态,并生成中文下一步建议。
安装步骤
建议使用 Python 3.11+:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
如果 MCP SDK API 后续变化,优先检查:
python -c "from mcp.server.fastmcp import FastMCP; from mcp import ClientSession, StdioServerParameters; from mcp.client.stdio import stdio_client; print('ok')"
.env 配置
复制 .env.example 为 .env:
OPENAI_API_KEY=你的 OpenAI-compatible API Key
OPENAI_BASE_URL=可选,兼容服务地址;为空时使用 OpenAI SDK 默认地址
OPENAI_MODEL=gpt-4o-mini
GITHUB_TOKEN=可选,建议填写以提高 GitHub API 限额
说明:
OPENAI_API_KEY或OPENAI_BASE_URL至少应配置一种可用 LLM 连接方式。GITHUB_TOKEN不配置时,公开仓库通常仍可匿名访问,但更容易限流,部分 Checks 也可能权限不足。
DeepSeek 配置示例:
OPENAI_API_KEY=你的 DeepSeek API Key
OPENAI_BASE_URL=https://api.deepseek.com
OPENAI_MODEL=deepseek-v4-flash
GITHUB_TOKEN=可选
GUI 的 API 配置 弹窗里也有 DeepSeek 预设 按钮,会自动填入 Base URL 和模型名。
如何运行
图形界面:
start_gui.bat
打开窗口后,先点击左侧 API 配置。如果使用 DeepSeek,点击 DeepSeek 预设,填写 API Key 后保存;其他 OpenAI-compatible 服务则手动填写 OPENAI_API_KEY、OPENAI_BASE_URL 和 OPENAI_MODEL。
GUI 的最终回复区使用 markdown-it-py + tkinterweb 渲染 Markdown,会按 HTML/CSS 显示标题、表格、列表、代码块和引用。
一键启动:
start.bat
一键运行 demo:
start.bat --demo
交互模式:
python agent_client.py
直接传入问题:
python agent_client.py "分析 https://github.com/OWNER/REPO/pull/123,本地仓库路径是 D:\path\repo"
demo 模式:
python agent_client.py --demo
demo 会读取 data/sample_input.txt,但仍然真实调用 MCP 工具,不会伪造结果。
安全限制
- GitHub API 只做只读 GET 请求。
- 本地仓库只执行固定白名单 git 命令。
subprocess.run使用 list 参数,shell=False。- 不会自动
push、merge、comment、checkout、rebase、reset或clean。
如果本地仓库检查返回 dubious ownership,说明 Git 发现当前运行用户和仓库所有者不一致。确认该目录是你的仓库后,可以在普通终端运行工具提示的命令,例如:
git config --global --add safe.directory D:/Coding/MAAdev/MaaAssistantArknights
inspect_local_repo 允许的命令只有:
git status --short
git status -sb
git branch --show-current
git remote -v
git rev-parse HEAD
git diff --stat
git log --oneline -5
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.