It’s a Plan

Integrations/GitLab

A GitLab AI agent that reviews merge requests

Mention the agent on an issue. It reads the diff of the merge request, comments on the lines, approves it or asks for changes, and reports back on the issue.

GitLab puts planning, source control and CI/CD in one platform, on gitlab.com or on your own server.

Tools
13: Review merge requests and merge them; list, create, update and comment on issues
Key
Access token
Edition
Free in Community
Starts on
Delegate, mention, chat or a schedule
Board
One-way or two-way issue sync

In a run

See each call the agent makes to GitLab

Every GitLab tool call is a step of the run, with what the agent sent and what came back.

Succeeded in 1m 34sWEB-231 Discount is applied twice at checkout
Agent
@reviewer · Internal
Trigger
Mention
Started
Nov 21, 11:32
Run
#418

Result

Both review threads on !57 are resolved and it is approved, with one note on a test. The summary is in a reply on WEB-231.

What the agent did

  1. 11:32:08get_issue{"key":"WEB-231"}
  2. 11:32:11gitlab_list_merge_request_threads{"project":"acme/shop","mergeRequest":57}
  3. 11:32:14gitlab_list_merge_request_files{"mergeRequest":57}
  4. 11:33:02gitlab_resolve_merge_request_thread{"thread":"6a9c1f…"}
  5. 11:33:04gitlab_resolve_merge_request_thread{"thread":"b07e42…"}
  6. 11:33:21gitlab_review_merge_request{"event":"approve"}
  7. 11:33:36add_comment{"issue":"WEB-231"}
  8. 11:33:42The merge request is approved, and the summary is on WEB-231.

gitlab_review_merge_request11:33:21

Input{ "project": "acme/shop", "mergeRequest": 57, "event": "approve", "body": "Both comments are fixed.", "comments": [{ "path": "src/cart/discount.test.ts", "newLine": 31, "body": "Add the guest cart here too." }] }Output{ "event": "approve", "comments": 1 }

Tools

13 GitLab tools for merge requests and issues

Each tool is its own switch. An agent can review a merge request and still not merge it.

Issues

List Issues

List issues in a GitLab project, most recently created first.

gitlab_list_issues

Create Issue

Create an issue in a GitLab project.

gitlab_create_issue

Update Issue

Update an issue in a GitLab project: change its title or markdown body, or close and reopen it.

gitlab_update_issue

Comment Issue

Comment on an issue in a GitLab project.

gitlab_comment_issue

Merge requests

List Merge Requests

List merge requests in a GitLab project, most recently created first.

gitlab_list_merge_requests

Get Merge Request

Read a merge request in a GitLab project: its markdown description, state, branches, head commit and merge status.

gitlab_get_merge_request

List Merge Request Files

List the files a GitLab merge request changes, with the unified diff of each file.

gitlab_list_merge_request_files

Review Merge Request

Submit a review of a GitLab merge request: approve it, request changes, or only comment.

gitlab_review_merge_request

List Merge Request Threads

List the comment threads of a GitLab merge request: the comments on lines of its diff and on the merge request itself, with whether each thread is resolved.

gitlab_list_merge_request_threads

Reply Merge Request Thread

Reply in a comment thread of a GitLab merge request.

gitlab_reply_merge_request_thread

Resolve Merge Request Thread

Resolve a comment thread of a GitLab merge request, or reopen it with resolved false.

gitlab_resolve_merge_request_thread

Accept Merge Request

Merge a GitLab merge request into its target branch.

gitlab_accept_merge_request

Comment Merge Request

Comment on a GitLab merge request.

gitlab_comment_merge_request

Set up

