GitLab Merge Requests

v1.0.0Version Controlstable

Enables AI agents to interact with GitLab repositories, allowing them to manage merge requests and issues including listing projects, fetching MR details and diffs, adding comments, and updating MR titles and descriptions.

gitlabmcpmcp-servermerge-requests
Share:
89
Stars
0
Downloads
0
Weekly
0/5

What is GitLab Merge Requests?

GitLab Merge Requests is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai agents to interact with gitlab repositories, allowing them to manage merge requests and issues including listing projects, fetching mr details and diffs, adding comments, and updating mr ti...

Enables AI agents to interact with GitLab repositories, allowing them to manage merge requests and issues including listing projects, fetching MR details and diffs, adding comments, and updating MR titles and descriptions.

This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Enables AI agents to interact with GitLab repositories, allo

Use Cases

Merge request and issue management
Repository interaction through AI
Code review and collaboration
kopfrechner

Maintainer

LicenseMIT License
Languagejavascript
Versionv1.0.0
UpdatedMay 12, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gitlab-mr-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use GitLab Merge Requests

GitLab MR MCP is an MCP server that enables AI agents to interact directly with GitLab repositories, providing tools to list projects, fetch merge request details and diffs, read and post comments, and update MR titles and descriptions. It bridges your AI assistant with GitLab's API so you can perform code review and project management tasks through natural language without leaving your AI client. This server is especially useful for teams that want to speed up code review cycles by letting Claude analyze diffs and suggest or post comments automatically.

Prerequisites

  • Node.js 18 or later installed
  • A GitLab personal access token with api scope
  • Your GitLab instance URL (e.g., https://gitlab.com or a self-hosted URL)
  • An MCP client such as Claude Desktop or Cursor
  • npx available (comes with npm/Node.js)
1

Obtain a GitLab personal access token

In GitLab, go to User Settings > Access Tokens and create a token with the api scope. Copy the token value — you will need it as MR_MCP_GITLAB_TOKEN.

2

Install via Smithery (automated)

The quickest way to install and configure the server is through the Smithery CLI, which handles the config file automatically.

npx -y @smithery/cli@latest install @kopfrechner/gitlab-mr-mcp --client claude --config '{"gitlabMrMcpToken":"YOUR_GITLAB_TOKEN", "gitlabMrMcpHost": "YOUR_GITLAB_HOST"}'
3

Or configure manually in Claude Desktop

Add the server entry to your Claude Desktop configuration file, providing your GitLab token and host as environment variables.

{
  "mcpServers": {
    "gitlab-mr-mcp": {
      "command": "npx",
      "args": ["-y", "gitlab-mr-mcp"],
      "env": {
        "MR_MCP_GITLAB_TOKEN": "your_gitlab_token",
        "MR_MCP_GITLAB_HOST": "https://gitlab.com"
      }
    }
  }
}
4

Optionally filter projects

You can narrow the list of visible projects by setting MR_MCP_MIN_ACCESS_LEVEL (e.g., 40 for Maintainer) and MR_MCP_PROJECT_SEARCH_TERM to a keyword that matches your project names.

5

Restart Claude Desktop and verify the connection

After saving the config, restart Claude Desktop. You should see the gitlab-mr-mcp tools listed when you ask Claude to list available tools.

GitLab Merge Requests Examples

Client configuration

Full JSON configuration block for Claude Desktop connecting to a self-hosted GitLab instance with project filtering enabled.

{
  "mcpServers": {
    "gitlab-mr-mcp": {
      "command": "npx",
      "args": ["-y", "gitlab-mr-mcp"],
      "env": {
        "MR_MCP_GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
        "MR_MCP_GITLAB_HOST": "https://gitlab.example.com",
        "MR_MCP_MIN_ACCESS_LEVEL": "30",
        "MR_MCP_PROJECT_SEARCH_TERM": "backend"
      }
    }
  }
}

Prompts to try

Natural language prompts you can use with Claude once the server is connected.

- "List all open merge requests in the my-org/backend project"
- "Get the diff for MR !42 in my-org/backend and summarize the changes"
- "Add a comment to MR !42 saying the tests need to cover the edge case for empty input"
- "Update the title of MR !42 to 'fix: handle empty input in user validator'"
- "Show me all comments on MR !42"

Troubleshooting GitLab Merge Requests

Authentication error when listing projects

Verify that MR_MCP_GITLAB_TOKEN is set to a valid token with the api scope. Also confirm MR_MCP_GITLAB_HOST does not have a trailing slash and matches the exact URL of your GitLab instance.

No projects returned by get_projects

If MR_MCP_MIN_ACCESS_LEVEL is set to a high value (e.g., 50 for Owner), lower it or remove the variable entirely. Also check MR_MCP_PROJECT_SEARCH_TERM is not filtering out all projects.

npx fails to find the package

Ensure you have Node.js 18+ and a working internet connection. Try running npx -y gitlab-mr-mcp manually in a terminal to see the full error output.

Frequently Asked Questions about GitLab Merge Requests

What is GitLab Merge Requests?

GitLab Merge Requests is a Model Context Protocol (MCP) server that enables ai agents to interact with gitlab repositories, allowing them to manage merge requests and issues including listing projects, fetching mr details and diffs, adding comments, and updating mr titles and descriptions. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install GitLab Merge Requests?

Follow the installation instructions on the GitLab Merge Requests GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with GitLab Merge Requests?

GitLab Merge Requests works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is GitLab Merge Requests free to use?

Yes, GitLab Merge Requests is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Version Control MCP Servers

Explore all version control servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gitlab-mr-mcp": { "command": "npx", "args": ["-y", "gitlab-mr-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use GitLab Merge Requests?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides