Serves as the backend framework for the MCP server, exposing an HTTP endpoint to query Mistral for PR description generation.
Processes git diffs to generate PR descriptions, with specific support for analyzing staged changes in git repositories.
Generates structured pull request descriptions specifically formatted for GitHub PRs from git diffs.
Provides a web-based user interface for pasting git diffs and receiving generated PR descriptions.
Integrates with Ollama to run the Mistral language model locally for generating PR descriptions without cloud dependencies.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP: Local PR Description Generatorgenerate a PR description from my staged changes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ MCP:Local 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
Related MCP server: PR Reviewer
π Getting Started
1. Install Dependencies
pip install -r requirements.txt2. Start Ollama with Mistral
ollama run mistral3. Run the FastAPI server
uvicorn app.server:app --reload4. 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
The Gradio UI sends the pasted diff to
http://localhost:8000/mistralFastAPI receives it and forms a prompt for the local Mistral model
Mistral responds with a human-readable PR title + description
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
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.