Connect GitLab once for the team

  1. Create an access token

    GitLab › Edit profile › Access › Personal access tokens

    A personal, project or group token with the api scope. A fine-grained token needs the Work Item and Merge Request permissions. It reaches only the projects the account can access.

  2. Add it to the team

    Team settings › Integrations › Add credential

    Leave the instance URL empty for gitlab.com, or enter your GitLab Self-Managed or Dedicated address. It’s a Plan checks the token before you save it.

  3. Pick the tools

    Team settings › Tools › Add tool

    Add the GitLab tools for the team, then turn on the ones each agent may use.

Beacon›Add tool

Search tools

GitLab13 toolsSelect all
List Merge RequestsList merge requests in a GitLab project, most recently created first.
Get Merge RequestRead a merge request in a GitLab project: its markdown description, state, branches, head commit and merge status.
List Merge Request FilesList the files a GitLab merge request changes, with the unified diff of each file.
Review Merge RequestSubmit a review of a GitLab merge request: approve it, request changes, or only comment.
List Merge Request ThreadsList the comment threads of a GitLab merge request: the comments on lines of its diff and on the merge request itself, with whether each thread is resolved.
Reply Merge Request ThreadReply in a comment thread of a GitLab merge request.
Credential

acme bot

Add credential
3 tools selectedCancelAdd 3 tools

Use cases

GitLab code review you can hand an agent

Mention

Mention @reviewer with a merge request link: it reads the diff and comments on the lines.

Column

When an issue moves to Ready to merge, @release merges its merge request if GitLab allows it.

Schedule

Every Monday at 9:00, @triage closes the GitLab issues that were fixed last week and says why.

On the board

GitLab project management with issue sync

Connect a repository to a project, and its issues come to the board. People and agents work on them there like on any other issue. The sync is free and needs no agent.

Project settings › Repositories

Set up for open-source maintainers
One-way sync
New GitLab issues appear on the board. Close or reopen one there, and the repository issue follows.
Two-way sync
The same, and edits, labels, closing and reopening in the repository also update the board issue.
Import
Bring the open issues of the repository over at once. Issues already on the board are skipped.
Labels
Map each repository label to a project label or an issue type.
Comments
Copy new repository comments to the board issue. Comments made on the board stay there.
Merge requests
Branches, merge requests and their checks show on the issue they name. “Fixes KEY-42” closes it when the merge request merges into the default branch.

Free and Pro

GitLab comes with the free edition

FREE

GitLab and 14 more integrations, on every agent trigger: delegate, mention, chat and schedules.

PRO

HTTP tools for services not on the list, agent workflows, and an agent that starts on every new issue.

See Pro
FAQ

GitLab AI agent FAQ

Is this GitLab Duo?

No. GitLab Duo is GitLab’s own AI. This agent runs in your issue tracker, on the AI model you choose, and reaches GitLab through its API.

Does AI code review work with GitLab Self-Managed?

Yes, and with gitlab.com and GitLab Dedicated. Requesting changes needs GitLab 19.2 or newer; an older GitLab gets the comments without the block.

Can the agent approve and merge?

Yes, if you turn those tools on and the token’s account may approve. GitLab refuses a merge while its own rules block it, such as a failed pipeline or a missing approval.

Does it sync GitLab issues with the board?

Yes, through the repository connection in the project settings. New GitLab issues appear on the board, and an issue closed on the board closes in the repository. With two-way sync, edits, labels and state in the repository also update the board.

Is this the GitLab MCP server?

No. The agent calls the GitLab API with the team’s token. An external agent such as Claude Code, connected over MCP with an agent’s key, gets the same GitLab tools.

Does my GitLab need to be public?

No. Your It’s a Plan server calls it over https. If its address is private, name the host in SSRF_ALLOWED_HOSTS on that server.

Does the agent see my GitLab token?

No. It is stored encrypted on your server. The agent calls a tool by name and gets back only what the tool returns.

What does it cost?

The GitLab tools are free in the Community edition. You pay your AI provider for the model.

Give your first merge request to an agent

Try the free edition on your computer with one setup command.

Or deploy to Railway in one click

AGPL-3.0 · No per-seat fees · Use your own AI key or subscription