Skip to main content

🤖 PR Reviewer with Claude + Notion + GitHub

This project automates the analysis of Pull Requests (PRs) using a LLM (Claude) connected via the MCP (Model Context Protocol).

The system receives a PR link, generates a technical summary, and stores it in a Notion page as documentation. image


🧩 Architecture

image

  1. The user sends a PR URL to Claude Desktop.
  2. Claude interprets the request and uses its internal MCP Client.
  3. The MCP Client sends a structured request to the local MCP Server.
  4. The MCP Server acts as an adapter to fetch PR data from GitHub and save a summary to Notion, using both platforms’ APIs.
  5. The retrieved and processed information is returned to Claude, who presents it to the user as a technical summary.
  6. Finally, the information is automatically saved to a Notion page.

✨ Features

  • Automatically fetches PR changes via GitHub API.
  • Uses Claude Desktop to generate a semantic analysis of the code.
  • Creates a Notion entry with the generated summary.
  • Modular and extensible: you can add more tools to the MCP server.

🚀 How It Works

  1. Claude Desktop detects the MCP server when it runs locally.
  2. The user sends a PR link to Claude.
  3. Claude calls the MCP server and uses:
    • fetch_pr → fetches PR metadata and diffs from GitHub.
    • create_notion_page → saves the analysis in a new Notion page.
  4. The whole process is triggered from Claude's interface with no manual steps.

🔧 Requirements


⚙️ Setup

  1. Install uv (lightweight Python environment manager):

    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. Initialize project:

    uv init pr_reviewer
    cd pr_reviewer
    uv venv
    source .venv/bin/activate
    
  3. Install dependencies:

    uv add "mcp[cli]" requests python-dotenv notion-client
    
  4. Create .env file:

    GITHUB_TOKEN=ghp_***************
    NOTION_API_KEY=secret_**************
    NOTION_PAGE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
    
  5. Configure Claude Desktop with the claude_desktop_config.json file, e.g.:

    {
      "mcpServers": {
        "pr-reviewer": {
          "command": "/path/to/python",
          "args": ["/path/to/pr_anayzer.py"],
          "cwd": "/path/to/project"
        }
      }
    }
    

🧪 Usage

  1. Run the MCP server:

    python pr_anayzer.py
    
  2. Open Claude Desktop and pass a PR link:

    https://github.com/your_username/your_repo/pull/1
    
  3. Claude will analyze the PR and ask whether to save the result in Notion.


📌 Possible Improvements

  • Full automation using n8n or GitHub Actions.
  • PR validation with custom rules.
  • Integration with other tools like Slack or ClickUp.

Metadata

Release files for iflow-mcp_andy-aranda-pr-reviewer 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_andy-aranda-pr-reviewer 0.1.3
File Size Uploaded
iflow_mcp_andy_aranda_pr_reviewer-0.1.3.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_andy-aranda-pr-reviewer 0.1.3
File Interpreter ABI Platform
iflow_mcp_andy_aranda_pr_reviewer-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / iflow_mcp_andy_aranda_pr_reviewer-0.1.3.tar.gz

Download URL iflow_mcp_andy_aranda_pr_reviewer-0.1.3.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
630e04408fcc01da6d76235b49ca372ac5038ebe1700b26a80c388900bf70caf
BLAKE2b-256 checksum
How to use checksums
795783eb6a2866c5365f2a18b545831e93f950c1203dba5578a4bc46667a947d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_andy_aranda_pr_reviewer-0.1.3-py3-none-any.whl

Download URL iflow_mcp_andy_aranda_pr_reviewer-0.1.3-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d98a3ba64e7147e62839e2907b56bc4faa2affb76ce26cd467851a9bf16a9da
BLAKE2b-256 checksum
How to use checksums
e828ace8e0505765377031a6503b1a3ac97b0997c1e2f65ddf876e5c4dc6e60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page