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
apiandread_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_call →
get_current_user and list_projects before wiring project IDs into workflows.What you can build
- Incident → issue — Workflow failure step captures error context → LLM formats a title and body →
create_issuein the on-call project. - Release notes triage —
list_issueswithstate=opened→ LLM summarizes blockers → post summary to Slack or Notion. - Project discovery —
list_projectswithsearch→ agent picks the correctproject_id_or_pathfor downstream API calls. - Custom automation —
gitlab_api_callfor merge requests, pipelines, or labels not covered by first-class tools.