EvergreenDocs

Use GitLab with Evergreen

Install Evergreen on a GitLab group so sessions can work in your repositories, and optionally let the agent read GitLab through GitLab's own MCP server.

  • Owner · Admin

GitLab appears in the Integrations list twice, and the two entries do different jobs.

Entry What it does Who sets it up
GitLab Your code host. Sessions clone your repositories, push branches, and open merge requests through it. An Owner or Admin installs Evergreen on a GitLab group. Then each person connects their own GitLab account.
GitLab Duo MCP GitLab’s own MCP server. The agent reads projects, issues, merge requests, and pipelines as you. An Owner or Admin installs it. Then each person connects.

GitLab Duo MCP is separate from connecting GitLab as a code host. You can use either one without the other, and a team that wants sessions to open merge requests needs the code host.

GitLab as your code host

Before you begin

  • You’re an Owner or Admin of your Evergreen workspace.
  • You own a top-level group on your GitLab. Evergreen installs on a group, and the install uses your own GitLab authorization.
  • On a self-managed GitLab, you can add an application in its admin area, or a GitLab admin is ready to do it for you.

Install Evergreen on a group

  1. Open Integrations

    In Evergreen, open Workspace settings › Integrations, find GitLab, and choose Install.

  2. Tell Evergreen which GitLab you use

    On the Your GitLab step, enter the address. It’s https://gitlab.com unless your organization runs its own instance. Use the host with no path, like https://gitlab.example.com.

    On a self-managed instance, register an application in GitLab first. Open Admin area › Applications, or your group’s Settings › Applications, and add an application. Give it the redirect URI the step shows, tick Confidential, and choose the api and write_repository scopes. Then paste its Application ID and Secret into the step.

  3. Install on a group

    Choose Connect GitLab to sign in with your own account. Evergreen uses that authorization to install on a group you own. Pick the group and choose Install. Evergreen adds its bot and a webhook to the group, and it renews the bot’s token itself, so nobody has to paste or renew a key.

  4. Choose who can use it

    Pick Everyone, Selected audiences, or Only me, then finish the install.

For the scopes and the redirect URI, see Use GitLab instead in Connect your code.

api write_repository
https://gitlab.example.com

Connect your own account

Each person connects their own GitLab account once, Admins included. Go to Settings › Integrations, find GitLab, and choose Connect. A session then acts in GitLab as the person who connected.

Where Evergreen is installed on a group, it also has a bot there. Sessions use the bot in a group wherever a person hasn’t connected their own account.

Manage the installation

Choose Manage on the GitLab entry. The Groups tab lists each group Evergreen is installed on, with its bot or the reason there isn’t one. Choose Install on a group to add another group, Reinstall to repair one, or Remove to take Evergreen off a group. Removing a group revokes the bot’s token and deletes the webhook where GitLab allows it.

Remove on the Overview tab uninstalls Evergreen from all your groups. It disconnects people’s GitLab accounts, and your GitLab address and application are deleted too. If you add GitLab again, setup starts over.

If you change the address to a different GitLab host, people’s GitLab connections are forgotten, because the old application goes with it. They connect again on the new host.

What the agent asks before changing things

Sessions work on a branch and open a merge request for your reviewers. Start in Plan to approve what the agent intends to do before it edits. See Pull requests for what happens after a session opens one.

Limits

  • Evergreen installs only on a top-level group that you own.
  • On a GitLab plan without group access tokens, Evergreen can’t create a bot. Sessions then act as each person who connected their own account. If the plan has no group webhooks either, each project gets its own webhook the first time a session uses it.
  • Evergreen renews the bot’s token before it expires. If GitLab refuses a renewal, the group shows Needs attention and Evergreen tells whoever installed it and the Admins.

GitLab’s own MCP server

GitLab Duo MCP lets the agent read GitLab while it works on a task, for example to read the issue behind a change or the log of a failing job. It’s separate from the code host above. It doesn’t clone, push, or open merge requests.

What the agent can do

  • Search projects, issues, merge requests, and code.
  • Read issues and merge requests with their discussions and diffs.
  • Read pipelines and job logs.
  • Create issues and comment on merge requests when you ask.

Changes are attributed to you, and the agent has the permissions of your GitLab account.

Connect it

  1. Install it

    An Owner or Admin opens Workspace settings › Integrations, finds GitLab Duo MCP, and chooses Install. It reads Signs in on its own, so there’s nothing to copy.

  2. Sign in

    Choose Sign in as yourself. GitLab opens, you approve the request, and you come back to Evergreen.

  3. Choose who can use it

    Pick who can connect, then finish the install. Each person then goes to Settings › Integrations, finds GitLab Duo MCP, and chooses Connect.

Note

GitLab’s MCP server is in beta. It needs GitLab Duo beta features turned on for your group.

By default, the integration reaches GitLab.com. For a self-managed GitLab, an Owner or Admin can change MCP server URL in the integration’s settings on the Overview tab of Manage.

What it asks before changing things

While the agent plans, it reads. Creating an issue or commenting on a merge request becomes available once you approve the plan, or from the start if you skip the plan, and the agent is told to do either only when the task asks. Owners and Admins can block any tool for everyone on the Tools tab.

Limits

  • It’s GitLab’s beta, so what it offers can change on GitLab’s side.
  • It acts only with what your own GitLab account can see and do.

Troubleshooting

What you see What to do
Enter the address as https:// and the host, with no path Remove anything after the host from the address, such as /group, and try again.
Give your GitLab’s Application ID and Secret to continue Your GitLab needs its own application for Evergreen. Register it in GitLab with the redirect URI the step shows, then paste its details.
You don’t own any top-level groups on this GitLab Create a top-level group, or ask the owner of a group to install Evergreen on it.
Your GitLab plan doesn’t include group access tokens Evergreen has no bot there. Sessions act as each person who connected their own account, so everyone needs to connect on Settings › Integrations.
A group shows Needs attention Choose Reinstall on the group in Manage › Groups.
People can’t connect after you changed the GitLab address Their old connections went with the old application. Ask them to choose Connect again.
GitLab Duo MCP connects but the agent can’t use it GitLab’s MCP server needs GitLab Duo beta features turned on for your group. Ask a group owner to check.
There’s no Install button Only Owners and Admins install integrations. Ask one of them, or choose Request.

Last updated

Esc