Skip to main content

GitLab MCP

The GitLab Model Context Protocol (MCP) server gives AI agents and applications programmatic access to your GitLab instance. Create and manage issues, merge requests, pipelines, search code, and work with GitLab Duo features—all from your AI client through Cequence AI Gateway.

Overview

GitLab MCP is a remote, vendor-hosted MCP server provided by GitLab. You can connect to GitLab.com or your self-hosted GitLab instance. The server URL is built from your instance hostname.

  • Server URL (template): https://{gitlab_host}/api/v4/mcp Examples: https://gitlab.com/api/v4/mcp (GitLab.com), https://gitlab.example.com/api/v4/mcp (self-hosted)
  • Transport: HTTP (Streamable HTTP)
  • Hosted by: GitLab (gitlab.com) or you (self-hosted)

Requires GitLab Duo enabled with beta features activated.

Supported authentication types

TypeSupportedNotes
OAuth 2.0YesPrimary for gateway. Uses Dynamic Client Registration (DCR). GitLab Duo must be enabled with beta features activated.

When you add GitLab MCP in Cequence AI Gateway, authentication uses OAuth 2.0 with DCR. GitLab automatically handles the OAuth flow when you connect through the gateway.

What can you do with this MCP server

With the GitLab MCP server, you can:

  • Issues — Get, create, and manage project issues with labels, milestones, and assignees.
  • Merge requests — Create merge requests, view diffs, commits, pipelines, and resolve conflicts.
  • Pipelines and CI/CD — List, create, retry, and cancel pipelines; view pipeline jobs.
  • Code search — Search across GitLab for code, issues, merge requests, commits, and more using basic, advanced, or semantic search.
  • Work items — Manage work items, add comments, and view saved views.
  • Labels — Search and manage labels in projects or groups.

Prerequisites

Before adding GitLab MCP in Cequence AI Gateway, ensure you have:

  • Access to Cequence AI Gateway at aigateway.cequence.ai
  • A GitLab account with access to the projects and groups you want AI tools to use
  • GitLab Duo enabled on your instance with beta features activated (required for MCP)
  • Your GitLab instance hostnamegitlab.com for GitLab.com, or your self-hosted hostname (for example gitlab.company.com)
  • For OAuth authentication: GitLab MCP supports Dynamic Client Registration (DCR), so you typically do not need to create an OAuth app manually.

Example workflows

  • "List open merge requests assigned to me in project X."
  • "Create an issue in gitlab-org/gitlab: title 'Fix authentication bug', description..."
  • "Show me the diffs for merge request !456 in my-project."
  • "Search for code containing 'authentication' in my organization."
  • "Retry the failed pipeline on branch main."
  • "What are the merge conflicts in MR !123?"

Connecting MCP server from Cequence AI Gateway

  1. Log in to Cequence AI Gateway.
  2. Choose your tenant.
  3. Go to App catalogue.
  4. Filter by Remote MCP server.
  5. Search for GitLab MCP and then select it.
  6. Select Create MCP server.
  7. Enter your GitLab instance hostname when prompted (for example gitlab.com or your self-hosted hostname). The gateway builds the URL (for example https://<hostname>/api/v4/mcp).
  8. Complete the OAuth flow. GitLab MCP supports DCR, so authentication setup is straightforward.
  9. Complete the setup as prompted, select tools, and deploy.

Use the generated MCP server URL in your client as described in the Client Configuration docs. For detailed UI steps and screenshots, see Create a third-party MCP Server.

Additional information

  • GitLab Duo requirement: MCP server requires GitLab Duo with beta features enabled. Check your instance settings or contact your GitLab administrator.
  • Self-hosted instances: Use the URL template to customize the server URL for your deployment (for example https://gitlab.company.com/api/v4/mcp).
  • Semantic code search: Use natural language queries to find code across your repositories.
  • Pagination: Most list operations support page and per_page parameters for efficient result handling.
  • Official documentation: GitLab MCP Server.