Skip to main content
Glama

MCP: Local PR Description Generator

by AdiXgit

🧠 MCP PR Description Generator using Mistral

This project is a lightweight tool that uses Mistral running locally via Ollama to generate clean, structured GitHub pull request (PR) descriptions from staged git diffs.

It wraps the model inside a FastAPI server and provides a Gradio web UI for quick generation.


📌 Features

  • 💻 Local-first: All processing is done on your machine using ollama (no cloud calls)
  • ⚙️ FastAPI backend: Exposes a simple HTTP endpoint to query Mistral
  • 🌐 Gradio frontend: Paste a git diff and get a structured PR description instantly
  • 🧩 Git-aware: Designed around generating summaries from actual diffs
  • 🪶 Lightweight and privacy-friendly

🚀 Getting Started

1. Install Dependencies

pip install -r requirements.txt

2. Start Ollama with Mistral

ollama run mistral

3. Run the FastAPI server

uvicorn app.server:app --reload

4. Start the Gradio UI

python -m frontend.gradio

✨ Example

Git Diff

diff --git a/src/utils.py b/src/utils.py index 1a2b3c4..5d6ef7f 100644 --- a/src/utils.py +++ b/src/utils.py @@ def calculate_average(numbers): - return sum(numbers) / len(numbers) + if not numbers: + return 0 + return sum(numbers) / len(numbers) @@ def greet_user(name): - print("Hello", name) + print(f"Hello, {name} 👋")

Output PR Description

**Title:** [Utils] Handle empty list in average calculation and improved greeting **Description:** - Added edge case handling for `calculate_average()` to return 0 when given an empty list. - Enhanced user experience by adding an emoji in the greeting function `greet_user()`. These changes improve error handling and make output more user-friendly.

🧠 How it Works

  1. The Gradio UI sends the pasted diff to http://localhost:8000/mistral
  2. FastAPI receives it and forms a prompt for the local Mistral model
  3. Mistral responds with a human-readable PR title + description
  4. The Gradio UI displays the result

🔒 Privacy Note

This tool is completely local. Nothing is sent to the cloud — your code and git diffs stay on your machine.


🙌 Credits


📬 License

MIT License

-
security - not tested
F
license - not found
-
quality - not tested

A lightweight tool that uses Mistral AI running locally to generate structured GitHub pull request descriptions from git diffs.

  1. 📌 Features
    1. 🚀 Getting Started
      1. Install Dependencies
      2. Start Ollama with Mistral
      3. Run the FastAPI server
      4. Start the Gradio UI
    2. ✨ Example
      1. Git Diff
      2. Output PR Description
    3. 🧠 How it Works
      1. 🔒 Privacy Note
        1. 🙌 Credits
          1. 📬 License

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              Generates comprehensive and formatted release notes from GitHub repositories, efficiently organizing commits by type and including detailed statistics using smart API usage.
              Last updated -
              3
              2
              TypeScript
            • -
              security
              F
              license
              -
              quality
              Extracts diffs from GitHub Pull Requests, allowing users to retrieve and analyze changes between branches in a repository.
              Last updated -
              1
              JavaScript
            • A
              security
              F
              license
              A
              quality
              Provides GitHub data analysis for repositories, developers, and organizations, enabling insights into open source ecosystems through API calls and natural language queries.
              Last updated -
              5
              2
              JavaScript
            • -
              security
              F
              license
              -
              quality
              A tool that integrates with GitHub and Notion to analyze and review pull requests, enabling automated code reviews and documentation in Notion.
              Last updated -
              Python
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/AdiXgit/mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server