Skip to main content
The GitLab app provides read/write access to the GitLab DevOps platform via its REST v4 API. It can be used either as a Builder app (automations call GitLab instructions directly) or as a remote MCP server consumed by an Knowledges agent — covering projects, issues, merge requests, pipelines, branches, commits, releases, CI/CD variables, deploy keys, webhooks, wikis, groups and users. Supports both static Personal Access Tokens and OAuth2 authorization-code per-user delegation.

Project Management

Projects, issues, merge requests, labels, milestones and wikis

CI/CD & DevOps

Pipelines, jobs, environments, CI variables, deploy keys and webhooks

Flexible Auth

Static PAT shared across the tenant, or OAuth2 per-user delegation (each user signs in with their own GitLab account)

Prerequisites

  • A GitLab account (gitlab.com or self-hosted)
  • Either a Personal Access Token with api scope (Preferences > Access Tokens), or an OAuth application registered at User Settings > Applications (https://gitlab.com/-/user_settings/applications) with api scope
  • Base URL (default: https://gitlab.com/api/v4 — override for self-hosted instances)

Installation

  1. Go to Apps in your workspace
  2. Search for GitLab and install it
  3. Open the app instance configuration and fill in the required fields

Configuration

MCP Endpoint and MCP API Key are generated automatically by the onInstall flow and are only needed to expose this instance as an MCP server (see the next tab).

Available Instructions

Every instruction resolves credentials from the workspace configuration.

Projects

Issues

Merge Requests

Branches

Commits

Tags

Releases

Pipelines & Jobs

Environments

Labels

Milestones

Wiki

Webhooks

CI/CD Variables

Deploy Keys

Project Members

Users

Groups

Arguments flagged with * are required.

DSUL Examples

List the user’s own projects

Create an issue with labels and an assignee

Open a merge request from a feature branch

Trigger a pipeline on a specific ref


Error Handling

Common Issues

“Not configured” — The app instance has no API key. Generate one at the provider and paste it in the app configuration. “Invalid API key” (MCP) — The mcp-api-key header does not match the central app secret. Reinstall the app instance to regenerate a signed key. “Credentials lookup failed” — The MCP endpoint could not reach the getConfig webhook of the installed app. Verify that the app instance is still installed in the expected workspace. “Can’t approve own MR” — A GitLab project access token’s bot user counts as the MR author and cannot approve its own merge requests. Use a different token (PAT for a human user) for the approval step. “pipeline creation 404” — The target ref has no .gitlab-ci.yml at its root. Either commit a CI config first or pick a ref that has one. OAuth per-user delegation — Each GitLab user must click the connect tool once (from the AI agent) to authorize; the agent stores a per-user refresh token. Use disconnect to revoke.

External Resources

GitLab REST API

Official GitLab REST v4 API reference

Tool Agents

Plug MCP servers into Knowledges agents