Skip to main content
Glama
github-pr-reviewer

github-pr-reviewer

by BADARRASHEED

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

GitHub PR Reviewer MCP Server Architecture

Related MCP server: GitHub Code Review Assistant

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:

GITHUB_TOKEN=your_github_token
NOTION_API_KEY=your_notion_api_key
NOTION_PAGE_ID=your_notion_page_id

Install the project dependencies:

uv sync

Add the MCP server to Codex:

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:

codex mcp list

Usage

Start Codex:

codex

Then provide a GitHub pull request URL:

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:

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:

.env
.venv/
__pycache__/

Author

Badar Rasheed Butt

AI Engineer

Available Tools

2 tools
create_notion_pageC

Create a Notion page with PR analysis.

Inputs: title (required), content (required). Returns: result

fetch_prC

Fetch changes from a GitHub pull request.

Inputs: pr_number (required), repo_name (required), repo_owner (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers