> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dust.tt/llms.txt
> Use this file to discover all available pages before exploring further.

# GitLab

> Let your agents search and read GitLab projects, code, merge requests, work items, and pipelines, and create or update them.

With the GitLab tool, your agents can search and read projects, code, merge requests, work items, and CI/CD pipelines, and create or update them. GitLab builds and maintains this MCP server: an admin connects it once, then anyone can add it to an agent.

## What your agent can do in GitLab

GitLab maintains the list of actions, and it can change at any time. See [GitLab's MCP server documentation](https://docs.gitlab.com/user/model_context_protocol/mcp_server/) for the current list. The tools listed in **Spaces** > **Tools** > **GitLab Cloud** (or **GitLab Self-Managed**) are the ones your agents can use.

## Before you start

* **In Dust:** you need to be an admin to connect GitLab.
* **In GitLab:** a GitLab administrator must first allow access to the MCP server, for your top-level group on GitLab.com, or for the instance on GitLab Self-Managed and GitLab Dedicated. Self-Managed and Dedicated instances must run GitLab 18.6 or later, 19.5 or later recommended, and be reachable over HTTPS. Dynamic client registration must stay turned on for the instance, or the connection fails.

## Connect GitLab

> [!NOTE]
>
> Only workspace admins can connect GitLab.

**1. Open the tools of your workspace**

Go to **Spaces** > **Tools** and click **Add tools**.

**2. Pick GitLab**

For GitLab.com, select **GitLab Cloud**, then click **Next**. For GitLab Self-Managed and GitLab Dedicated, select **GitLab Self-Managed**, enter your instance's MCP server URL in **URL**, like `https://gitlab.example.com/api/v4/mcp`, then click **Next**.

**3. Sign in**

Keep **Personal accounts**, selected by default, or pick **Shared account**. Click **Setup connection**, then sign in with your GitLab account.

## Add GitLab to an agent

**1. Open your agent in the Agent Builder**

Create an agent, or open one you can edit.

**2. Add the tool**

In **Capabilities and knowledge**, click **Add capabilities** and select **GitLab Cloud** or **GitLab Self-Managed**.

**3. Say what to work on**

In the instructions, name the projects or groups the agent should use, and when it may open merge requests, commit, or run pipelines.

By default, tools that search and read data run without asking (**Never ask**). Tools that create or update merge requests, reviews, comments, work items, branches, commits, forks, and pipelines, link work items, accept merge requests, or start or continue GitLab Duo sessions ask for approval every time (**High**). Admins can change the level of each tool in **Spaces** > **Tools** > **GitLab Cloud** (or **GitLab Self-Managed**) > **Tools & stakes**:

* **High:** needs explicit user approval.
* **Low:** users can completely disable confirmations.
* **Never ask:** runs automatically.

Tools that GitLab adds later start at **High** until an admin changes them.

## Related

> [card] [Preconfigured MCP servers](https://docs.dust.tt/docs/user-documentation/agents/tools/preconfigured-mcp-servers.md)
>
> All the third-party MCP servers you can connect.

> [card] [Personal vs Shared Credentials](https://docs.dust.tt/docs/user-documentation/admins/tools-management/personal-vs-shared-credentials.md)
>
> How each connection type works for tools.

> [card] [Adding an MCP server](https://docs.dust.tt/docs/user-documentation/admins/tools-management/adding-an-mcp-server.md)
>
> Add tools to your workspace and choose who can use them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.