PR Reviewer
PR 审阅者设置指南
本指南提供了设置 PR Reviewer 项目的分步说明,其中包括与 GitHub 和 Notion 的集成。
先决条件
curl(适用于 MacOS/Linux)您的系统上安装了 Python 3.x
Related MCP server: GitHub PR Analyzer with Notion Integration
设置说明
步骤1:安装uv
MacOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh🔁 之后重新启动终端以确保
uv命令可用。
步骤 2:创建并设置项目
MacOS/Linux:
# Create a new directory for the project
uv init pr_reviewer
cd pr_reviewer
# Create and activate a virtual environment
uv venv
source .venv/bin/activate
# Install core dependencies
uv add "mcp[cli]" requests python-dotenv notion-client步骤 3:创建requirements.txt并从中安装
创建一个名为requirements.txt的文件,其内容如下:
# Core dependencies for PR Analyzer
requests>=2.31.0 # For GitHub API calls
python-dotenv>=1.0.0 # For environment variables
mcp[cli]>=1.4.0 # For MCP server functionality
notion-client>=2.3.0 # For Notion integration安装软件包:
uv pip install -r requirements.txt
pip install -r requirements.txt步骤4:设置环境变量
在根目录中创建一个.env文件并添加以下内容:
GITHUB_TOKEN=your_github_token
NOTION_API_KEY=your_notion_api_key
NOTION_PAGE_ID=your_notion_page_idGitHub 令牌:
转到 GitHub → 设置 → 开发者设置 → 个人访问令牌。
点击**“生成新令牌(经典)”** 。
启用这些范围:
read:orgread:repo_hookrepo
将令牌复制并粘贴到您的
.env文件中作为GITHUB_TOKEN。
概念整合:
单击**“新集成”并将类型设置为“内部”** 。
将其添加到您的工作区。
将内部集成密钥复制为
NOTION_API_KEY。将集成 URL 末尾的 UUID复制为
NOTION_PAGE_ID。
步骤 5:创建主脚本
为您的服务器逻辑创建一个空脚本文件:
touch pr_reviewer在此文件中添加您的应用程序逻辑。
步骤6:运行应用程序
要运行项目,请确保您的环境已激活并且.env已配置:
python pr_reviewer.pyThis server cannot be deployed
Maintenance
Related MCP Connectors
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Code review that knows what depends on your change — before commit or on every PR.
Monitor third-party API changes in GitHub repos, map breaks to files, open reviewable auto-fix PRs.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn intelligent assistant for Pull Request analysis that integrates GitHub with Notion for automated review documentation through an MCP (Model-Controller-Provider) server architecture.1-
- FlicenseNot gradedqualityDmaintenanceFetches GitHub pull request information including file changes, diffs, and metadata, then creates analysis summaries in Notion pages.1-
- FlicenseNot gradedqualityDmaintenanceEnables the analysis of GitHub Pull Requests to extract metadata, commits, and code changes for structured AI insights. It also supports the optional creation of Notion pages to store and organize the resulting analysis.-
- FlicenseNot gradedqualityDmaintenanceAnalyzes GitHub pull requests and creates detailed reports in Notion via MCP.3-