
GitLab MCP Server
A Model Context Protocol server that enables interaction with GitLab accounts to manage repositories, merge requests, code reviews, and CI/CD pipelines through natural language.
Tools
gitlab_list_group_members
List members of a group
gitlab_list_users
List GitLab users
gitlab_get_user
Get details of a specific user
gitlab_list_groups
List GitLab groups
gitlab_get_cicd_variable
Get a specific CI/CD variable
gitlab_list_projects
List GitLab projects accessible to the user
gitlab_get_project
Get details of a specific GitLab project
gitlab_list_branches
List branches of a GitLab project
gitlab_list_merge_requests
List merge requests in a GitLab project
gitlab_get_merge_request
Get details of a specific merge request
gitlab_get_merge_request_changes
Get changes (diff) of a specific merge request
gitlab_create_merge_request_note
Add a comment to a merge request
gitlab_create_merge_request_note_internal
Add a comment to a merge request with option to make it an internal note
gitlab_update_merge_request
Update a merge request title and description
gitlab_list_issues
List issues in a GitLab project
gitlab_get_repository_file
Get content of a file in a repository
gitlab_compare_branches
Compare branches, tags or commits
gitlab_list_integrations
List all available project integrations/services
gitlab_get_integration
Get integration details for a project
gitlab_update_slack_integration
Update Slack integration settings for a project
gitlab_disable_slack_integration
Disable Slack integration for a project
gitlab_list_webhooks
List webhooks for a project
gitlab_get_webhook
Get details of a specific webhook
gitlab_add_webhook
Add a new webhook to a project
gitlab_update_webhook
Update an existing webhook
gitlab_delete_webhook
Delete a webhook
gitlab_test_webhook
Test a webhook
gitlab_list_trigger_tokens
List pipeline trigger tokens
gitlab_get_trigger_token
Get details of a pipeline trigger token
gitlab_create_trigger_token
Create a new pipeline trigger token
gitlab_update_trigger_token
Update a pipeline trigger token
gitlab_delete_trigger_token
Delete a pipeline trigger token
gitlab_trigger_pipeline
Trigger a pipeline run
gitlab_list_cicd_variables
List CI/CD variables for a project
gitlab_create_cicd_variable
Create a new CI/CD variable
gitlab_update_cicd_variable
Update a CI/CD variable
gitlab_delete_cicd_variable
Delete a CI/CD variable
gitlab_get_group
Get details of a specific group
gitlab_add_group_member
Add a user to a group
gitlab_list_project_members
List members of a project
gitlab_add_project_member
Add a user to a project
README
GitLab MCP Server
A Model Context Protocol (MCP) server that enables you to interact with your GitLab account. Get diffs, analyze merge requests, review code, cherry-pick changes, and more. This is an extended version of the MCP GitLab Server from the Model Context Protocol project.
<a href="https://glama.ai/mcp/servers/@rifqi96/mcp-gitlab"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@rifqi96/mcp-gitlab/badge" alt="GitLab Server MCP server" /> </a>
Features
This MCP server provides comprehensive tools for interacting with GitLab repositories, including:
Core Repository Features
- Listing projects and retrieving details
- Managing branches and repositories
- Working with merge requests and diffs
- Adding comments and internal notes to merge requests
- Updating merge request attributes
- Listing and working with issues
- Getting and comparing repository file contents
Project Settings & Integrations
- Managing project integrations and services
- Configuring and controlling Slack integration
- Setting up, updating, and testing webhooks
CI/CD Management
- Working with pipeline trigger tokens
- Managing CI/CD variables
- Triggering and controlling pipelines
User & Group Administration
- Listing and managing users
- Working with groups and group memberships
- Managing project members and access levels
Installation
Prerequisites
- Node.js (v16 or higher)
- npm
- A GitLab account with an API token
Setup
- Clone the repository:
git clone https://github.com/rifqi96/mcp-gitlab.git
cd mcp-gitlab
- Install dependencies:
npm install
- Build the server:
npm run build
- Install git hooks (optional, but recommended for contributors):
npm run install-hooks
This installs a pre-commit hook that automatically regenerates TOOLS.md when src/utils/tools-data.ts changes.
- Configure your GitLab API token:
You need to provide your GitLab API token in the MCP settings configuration file. The token is used to authenticate with the GitLab API.
For Cursor/Roo Cline, add the following to your MCP settings file (~/Library/Application Support/Cursor/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
):
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": [
"/path/to/mcp-gitlab/build/index.js"
],
"env": {
"GITLAB_API_TOKEN": "YOUR_GITLAB_API_TOKEN",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}
For Claude Desktop, add the following to your MCP settings file (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"gitlab": {
"command": "node",
"args": [
"/path/to/mcp-gitlab/build/index.js"
],
"env": {
"GITLAB_API_TOKEN": "YOUR_GITLAB_API_TOKEN",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
}
Replace YOUR_GITLAB_API_TOKEN
with your actual GitLab API token. You can generate a token in your GitLab account under Settings > Access Tokens.
Available Tools
For a complete list of available tools and their parameters, see TOOLS.md.
Example Usage
Here are examples of how to use these tools with AI assistants that support MCP:
List your projects
Could you list my GitLab projects?
Get information about a specific merge request
Can you show me the details of merge request with ID 123 in the project 'mygroup/myproject'?
Add a comment to a merge request
Please add a comment to merge request 123 in project 'mygroup/myproject' saying "This looks good, but please add more tests."
Add an internal note to a merge request
Add an internal note to merge request 123 in project 'mygroup/myproject' that says "Needs security review before merging." Make sure it's only visible to team members.
Update a merge request title and description
Update the title of merge request 123 in project 'mygroup/myproject' to "Fix login page performance issues" and update the description to include "This PR addresses the slow loading times on the login page by optimizing database queries."
Compare branches
Compare the 'feature-branch' with 'main' in the project 'mygroup/myproject' and show me the differences.
Practical Workflows
Reviewing a Merge Request
1. Show me merge request 123 in project 'mygroup/myproject'
2. Show me the changes for this merge request
3. Add an internal note with my review comments
4. Update the merge request title to better reflect the changes
Project Exploration
1. List all my GitLab projects
2. Show me the details of project 'mygroup/myproject'
3. List all branches in this project
4. Show me the content of the README.md file in the main branch
Available Resources
gitlab://projects
List of GitLab projects accessible with your API token.
Integration with AI Assistants
The GitLab MCP Server integrates with AI assistants that support the Model Context Protocol (MCP).
Capabilities
When connected to an AI assistant, this server enables the assistant to:
-
View and analyze code: The assistant can fetch file contents, view branch differences, and examine merge request changes for better code understanding.
-
Provide code reviews: The assistant can analyze merge requests and provide feedback through comments or internal notes.
-
Manage project workflows: The assistant can update merge request attributes, add comments, and help with repository management tasks.
-
Explore project structure: The assistant can browse projects, branches, and files to understand the codebase structure.
-
Configure CI/CD and integrations: The assistant can help set up webhooks, manage CI/CD variables, and configure project integrations.
Getting the Most from AI Assistant Integration
- Be specific when asking about projects, merge requests, or files
- Provide project IDs or paths when possible
- Use the assistant for code review by asking it to analyze specific merge requests
- Have the assistant help with repository configuration and management tasks
- Use internal notes for team-only feedback on merge requests
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.