Gitlab MR

mcp server for gitlab to get reviews on you merge requests
  • python

24

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "amirsina-mandegari-gitlab-mr-mcp": {
      "command": "gitlab-mcp",
      "args": [],
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_PROJECT_ID": "12345",
        "GITLAB_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

You can connect your AI assistant to GitLab and ask questions about merge requests, reviews, commits, and pipelines directly in chat. This MCP provides a streamlined way to query GitLab data across one or more projects, perform actions on merge requests, view test results, and manage discussions without leaving your chat interface.

How to use

After you install and start the MCP server, configure your MCP client to point to the server and provide your GitLab instance URL and access token. You can then run natural language queries in your chat to interact with GitLab Merge Requests, such as listing open MRs, viewing reviews for a specific MR, fetching pipeline statuses, and replying to discussions. Use the multi-project workflow to explore access to multiple GitLab projects or constrain queries to a single project by setting a default project id.

How to install

Follow these steps to set up the MCP server and connect it to your GitLab workspace.

Prerequisites you should have installed on your machine before starting:

Install the MCP server and expose the command to your PATH using one of the supported methods.

Recommended installation methods and commands:

# Using pipx (recommended)
pipx install gitlab-mr-mcp

# Or using uv
uv tool install gitlab-mr-mcp

# Or using pip
pip install gitlab-mr-mcp

Configure your MCP client

Set up a global MCP configuration so the client can access your GitLab data across projects. The server exposes a command you run locally, and you provide connection details via environment variables.

{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "gitlab-mcp",
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}

Single-project setup

If you work with a single GitLab project, you can set a default project ID in the configuration. Restart the MCP client after updating settings.

{
  "mcpServers": {
    "gitlab-mcp": {
      "command": "gitlab-mcp",
      "env": {
        "GITLAB_URL": "https://gitlab.com",
        "GITLAB_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
        "GITLAB_PROJECT_ID": "12345"
      }
    }
  }
}

What you can do with the MCP

You can run a variety of commands in your chat to interact with GitLab data. Use the multi-project workflow to explore projects you have access to, or switch to a single-project workflow by setting a default project. Typical actions include listing open merge requests, showing details and reviews for a MR, fetching test summaries or full test reports, inspecting pipelines, and managing discussions.

Working with review comments

The enhanced review tools let you fetch discussion threads, reply to specific discussions, create new review comments, and resolve discussions. The system presents discussion and note identifiers to reference exact conversations when replying or resolving.

Approving and merging MRs

Approve or merge merge requests from chat. You can perform squash merges, remove the source branch after merging, and choose to auto-merge when a pipeline succeeds. You cannot approve your own MRs, and merges will fail if there are conflicts or if approvals are not satisfied.

Test reports and pipelines

Get fast test summaries for quick checks or fetch detailed test reports for debugging failures. The MCP can retrieve the latest pipeline for a merge request and present outcomes, failures, and stack traces in an organized format.

Configuration options and proxies

Configure your connection either per-project or globally. You can route API requests through a SOCKS5 proxy by setting the SOCKS_PROXY option. If SOCKS_PROXY is not set, connections are made directly.

Troubleshooting

If you encounter authentication errors, verify that your token has the required scopes and is not expired. Double-check the project ID and ensure the GitLab URL is correct and accessible.

Available tools

search_projects

Primary fast search by project name for discovery and browsing projects.

list_my_projects

List all projects accessible to you for browsing and selection.

list_merge_requests

List merge requests within a project with optional filters like state or target branch.

get_merge_request_details

Retrieve full details for a specific merge request.

create_merge_request

Create a new merge request with specified source and target branches and title.

update_merge_request

Update attributes of an existing merge request such as title or assignees.

merge_merge_request

Merge a merge request with options like squash or removing the source branch.

approve_merge_request

Approve a merge request, requiring appropriate permissions.

unapprove_merge_request

Revoke approval from a merge request.

get_pipeline_test_summary

Fetch a fast overview of tests from the latest pipeline for a MR.

get_merge_request_test_report

Retrieve a detailed test report for a merge request, including failures.

get_merge_request_pipeline

Get the pipeline and all jobs associated with a merge request.

get_job_log

Fetch the log output for a specific pipeline job.

get_merge_request_reviews

Get reviews and discussions for a merge request.

get_commit_discussions

Show discussions on commits within a merge request.

list_project_members

List members of a GitLab project.

list_project_labels

List labels for a GitLab project.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational