Inspiration

Code reviews are broken. Junior developers wait days for feedback. Senior engineers spend 2-4 hours daily on repetitive reviews. Solo founders and small teams have no reviewer at all. We wanted to fix this — not with another chatbot, but with a real agent that actually does the work.

MergeMinD was inspired by the question: what if every developer had a senior engineer available 24/7, for free?

What it does

MergeMinD is an AI agent that reviews GitLab Merge Requests like a senior engineer and posts structured feedback directly to the live MR — automatically.

  1. User signs in and pastes any GitLab MR URL
  2. The agent calls the official GitLab MCP server to fetch the MR diff, last 5 merged MRs for codebase context, and existing comments to avoid duplicates
  3. Gemini 2.5 Flash analyzes the code for CRITICAL bugs (security holes, logic errors), WARNINGs (missing error handling, edge cases), and SUGGESTIONs (naming, refactoring)
  4. The agent automatically posts inline review comments back to the live GitLab MR
  5. A code health score (out of 10) and full summary appear in the UI instantly

How we built it

  • Gemini 2.5 Flash — core reasoning engine that analyzes diffs like a senior engineer
  • GitLab MCP Server (gitlab.com/api/v4/mcp) — official partner integration for reading MRs and posting comments back autonomously
  • Google Cloud Agent Platform — used to configure and test the agent prompt
  • Firebase Authentication — secure email-based login
  • Next.js 14 + TypeScript + Tailwind CSS — fast, type-safe frontend
  • Vercel — zero-config deployment

The agent makes four distinct GitLab MCP tool calls per review: get_merge_request, list_merge_requests, list_merge_request_notes, and create_merge_request_note — read, context, deduplicate, write. That sequence is what makes it a true multi-step agent.

Challenges we ran into

  • The GitLab MCP server requires the Ultimate trial to be active — figuring this out cost significant debugging time
  • Gemini's JSON response needed careful regex extraction since the model occasionally wraps output in markdown fences
  • Getting the agent to avoid duplicating existing human comments required fetching notes before reasoning, not after
  • TypeScript strict mode across Next.js App Router required careful interface design to avoid type errors at build time
  • Balancing Gemini token limits while sending full diff context for large MRs

Accomplishments that we're proud of

  • The agent posts real inline comments to live GitLab MRs — not a mock, not a simulation
  • Deep GitLab MCP integration across all four tool types (read diff, list history, read notes, write comment)
  • Clean, production-grade UI with Firebase auth, dark theme, and structured review output
  • Successfully deployed on Vercel with zero cost — Gemini free tier + GitLab Ultimate trial + Firebase Spark plan
  • End-to-end working agent that a real development team could use today

What we learned

  • MCP (Model Context Protocol) is a powerful pattern — it standardizes how agents interact with external tools in a way that's clean, auditable, and composable
  • Gemini 2.5 Flash is remarkably capable at understanding code context and producing structured, actionable feedback
  • Agent design is fundamentally different from chatbot design — the key is defining a clear multi-step mission, not just a prompt
  • The GitLab API surface is rich enough to build a complete autonomous review workflow without needing any other data source

What's next for MergeMinD

  • Auto-trigger on MR open — webhook integration so reviews fire automatically when a new MR is created, no manual URL paste needed
  • Team dashboard — track code health scores across all repos over time
  • Learning mode — agent learns which suggestions the team accepts and improves future reviews
  • Multi-platform — extend beyond GitLab to GitHub and Bitbucket MRs
  • IDE plugin — review code before it even becomes an MR

Built With

Share this project:

Updates