github-pr-reviewer
by BADARRASHEED
README.md
# GitHub PR Reviewer MCP Server
A lightweight **Model Context Protocol (MCP)** server that connects **Codex** with GitHub and Notion. It allows Codex to fetch pull request changes, review code, and save approved reviews to Notion.
## Architecture Diagram

## Features
- Fetch pull request details and changed files from GitHub
- Analyse code using Codex
- Identify bugs, security risks, performance issues, and maintainability concerns
- Provide severity levels and recommended fixes
- Save approved reviews to Notion
- Integrate with Codex through FastMCP
## Tech Stack
- Python
- FastMCP
- Codex CLI
- GitHub API
- Notion API
- uv
- python-dotenv
## Setup
Create a `.env` file in the project root:
```env
GITHUB_TOKEN=your_github_token
NOTION_API_KEY=your_notion_api_key
NOTION_PAGE_ID=your_notion_page_id
```
Install the project dependencies:
```bash
uv sync
```
Add the MCP server to Codex:
```powershell
codex mcp add github-pr-reviewer -- uv --directory "C:\path\to\pr_reviewer" run python "src\pr_reviewer\pr_analyzer.py"
```
Verify the MCP server:
```powershell
codex mcp list
```
## Usage
Start Codex:
```powershell
codex
```
Then provide a GitHub pull request URL:
```text
Use the github-pr-reviewer MCP server to review this pull request:
https://github.com/OWNER/REPOSITORY/pull/PR_NUMBER
Fetch the pull request changes and review the code for bugs, security issues,
performance problems, and maintainability concerns. Do not save the review
to Notion until I approve it.
```
After reviewing the result:
```text
I approve this review. Save the complete review to Notion using the
github-pr-reviewer MCP server.
```
## Security
Never commit API tokens or the `.env` file.
Add the following entries to `.gitignore`:
```gitignore
.env
.venv/
__pycache__/
```
## Author
**Badar Rasheed Butt**
AI Engineer
TDQS
B3.3/5.0
Scored across 2 tools
Disambiguation5/5
fetch_pr and create_notion_page have completely distinct purposes: one retrieves PR data, the other creates a Notion page. There is no overlap, making selection unambiguous.
Naming Consistency5/5
Both tools use a consistent verb_noun snake_case pattern (fetch_pr, create_notion_page), which is predictable and readable.
Tool Count3/5
With only 2 tools, the server feels minimal, but the scope is narrowly defined. It is slightly under the typical range, but not excessive.
Completeness4/5
The workflow of fetching a PR and creating a Notion page is directly supported, but there are missing auxiliary operations like listing PRs or updating pages. Minor gaps exist.
Maintenance
ActivitySlowing
ResponsivenessNo issues