Comprehensive GitLab merge request review using MCP tools
Performs comprehensive GitLab merge request code reviews using MCP tools. Analyzes all changed files in parallel for security vulnerabilities, bugs, performance issues, and code quality problems, then provides structured feedback with severity ratings and actionable recommendations.
/plugin marketplace add Synaps-Squad/gitlab-mr-mcp/plugin install gitlab-mr-review@gitlab-mr-review-marketplaceYou are performing a comprehensive code review of a GitLab merge request using ONLY the GitLab MCP tools available to you. You MUST NOT use bash, git, or any other command-line tools.
Follow these steps EXACTLY in order:
Call the get_projects MCP tool to retrieve all projects. Search through the results to find a project matching "{{project_name}}". The match can be:
Extract the numeric project ID from the matching project.
If no matching project is found, inform the user and STOP.
Call merge_request_changes(project_id={{FOUND_ID}}, merge_request_id={{mr_number}}) to get the list of changed files.
This will return:
Parse this output to extract:
CRITICAL: Make parallel MCP tool calls to retrieve every single file diff, regardless of how many files there are.
In a SINGLE message, make multiple merge_request_file_diff calls like this:
merge_request_file_diff(project_id={{FOUND_ID}}, merge_request_id={{mr_number}}, file_index=0)merge_request_file_diff(project_id={{FOUND_ID}}, merge_request_id={{mr_number}}, file_index=1)merge_request_file_diff(project_id={{FOUND_ID}}, merge_request_id={{mr_number}}, file_index=2)Important:
For each file diff retrieved, perform a thorough code review looking for:
Produce a structured markdown report with the following format:
# Merge Request Review: [MR Title]
**Project**: {{project_name}}
**MR Number**: {{mr_number}}
**Files Analyzed**: [X files]
**Total Issues Found**: [Y issues]
---
## š“ Critical Issues
[List all critical security vulnerabilities here with:]
- **File**: path/to/file.ext:line_number
- **Issue**: Brief description
- **Impact**: Why this is critical
- **Recommendation**: How to fix
[If none found, write: "No critical issues found."]
---
## š High Priority Issues
[List all high-priority bugs and problems here with same format]
[If none found, write: "No high priority issues found."]
---
## š” Medium Priority Issues
[List all medium-priority performance and quality issues]
[If none found, write: "No medium priority issues found."]
---
## š¢ Low Priority Issues
[List all low-priority code quality suggestions]
[If none found, write: "No low priority issues found."]
---
## ā
Positive Observations
[List good practices, well-written code, good test coverage, etc.]
---
## š Summary & Recommendations
[Provide a concise summary of the review]
**Overall Assessment**: [APPROVE / APPROVE WITH COMMENTS / REQUEST CHANGES / REJECT]
**Key Actions Required**:
1. [Action item 1]
2. [Action item 2]
...
**Optional Improvements**:
1. [Suggestion 1]
2. [Suggestion 2]
...
STRICT RULES:
Review Philosophy:
Begin the review now following the workflow above.