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

# Install MatterAI On GitLab

> Install MatterAI on GitLab for AI Code Reviews and more

<Note>All Pricing and Features are same on GitLab as on Github</Note>

# MatterAI GitLab Integration

MatterAI seamlessly integrates with GitLab to enhance your development workflow by:

* Automatically initiating AI-powered code reviews for new merge requests
* Displaying intelligent review comments directly within merge requests
* Providing real-time assistance through the MatterAI bot

Follow these steps to integrate MatterAI with your GitLab repositories:

## Step 1: Create a Dedicated MatterAI User (Recommended, but optional)

We recommend creating a dedicated service account for MatterAI with these best practices:

1. Create a new **GitLab user specifically for MatterAI integration**
2. Name the account **matter-ai** for easy identification
3. Use a **dedicated email address** for this account
4. Upload the **MatterAI logo** as the profile picture. You can find it here: [https://raw.githubusercontent.com/GravityCloudAI/public-assets/refs/heads/main/logos/matter-logo.svg](https://raw.githubusercontent.com/GravityCloudAI/public-assets/refs/heads/main/logos/matter-logo.svg)
5. Ensure this user has at least **Maintainer access** to your target repositories

## Step 2: Generate Personal Access Token

1. Log in using the dedicated MatterAI service account
2. Click your avatar on the left sidebar and select **Edit Profile**
3. Choose **Access Tokens** from the left menu
4. Click **Add New Token**
5. Enter a descriptive name and set an expiration date
6. Select the following scopes: **api, read\_repository**
7. Click **Create Personal Access Token**
8. Save the token securely

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-0.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=9de9cf0a98e7a6fde78f0f37ce1d8dae" alt="Generating Personal Access Token" width="2938" height="1618" data-path="images/connectors/gitlab/gitlab-matterai-setup-0.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-1.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=ec591969db1e52b32a7923f2bc2ca0f7" alt="Generating Personal Access Token Scopes" width="2940" height="1618" data-path="images/connectors/gitlab/gitlab-matterai-setup-1.png" />
</Frame>

## Step 3: Connect to MatterAI

1. Navigate to **MatterAI** -> **Connectors** -> **GitLab** and click on **Connect**. Console URL: [https://app.matterai.so/connectors](https://app.matterai.so/connectors)
2. Enter your **Personal Access Token** in the provided field.
3. If you are using a self-hosted instance, enter your **Self-Hosted GitLab URL**.
4. Click **Save**.

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-2.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=aae2d29715a9b74de3e5e1861f034df0" alt="Connecting GitLab in MatterAI" width="2940" height="1612" data-path="images/connectors/gitlab/gitlab-matterai-setup-2.png" />
</Frame>

## Step 4: Manage Projects

1. Once connected, click on **Manage Projects** (or **Fetch Groups**).
2. MatterAI will retrieve all available GitLab Projects/Groups associated with your token.

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-3.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=a824af37b025b61cabec82f2d2386c9e" alt="Fetching GitLab Groups" width="2940" height="1612" data-path="images/connectors/gitlab/gitlab-matterai-setup-3.png" />
</Frame>

## Step 5: Enable Projects

1. Locate the project or group you wish to enable.
2. Toggle the switch to enable it. You can enable specific projects or an entire group.
3. MatterAI will automatically set up the required webhooks for all enabled projects.

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-4.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=d6058468b86763618dad0da914cce628" alt="Enabling GitLab Projects" width="2940" height="1618" data-path="images/connectors/gitlab/gitlab-matterai-setup-4.png" />
</Frame>

<Note>
  This automated flow works on all GitLab tiers (Free, Premium, Ultimate) and fully supports self-hosted GitLab instances. Use the toggle to easily manage MatterAI integration for your groups.
</Note>

## Done, Your Webhooks are auto-configured!

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/T_CF3T3AIENlfhJO/images/connectors/gitlab/gitlab-matterai-setup-5.png?fit=max&auto=format&n=T_CF3T3AIENlfhJO&q=85&s=cca85054353dbb8df7dcde8298075a24" alt="Enabling GitLab Projects" width="2940" height="1616" data-path="images/connectors/gitlab/gitlab-matterai-setup-5.png" />
</Frame>

## GitLab Code Reviews

### AI Merge Request Summary

Get PR summaries in your GitLab merge requests, always upto date on all the commits.

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/connectors/gitlab/gitlab-merge-request-summary.png?fit=max&auto=format&n=-boUb8mu3Ny1_cmb&q=85&s=875953b7afc2b65c678571b4c0fa0e90" alt="Setting up MatterAI service account" width="2940" height="1608" data-path="images/connectors/gitlab/gitlab-merge-request-summary.png" />
</Frame>

### AI Merge Review Threads

Get PR summaries in your GitLab merge requests with issues, fix and code fix suggestion that you can apply with 1-click.

<Frame>
  <img src="https://mintcdn.com/gravitycloud-9ebb5c50/-boUb8mu3Ny1_cmb/images/connectors/gitlab/gitlab-merge-request-thread.png?fit=max&auto=format&n=-boUb8mu3Ny1_cmb&q=85&s=5afa5192d0d571c89d76ee33003e4999" alt="Setting up MatterAI service account" width="2940" height="1606" data-path="images/connectors/gitlab/gitlab-merge-request-thread.png" />
</Frame>
