> For the complete documentation index, see [llms.txt](https://www.cakewalk.security/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-connections/gitlab.md).

# GitLab

Connect your company's GitLab to Cakewalk's MCP Gateway. Every agent tool call against GitLab passes through the gateway and is evaluated against your Policies.

GitLab lists its MCP server as Beta.

## Setup Flow: Sign in and go

GitLab supports Dynamic Client Registration, so there is no OAuth app to create and no Client ID or Secret to paste. An Admin enables the Connection, the employee signs in to GitLab, approves the consent screen, and the Connection goes live.

Before the sign in works, someone with the right role in GitLab has to turn the MCP server on. That is the only manual part, and it happens once on the GitLab side. See [Step 1](#step-1-turn-on-the-gitlab-mcp-server).

## Requirements

* A GitLab Premium or Ultimate subscription. The MCP server is not available on Free.
* For GitLab.com: the Owner role on the top-level group, to turn on beta and experimental features.
* For GitLab Self-Managed or Dedicated: administrator access to the instance.

## About Scopes

The GitLab MCP server uses a single scope, `mcp`. The employee grants it once on the GitLab consent screen during sign in. What the agent can then do (read or write issues, merge requests, repositories) follows the signing-in employee's own GitLab permissions, and every call is still gated by your Cakewalk Policies.

## Step 1: Turn on the GitLab MCP Server

The MCP server ships as a beta feature and is off by default. Turn it on once in GitLab.

**On GitLab.com** (Owner role on the top-level group):

1. Go to your top-level group.
2. Select **Settings** > **GitLab Duo**.
3. Select **Change configuration**.
4. Under **Feature preview**, select **Turn on experiment and beta GitLab Duo features**.
5. Save changes.

The setting cascades to all projects in the group.

**On GitLab Self-Managed or Dedicated** (administrator access):

1. Confirm GitLab Duo is turned on for the instance.
2. On the Admin area, select **Settings** > **GitLab Duo**.
3. Expand **Change configuration**.
4. Under **Feature preview**, select **Use experiment and beta GitLab Duo features**.
5. Save changes.

## Step 2: Enable the Connection in Cakewalk

1. Open <https://app.getcakewalk.io>.
2. Go to All Connections.
3. Find GitLab and enable it.
4. On GitLab Self-Managed or Dedicated, set the MCP server URL to your instance: `https://<your-gitlab-host>/api/v4/mcp`. On GitLab.com the URL is `https://gitlab.com/api/v4/mcp`.

## Step 3: Sign In

From an agent platform connected to Cakewalk, the employee connects GitLab and signs in. GitLab opens a browser window, the employee approves the `mcp` consent screen, and the Connection becomes Active. No credentials change hands.

## Verifying It Works

The GitLab Connection card flips to Active on All Connections. From an agent platform connected to Cakewalk, ask the agent "Which MCP server version are you using?" or ask it to list your open merge requests on a project. If GitLab returns the data, the Connection is live.

## Troubleshooting

* **404 Not Found when the server starts, or `POST /api/v4/mcp` returns 404 after sign in.** GitLab Duo, or beta and experimental features, are turned off. Recheck [Step 1](#step-1-turn-on-the-gitlab-mcp-server). On Self-Managed, also confirm GitLab Duo is turned on for the instance.
* **"Server's protocol version is not supported: 2025-06-18."** The GitLab instance is on 18.6 or earlier, where the MCP client library is incompatible. Upgrade GitLab, or have the agent platform update its MCP client.
* **Sign in succeeds but no GitLab tools appear.** Confirm the signing-in employee has access to at least one active project, and that their GitLab permissions cover what the agent is trying to do.

## Learn More

* [Turn on beta and experimental GitLab Duo features](https://docs.gitlab.com/user/duo_agent_platform/turn_on_off/#turn-on-beta-and-experimental-features)
* [GitLab MCP server troubleshooting](https://docs.gitlab.com/user/gitlab_duo/model_context_protocol/mcp_server_troubleshooting/)
* [Connect Claude Desktop with the GitLab MCP server](https://docs.gitlab.com/tutorials/connect_claude_desktop_with_gitlab_mcp_server/)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.cakewalk.security/docs/ai-agent-access/connections-and-integrations/agent-connections/gitlab.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
