Archived. This article walks through an early Infragate console flow for a custom GitLab server. We no longer recommend that setup. The page remains online so that existing links continue to resolve.
As developers constantly switching between the IDE and the GitLab web interface to check merge request comments, we found ourselves losing focus and interrupting our workflow. The existing GitLab MCP server was helpful for listing projects and merge requests. However, it lacked a crucial feature (i.e., the ability to list merge request comments).
The Problem
The default GitLab MCP server provided the following tools.
list_projects- Get all visible projectslist_merge_requests- Get all merge requests for a project
However, the tool we needed was the following.
get_merge_request_comments- View all comments on a specific merge request without leaving the IDE
This gap meant that we repeatedly switched to the GitLab web UI whenever we needed to review feedback. This led to the following issues.
- Lost development momentum
- Increased time spent on code reviews
- More opportunities for human error when tracking which comments were already addressed
The Solution: Infragate
Rather than spending hours building a custom MCP server from scratch, or forking and maintaining the existing GitLab MCP implementation, we used Infragate. The process was simple, as the following steps show.
Step 1: Create the Server
The first step is to create the MCP server in Infragate. Specifically, create a server named gitlab.ext in the region of your choice, with API Key authentication enabled.

Step 2: Create the Data Source
To connect the server to GitLab, create a data source as follows.
- Obtain a valid GitLab access token from your GitLab account settings
- Configure a data source with the base URL
https://gitlab.com - Set the authentication method to API Key
- Use
PRIVATE-TOKENas the header name - Paste your GitLab access token as the API Key value

Step 3: Define Tools
Next, we define the three tools that make up the custom MCP server. Each tool maps to a GitLab API endpoint and transforms the data into a format that the AI assistant can work with.

Tool 1 (list_projects)
This tool retrieves all visible GitLab projects for the authenticated user.
| Field | Value |
|---|---|
| Description | Get a list of all visible projects across GitLab for the authenticated user. |
| Parameters | search (string, optional): search filter |
| Endpoint | GET /api/v4/projects |
| Query Parameters | { "owned": "true", "search": ":search" } |
| Transform | [].{"id": id, "name": name} |
Tool 2 (list_merge_requests)
This tool returns all merge requests for a specific project.
| Field | Value |
|---|---|
| Description | Get all merge requests for a project |
| Parameters | project_id (number) |
| Endpoint | GET /api/v4/projects/:project_id/merge_requests |
| Query Parameters | { "state": "opened" } |
| Transform | [].{"id": iid, "title": title, "description": description, "created_at": created_at, "updated_at": updated_at, "author": author.name} |
Tool 3 (get_merge_request_comments)
This tool is the missing piece, since it retrieves all comments on a specific merge request.
| Field | Value |
|---|---|
| Description | Get all comments on a specific merge request for a project |
| Parameters | project_id (number), merge_request_id (number) |
| Endpoint | GET /api/v4/projects/:project_id/merge_requests/:merge_request_id/notes |
| Transform | [].{"comment": body, "author": author.name, "commentedOn": { "fromLine": [...], "toLine": [...], "file": [...] }} |
When defining these tools, we used the “Transform Output” option (which supports JMESPath expressions). This option allows us to reshape the original API responses and retain only the relevant fields that the assistant needs.
Step 4: Connect with Cursor
Once the tools are configured, switch to the integrations tab and click “Add to Cursor”. Infragate then automatically configures Cursor to use the MCP server with the proper API key.
The Result
With everything connected, a single prompt in Cursor is sufficient.
“Using the gitlab tool, show me which comments need fixing on my latest MR on the project named ‘example’ and fix the open issues.”
This prompt triggers a fully automated agentic workflow, which consists of the following steps.

- Finds the project - Queries GitLab to locate the specified project
- Identifies the merge request - Retrieves the latest MR with its details
- Fetches all comments - Pulls in every comment, including line-specific feedback
- Analyzes the issues - Determines what needs to be fixed based on reviewer comments
- Applies the fixes - Makes the necessary code changes directly in the IDE

Productivity Gains
This simple workflow changed how we handle code reviews in several ways.
- No more context switching - Everything happens in one place
- Faster review resolution - From minutes to seconds
- Zero missed comments - The AI systematically addresses every issue
- Reduced mental overhead - We can remain in flow and focus on the code
Why Infragate Made the Difference
Without Infragate, this could have been a multi-day engineering project that involves the following tasks.
- Setting up MCP server infrastructure from scratch
- Implementing secure authentication handling
- Writing robust API integration code
- Deploying and maintaining the service long-term
- Handling rate limiting, error cases, and edge scenarios
With Infragate, it became a 15-minute setup instead. The platform handled all the infrastructure complexity while providing exactly what we needed (i.e., a focused solution to a real productivity problem).
Conclusion
For developers facing gaps in their MCP server tooling, or spending excessive time switching between the IDE and external tools, we recommend Infragate. In some cases, the best solutions are the ones that allow developers to focus on solving problems rather than building infrastructure.
The missing get_merge_request_comments functionality was only one example, and similar MCP server gaps likely exist in other workflows.