GitLab Merge Requests
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.
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
Maintainer
Works with
Installation
Manual Installation
npx gitlab-mr-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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.
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"}'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"
}
}
}
}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.
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.
GitLab Merge Requests Alternatives — Similar Version Control Servers
Looking for alternatives to GitLab Merge Requests? Here are other popular version control servers you can use with Claude, Cursor, and VS Code.
Ruiyu MA
★ 30.1kConnect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
GitMCP
★ 8.1kTransforms any GitHub repository or GitHub Pages site into a documentation hub for AI assistants using the Model Context Protocol. It allows AI tools to access real-time code and documentation to prevent hallucinations and provide accurate API usage
GitHub Codemunch
★ 1.8kA token-efficient MCP server for exploring GitHub repositories using tree-sitter AST parsing to extract symbol signatures and summaries. It enables users to search and retrieve specific code components while significantly reducing token consumption c
Azure DevOps MCP Server
★ 1.7kThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standard
GitHub Official
★ 1.2kOfficial GitHub integration with comprehensive API coverage
Azure DevOps
★ 367Enables interaction with Azure DevOps through Cursor chat, providing tools to manage builds, pipelines, work items, sprints, and board operations. Supports secure authentication via Personal Access Tokens and allows natural language-driven DevOps tas
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.
Set Up GitLab Merge Requests in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.