gitlab-mr-reviewer

gitlab-mr-reviewer

AI-powered code review for GitLab merge requests that analyzes diffs, posts inline comments with severity and category, supports multi-model council review, and integrates with Kiro IDE via MCP.

Category
Visit Server

README

GitLab MR Reviewer

AI-powered code review for GitLab merge requests. Ships as an MCP (Model Context Protocol) server for use with Kiro IDE, plus a standalone CLI for CI/CD pipelines.

Features

  • GitLab MR Analysis - Fetches MR diffs, threads, and metadata via GitLab API
  • Inline Code Comments - Posts review findings directly on changed lines with severity and category
  • Multi-Model Council - Runs multiple LLMs (via AWS Bedrock) in parallel for consensus-based review
  • Thread Management - Reply, resolve, reopen discussion threads; auto-resolve fixed issues
  • Noise Filtering - Automatically skips lockfiles, generated code, build output
  • Paginated Analysis - Handles large MRs without context overflow
  • Import Resolution - Follows imports to gather context from related files
  • Repository Profiles - Learns project architecture and conventions over time
  • CI/CD Integration - Standalone CLI for automated reviews in pipelines
  • Customizable Standards - Teams can add code-review-standards/ to their repos

Quick Start

1. Install

npm install -g gitlab-mr-reviewer

2. Configure

Create a .env file or set environment variables:

GITLAB_URL=https://gitlab.com
GITLAB_PAT=glpat-xxxxxxxxxxxx

3. Use with Kiro IDE

Add to your MCP config (~/.kiro/settings/mcp.json):

{
  "mcpServers": {
    "gitlab-mr-reviewer": {
      "command": "mr-review-mcp",
      "args": [],
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_PAT": "glpat-xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

4. Use via CLI (CI/CD)

mr-review-cli --mr-url "https://gitlab.com/group/project/-/merge_requests/42"
mr-review-cli --project "group/project" --mr 42
mr-review-cli --mr-url $CI_MERGE_REQUEST_URL --dry-run
mr-review-cli --mr-url $CI_MERGE_REQUEST_URL --council

Multi-Model Council Review

Multiple AI models independently review the same MR in parallel, then findings are consolidated by consensus.

Enable Council

COUNCIL_ENABLED=true
COUNCIL_MODELS=claude-sonnet-4,claude-haiku-4.5,nova-pro
AWS_REGION=us-east-1

Environment Variables

Variable Required Default Description
GITLAB_URL Yes - GitLab instance URL
GITLAB_PAT Yes - GitLab PAT (api scope)
REVIEW_LABEL No ai-review Label added to reviewed MRs
COUNCIL_ENABLED No false Enable multi-model review
COUNCIL_MODELS No claude-sonnet-4,claude-haiku-4.5,nova-pro Models to use
AWS_REGION No us-east-1 AWS region for Bedrock
BEDROCK_MAX_TOKENS No 8192 Max tokens per model
REVIEW_MODE No deep deep (clone) or quick (diff only)

Architecture

src/
  index.ts              - Library exports
  mcp-server.ts         - MCP server class (tool implementations)
  mcp-server-stdio.ts   - STDIO transport + tool definitions
  cli-review.ts         - CLI entrypoint for CI/CD
  cache/                - MR data caching
  config/               - Retry and runtime configuration
  core/                 - Multi-model council, verification, pipeline
  modules/              - GitLab operations, analysis, comments
  types/                - TypeScript type definitions
  utils/                - Helpers (validation, errors, parsing)
power/
  POWER.md              - Kiro Power manifest
  mcp.json              - MCP server configuration
  steering/             - Review guidance files

Development

git clone https://github.com/katamarajub/gitlab-mr-reviewer.git
cd gitlab-mr-reviewer
npm install
npm run build

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured