Skip to main content
The gitlab MCP adapter connects to the GitLab REST API v4. Use it to triage issues, create bug reports from workflow failures, and explore project metadata — on GitLab.com or self-managed instances.

Prerequisites

  • A GitLab account with access to the target projects or groups
  • A personal access token, group access token, or project access token with scopes such as api and read_api
  • For self-managed GitLab: the REST base URL for your instance (e.g. https://gitlab.example.com/api/v4)
  • project_contributor access in AgentRuntime

Connect in AgentRuntime

1

Create a GitLab access token

In GitLab, go to User Settings → Access Tokens (or create a group/project token). Grant at least read_api; add api if you need to create issues. Copy the token immediately — GitLab shows it only once.
2

Create a connection

Go to Connections and click New custom connection to create an API key connection with APIToken. For self-managed instances, also set BaseURL to your REST v4 base (e.g. https://gitlab.example.com/api/v4).
3

Add gitlab MCP instance

Go to MCP, click Add instance for gitlab, wire your connection on Instance config, set the profile active, and save.
4

Verify identity

Run mcp_callget_current_user and list_projects before wiring project IDs into workflows.
See Authentication for binding connections to MCP instances.

What you can build

  • Incident → issue — Workflow failure step captures error context → LLM formats a title and body → create_issue in the on-call project.
  • Release notes triagelist_issues with state=opened → LLM summarizes blockers → post summary to Slack or Notion.
  • Project discoverylist_projects with search → agent picks the correct project_id_or_path for downstream API calls.
  • Custom automationgitlab_api_call for merge requests, pipelines, or labels not covered by first-class tools.

Tools

Example

Create an issue when a workflow step fails:

Configuration

Troubleshooting