GitLab is a comprehensive platform for managing Git repositories with fine-grained access controls, code reviews through merge requests, continuous integration/deployment pipelines, issue tracking, and wikis. Used by over 100,000 organizations, GitLab offers a complete solution for code collaboration whether self-hosted or cloud-based.
To run GitLab, your system must meet the following requirements:
For detailed system requirements and information about supported operating systems, visit the comprehensive requirements documentation at GitLab Requirements.
The easiest and most reliable way to install GitLab is using the Omnibus packages:
# For Debian/Ubuntu systems
sudo apt update
sudo apt install gitlab-ee
# For RHEL/CentOS systems
sudo yum install gitlab-ee
This method is faster and less error-prone than compiling from source.
For alternative installation methods or specific environments, visit GitLab Installation Options.
After installation, you'll need to configure GitLab:
sudo vim /etc/gitlab/gitlab.rb
external_url 'https://gitlab.example.com'
sudo gitlab-ctl reconfigure
Some important configuration options include:
Example SMTP configuration:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.server.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "smtp_user"
gitlab_rails['smtp_password'] = "smtp_password"
gitlab_rails['smtp_domain'] = "example.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
To update your GitLab installation:
# Debian/Ubuntu
sudo apt update
sudo apt install gitlab-ee
# RHEL/CentOS
sudo yum install gitlab-ee
sudo gitlab-ctl reconfigure
For detailed upgrade instructions and considerations, visit GitLab Upgrade Guide.
GitLab offers three editions:
For feature comparisons between editions, see GitLab Pricing.
If you encounter issues with your GitLab installation or need assistance:
For enterprise customers, you can access official support by becoming a subscriber.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "gitlab" '{"command":"npx","args":["-y","gitlab"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"gitlab"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": [
"-y",
"gitlab"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect