GitLab Merge Requests
Interact seamlessly with GitLab repositories to manage merge requests and issues. Fetch details, add comments, and streamline your code review process with ease.
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 interact seamlessly with gitlab repositories to manage merge requests and issues. fetch details, add comments, and streamline your code review process with ease.
Interact seamlessly with GitLab repositories to manage merge requests and issues. Fetch details, add comments, and streamline your code review process with ease.
This server falls under the Version Control category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Interact seamlessly with GitLab repositories to manage merge
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx gitlab-mrConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use GitLab Merge Requests
GitLab MR MCP Server enables AI assistants to seamlessly interact with GitLab repositories by providing tools to list projects, fetch merge request details, retrieve diffs, read and post comments, and update MR metadata. By connecting Claude to your GitLab instance, you can perform code reviews, triage issues, and manage merge requests through natural language conversation without switching to the GitLab web UI. It supports both GitLab.com and self-hosted GitLab instances, making it flexible for enterprise teams.
Prerequisites
- Node.js 18 or later installed
- A GitLab personal access token with api scope
- Your GitLab instance URL (https://gitlab.com or a self-hosted URL)
- npx available (comes bundled with Node.js/npm)
- An MCP client such as Claude Desktop or Cursor
Create a GitLab personal access token
In GitLab, navigate to User Settings > Access Tokens. Create a new token with the api scope and copy the value. This will be set as MR_MCP_GITLAB_TOKEN.
Install via Smithery CLI (recommended)
Use the Smithery automated installer to configure the server in Claude Desktop with a single command.
npx -y @smithery/cli@latest install @kopfrechner/gitlab-mr-mcp --client claude --config '{"gitlabMrMcpToken":"YOUR_GITLAB_TOKEN", "gitlabMrMcpHost": "YOUR_GITLAB_HOST"}'Or add manually to your MCP client config
Alternatively, edit your claude_desktop_config.json to add the server with MR_MCP_GITLAB_TOKEN and MR_MCP_GITLAB_HOST environment variables.
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": ["-y", "gitlab-mr-mcp"],
"env": {
"MR_MCP_GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
"MR_MCP_GITLAB_HOST": "https://gitlab.com"
}
}
}
}Optionally configure project filtering
Set MR_MCP_MIN_ACCESS_LEVEL to filter by your permission level (e.g., 30 for Developer) and MR_MCP_PROJECT_SEARCH_TERM to a keyword to narrow the project list.
Restart your MCP client and test
Restart Claude Desktop after saving the config. Ask Claude to list your GitLab projects to verify the connection is working.
GitLab Merge Requests Examples
Client configuration
Claude Desktop configuration for a self-hosted GitLab instance with project search filtering.
{
"mcpServers": {
"gitlab-mr": {
"command": "npx",
"args": ["-y", "gitlab-mr-mcp"],
"env": {
"MR_MCP_GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx",
"MR_MCP_GITLAB_HOST": "https://gitlab.mycompany.com",
"MR_MCP_MIN_ACCESS_LEVEL": "30",
"MR_MCP_PROJECT_SEARCH_TERM": "api"
}
}
}
}Prompts to try
Example natural language prompts to use with Claude once the GitLab MR server is connected.
- "List all open merge requests in the my-org/api-service project"
- "Fetch the diff for MR !88 and tell me what changed in the authentication module"
- "Add a review comment to MR !88 on line 42 of src/auth.js suggesting to add error handling"
- "Update the description of MR !88 to include a summary of the changes and testing steps"
- "Show me all unresolved comments on MR !88"Troubleshooting GitLab Merge Requests
401 Unauthorized when listing projects
Verify MR_MCP_GITLAB_TOKEN is a valid token with api scope. Also confirm MR_MCP_GITLAB_HOST matches your GitLab URL exactly, without a trailing slash.
Empty project list returned by get_projects
Lower or remove MR_MCP_MIN_ACCESS_LEVEL — a value of 50 (Owner) will exclude most projects. Also check that MR_MCP_PROJECT_SEARCH_TERM is not filtering out everything.
npx fails with package not found error
Try running npx -y gitlab-mr-mcp directly in a terminal to see the full error. Ensure Node.js 18+ is installed and your network can reach the npm registry.
Frequently Asked Questions about GitLab Merge Requests
What is GitLab Merge Requests?
GitLab Merge Requests is a Model Context Protocol (MCP) server that interact seamlessly with gitlab repositories to manage merge requests and issues. fetch details, add comments, and streamline your code review process with ease. 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. 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.