Back to Catalog
mcp-server1

GitLab MCP Server

Official GitLab Model Context Protocol (MCP) server that securely connects AI coding agents like Claude, Cursor, and others directly to your GitLab instance for repository operations, issues, merge requests, CI/CD, and full DevOps workflows.

Overview

The GitLab MCP Server is GitLab's official implementation of the Model Context Protocol (MCP). It allows external AI tools and coding agents (such as Claude Desktop/Code, Cursor, and other MCP-compatible clients) to securely connect to your GitLab instance and interact with projects, repositories, issues, merge requests, CI/CD pipelines, and other resources using natural language.

Introduced as an experiment in GitLab 18.3 and promoted to Beta in 18.6, it provides a standardized, secure way for AI assistants to act as intelligent DevOps collaborators.

Key Features

  • Secure Authentication: Supports OAuth 2.0 Dynamic Client Registration and Personal Access Tokens
  • Comprehensive Tools: Access to projects, repositories (files, commits, branches), issues, merge requests, pipelines, epics, and more
  • Read & Write Operations: View, create, update, and manage GitLab resources with proper permissions
  • Self-Managed & SaaS Support: Works on GitLab.com, GitLab Self-Managed, and Dedicated
  • HTTP Transport: Direct connection support for many clients without additional dependencies
  • Protocol Compliance: Supports latest MCP specifications (2025-03-26 and 2025-06-18)
  • Enterprise-Grade Security: Fine-grained access control scoped to groups and projects

Installation & Setup

For GitLab.com and Self-Managed

The MCP server is built-in and enabled via instance or group settings (Beta feature).

  1. Ensure your GitLab version is 18.6 or newer
  2. Enable the MCP server in Admin or Group settings
  3. Generate a Personal Access Token or use OAuth Dynamic Client Registration
  4. Add the server to your MCP client configuration (e.g., claude_desktop_config.json or Cursor settings)

Example configuration for many clients:

{
  "mcpServers": {
    "gitlab": {
      "url": "https://gitlab.com/api/v4/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Community alternatives (npm, Docker, Go implementations) are also available for enhanced features or older GitLab versions:

  • @modelcontextprotocol/server-gitlab (official community package)
  • zereight/gitlab-mcp (improved fork)
  • yoda-digital/mcp-gitlab-server (86+ tools)

Use Cases

  • AI-assisted code reviews and automated merge request creation
  • Generating issues, epics, and documentation from natural language descriptions
  • Intelligent CI/CD pipeline analysis and troubleshooting
  • Bulk repository operations and refactoring across projects
  • Automated DevOps workflows combining code generation with GitLab management
  • Security scanning, vulnerability triage, and compliance reporting with AI
  • Rapid onboarding and knowledge retrieval from large monorepos

Requirements

  • GitLab 18.6+ (for official built-in server)
  • Premium or Ultimate tier recommended for full feature access
  • MCP-compatible client (Claude Code, Cursor, etc.)
  • Appropriate API scope permissions

Resources

  • Official Documentation: https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server/
  • Tools Reference: https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server_tools/
  • Blog Post: https://about.gitlab.com/blog/duo-agent-platform-with-mcp/
  • Community Packages: npm @modelcontextprotocol/server-gitlab, various GitHub forks

GitLab MCP Server is a cornerstone of the emerging AI-native DevOps ecosystem, bridging powerful language models with enterprise source control and collaboration platforms.

Tags

mcpmcp-servergitlabdevopsci-cdmerge-requestsissuesrepository-managementai-agentclaudecursor