prforge
Provides automation for GitHub issues and pull requests: fetches issues, clones repositories, generates diffs, and opens pull requests after human approval.
Click on "Deploy 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., "@prforgesolve issue https://github.com/owner/repo/issues/42"
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.
PRForge šØ
An agentic PR bot that reads a GitHub issue, understands the codebase, writes a fix, runs the tests in a sandbox, and opens a human-reviewed pull request. Built as a GSoC 2026 co-pilot and an AI-engineering portfolio centerpiece.
flowchart TD
A[Issue URL] --> B[fetch_issue]
B --> C[clone + repo map]
C --> D[localize files]
D --> E[plan]
E --> F[edit SEARCH/REPLACE]
F --> G[run tests in sandbox]
G --> H{pass?}
H -- no, retries left --> F
H -- yes / max --> I[review diff ā HUMAN APPROVES]
I -- approved --> J[push + open PR]
I -- rejected --> END[abort]
J --> ENDWhy
For GSoC 2026: point it at an org's issue ā it reads the codebase, drafts a fix you review. Cuts ramp-up time and turns a 4-hour issue into a 30-minute reviewed PR.
For internships: "I built a human-in-the-loop agentic coding agent with sandboxed execution, evaluated on SWE-bench" is a top-1% resume line.
For clubs: AI Club / Open Source Club / GDG talk material.
It is a co-pilot, not an autopilot ā every push passes a human approval gate. (GSoC mentors want to see your understanding, not spam PRs.)
Related MCP server: GitHub MCP Server
Install
git clone https://github.com/daksh1403/prforge.git
cd prforge
python -m venv .venv && source .venv/bin/activate
pip install -e '.[anthropic,dev]' # or [openai] or [ollama]
cp .env.example .env # fill in your API keyConfigure
.env (one provider only):
PRFORGE_LLM_PROVIDER=anthropic # anthropic | openai | ollama
ANTHROPIC_API_KEY=sk-ant-...
PRFORGE_MODEL=claude-sonnet-4-5-20250929
PRFORGE_MAX_ITERATIONS=3
PRFORGE_AUTO_APPROVE=falseFor local/free runs with Ollama: ollama pull qwen2.5-coder:7b, set PRFORGE_LLM_PROVIDER=ollama.
Usage
# fetch an issue (no LLM, no writes)
prforge fetch https://github.com/owner/repo/issues/42
# clone + map a repo (no LLM)
prforge map https://github.com/owner/repo.git
# solve end-to-end, dry run (local clone + diff, NO push, NO PR)
prforge solve https://github.com/owner/repo/issues/42 --dry-run
# inspect the generated diff
prforge diff https://github.com/owner/repo/issues/42
# go live: review the diff, approve, PR opens
prforge solve https://github.com/owner/repo/issues/42 --no-dry-run
# skip the gate (CI / batch) ā use with care
prforge solve https://github.com/owner/repo/issues/42 --no-dry-run --yesThe sandbox
Tests run inside a Docker container with no network and resource limits, so the agent can't exfiltrate data or run wild. Build it once:
docker build -t prforge-sandbox:latest -f sandbox/Dockerfile .If the image is missing, PRForge falls back to running tests locally (with a warning) so you can still iterate.
How it works
Stage | What happens |
|
|
| shallow clone + a compact repo map (file tree + line counts) |
| LLM picks the 2ā6 most relevant files from the map |
| LLM writes a concrete step-by-step plan |
| LLM emits Aider-style |
| repo's test command runs in the sandbox |
| shows the |
| branch ā commit ā push ā |
The loop retries edit ā test up to PRFORGE_MAX_ITERATIONS times, feeding
test failures back to the LLM.
More commands
# eval harness ā no API key needed
prforge eval --self-test
# eval harness ā real LLM over instances.jsonl
prforge eval eval/instances.jsonl
# batch solve many issues from a file
prforge batch issues.txt --dry-run
# run as an MCP server (tools for Claude Desktop / Cursor)
prforge mcp
# run the web dashboard
prforge dashboardSafety
Risk | Mitigation |
Pushing broken code | human approval gate before every push |
Dangerous shell | Docker sandbox, |
Spamming repos |
|
Cost runaway | iteration cap + token truncation + local Ollama fallback |
Secret leakage | your GitHub token never reaches the LLM; sandbox has no network |
Project layout
prforge/
āāā src/prforge/
ā āāā cli.py # Typer + Rich CLI
ā āāā config.py # env-driven config
ā āāā llm.py # Anthropic / OpenAI / Ollama abstraction
ā āāā utils.py # run(), json parsing, truncation
ā āāā agent/
ā ā āāā state.py # LangGraph TypedDict
ā ā āāā prompts.py # localize/plan/edit/PR prompts
ā ā āāā nodes.py # the Agent class + node functions
ā ā āāā graph.py # the StateGraph wiring
ā āāā tools/
ā āāā github.py # gh CLI wrapper (fetch/branch/push/PR)
ā āāā codebase.py # clone, repo map, read/grep, diff
ā āāā editor.py # SEARCH/REPLACE parse + apply
ā āāā sandbox.py # Docker test runner (+ local fallback)
āāā sandbox/Dockerfile
āāā tests/ # editor, codebase, github, utils
āāā examples/Roadmap
Phase 0ā1: fetch, clone, map, single/multi-file edit, dry-run diff
Phase 2: sandboxed tests + iterate-on-failure loop
Phase 3: human approval + auto open PR
Phase 4: SWE-bench-style eval harness +
--self-testresolve ratePhase 5: batch mode, MCP-server mode, React + FastAPI dashboard
Evaluation
Run on SWE-bench-lite (or a 20-issue subset) and record the resolve rate. Even 10ā20% is a legitimate, citable result for a student project.
References (study + contribute ā these are GSoC orgs)
All-Hands-AI/OpenHands ā open-source Devin
princeton-nlp/SWE-agent ā agent + issue loop
Aider-AI/aider ā SEARCH/REPLACE + repo map
princeton-nlp/SWE-bench ā the benchmark
License
MIT Ā© Daksh Agarwal
This server cannot be deployed
Maintenance
Related MCP Connectors
AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor
AI-native git hosting ā repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
An MCP server that gives your AI access to the source code and docs of all public github repos
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceSpecForge is a Model Context Protocol (MCP) server that connects an LLM client to a fully autonomous code-fixing pipeline. Point it at a GitHub issue, and it reads the repo, plans a fix, writes the code, tests it, and opens a pull request.-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to directly manage GitHub repositories, including PRs, issues, and code search, using natural language.MIT
- FlicenseAqualityBmaintenanceAn MCP server exposing AI-powered GitHub PR review as tools.5-
- AlicenseAqualityCmaintenanceAn MCP server that gives Claude live access to your GitHub workspace ā PR reviews, issue triaging, repo search, and weekly digest reports through natural language.7MIT