# GitLab — Pipedream Connect

> GitLab is the most comprehensive AI-powered DevSecOps Platform.

- API slug: `gitlab` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Developer Tools
- Website: https://about.gitlab.com/
- Managed OAuth scopes: `api` · `read_user` · `read_repository` · `write_repository` · `read_registry` · `sudo` · `openid` · `profile` · `email`
- This page (HTML): https://pipedream.com/apps/gitlab
- Tools: 28 actions · 10 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: gitlab`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "gitlab",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Approve Merge Request:
const result = await mcp.callTool({
  name: "gitlab-approve-merge-request",
  arguments: {
    projectId: "Project",
    mergeRequestIid: 10,
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a GitLab endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "gitlab-approve-merge-request",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    gitlab: { authProvisionId: "apn_xxxxxxx" },
    projectId: "Project",
    mergeRequestIid: 10,
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (28)

### `gitlab-approve-merge-request` — Approve Merge Request (Write)

Approve a merge request as the authenticated user, or withdraw an earlier approval by setting Action to unapprove. Call Get Merge Request first to check the merge request is actually ready — its readiness rollup reports the pipeline status, conflicts and how many approvals are still required — and…

Full schema: https://pipedream.com/apps/gitlab/actions/approve-merge-request.md

### `gitlab-create-branch` — Create Branch (Write)

Create a new branch in the repository. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/create-branch.md

### `gitlab-create-epic` — Create Epic (Write)

Creates a new epic. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/create-epic.md

### `gitlab-create-issue` — Create issue (Write)

Creates a new issue. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/create-issue.md

### `gitlab-create-merge-request` — Create Merge Request (Write)

Open a new merge request from one branch into another. Use this for "open an MR", "raise a merge request", "submit my branch for review". Both branches must already exist in the project — use List Repo Branches to check, or Create Branch to make one. Reviewers and assignees are given as usernames…

Full schema: https://pipedream.com/apps/gitlab/actions/create-merge-request.md

### `gitlab-create-merge-request-comment` — Create Merge Request Comment (Write)

Post a comment on a merge request. It works in three modes, chosen by which props you set: leave File Path and Discussion ID blank for a plain comment on the merge request as a whole; set File Path plus a line number to open an inline thread anchored to that line of the diff; or set Discussion ID…

Full schema: https://pipedream.com/apps/gitlab/actions/create-merge-request-comment.md

### `gitlab-create-merge-request-review` — Create Merge Request Review (Write)

Submit a whole review on a merge request in one step: any number of inline comments anchored to lines of the diff, an overall summary comment, and optionally an approval. This is the tool for "review this MR" — call Get Merge Request and Get Merge Request Diffs first to read the changes, then send…

Full schema: https://pipedream.com/apps/gitlab/actions/create-merge-request-review.md

### `gitlab-get-issue` — Get Issue (Read-only)

Gets a single issue from repository. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/get-issue.md

### `gitlab-get-merge-request` — Get Merge Request (Read-only)

Get a single merge request together with a readiness rollup that answers "can this be merged?" in one call — state, draft flag, detailed_merge_status, conflict flag, whether blocking threads are resolved, head pipeline status, and the approval count with who has approved. Use this to open or…

Full schema: https://pipedream.com/apps/gitlab/actions/get-merge-request.md

### `gitlab-get-merge-request-commits` — Get Merge Request Commits (Read-only)

List the commits contained in a merge request, newest first. Use this to understand how a change was built up — whether it is one clean commit or a long history to squash, who wrote each part, and what the commit messages claim. For the actual code changes call Get Merge Request Diffs instead; for…

Full schema: https://pipedream.com/apps/gitlab/actions/get-merge-request-commits.md

### `gitlab-get-merge-request-diffs` — Get Merge Request Diffs (Read-only)

List the file-level changes in a merge request — each changed file's path, whether it was added, deleted or renamed, and its unified diff. This is the tool to call before reviewing, approving or commenting on a merge request: the new_path values and the line numbers inside each diff hunk are what…

Full schema: https://pipedream.com/apps/gitlab/actions/get-merge-request-diffs.md

### `gitlab-get-repo-branch` — Get Repo Branch (Read-only)

Get a single project repository branch. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/get-repo-branch.md

### `gitlab-list-commits` — List Commits (Read-only)

List commits in a repository branch. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/list-commits.md

### `gitlab-list-group-id-options` — List Group ID Options (Read-only)

Retrieves available options for the Group ID field.

Full schema: https://pipedream.com/apps/gitlab/actions/list-group-id-options.md

### `gitlab-list-group-path-options` — List Group Path Options (Read-only)

Retrieves available options for the Group Path field.

Full schema: https://pipedream.com/apps/gitlab/actions/list-group-path-options.md

### `gitlab-list-groups` — List Groups (Read-only)

List all groups. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/list-groups.md

### `gitlab-list-merge-request-discussions` — List Merge Request Discussions (Read-only)

List the comment threads on a merge request — both general comments and inline threads anchored to lines of the diff. Use this to read existing review feedback before adding your own, to find what a reviewer objected to, or to get the id of a thread so you can reply to it with Create Merge Request…

Full schema: https://pipedream.com/apps/gitlab/actions/list-merge-request-discussions.md

### `gitlab-list-merge-requests` — List Merge Requests (Read-only)

List merge requests, filtered by project, group, state, author, assignee, reviewer, labels or target branch. Use this for any "what merge requests are …" question — open MRs in a project, MRs waiting on my review (set Scope to reviews_for_me), MRs assigned to me, MRs targeting a release branch. Use…

Full schema: https://pipedream.com/apps/gitlab/actions/list-merge-requests.md

### `gitlab-list-project-id-options` — List Project ID Options (Read-only)

Retrieves available options for the Project ID field.

Full schema: https://pipedream.com/apps/gitlab/actions/list-project-id-options.md

### `gitlab-list-project-labels` — List Project Labels (Read-only)

List the labels defined in a project. Call this before applying labels with Create Merge Request: GitLab creates a label it does not recognize rather than rejecting it, so an invented or mis-cased name silently adds a new project label instead of applying the intended one. Each result's name is the…

Full schema: https://pipedream.com/apps/gitlab/actions/list-project-labels.md

### `gitlab-list-project-members` — List Project Members (Read-only)

List all members of a project. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/list-project-members.md

### `gitlab-list-projects` — List Projects (Read-only)

List or search GitLab projects, optionally filtering by search term, membership, or ownership. Use this to discover projects (and their IDs) before acting on them with other GitLab actions. Supports ordering by name, path, creation/update time, star count, last activity, or search similarity, plus…

Full schema: https://pipedream.com/apps/gitlab/actions/list-projects.md

### `gitlab-list-repo-branches` — List Repo Branches (Read-only)

Get a list of repository branches from a project. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/list-repo-branches.md

### `gitlab-resolve-merge-request-thread` — Resolve Merge Request Thread (Write)

Mark a merge request thread as resolved, or reopen a resolved one by setting Resolved to false. Use this after acting on a piece of review feedback — resolving threads is what clears a merge request's blocking_discussions_resolved flag so it can merge. Get the Discussion ID from List Merge Request…

Full schema: https://pipedream.com/apps/gitlab/actions/resolve-merge-request-thread.md

### `gitlab-search-issues` — Search Issues (Read-only)

Search for issues in a repository with a query. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/search-issues.md

### `gitlab-search-merge-requests` — Search Merge Requests (Read-only)

Find merge requests whose title or description matches a search term. Use this when the user refers to a merge request by what it is about ("the MR about the Redis cache refactor", "the payments migration MR") rather than by number - it is the fastest way to turn a description into the iid that…

Full schema: https://pipedream.com/apps/gitlab/actions/search-merge-requests.md

### `gitlab-update-epic` — Update Epic (Write)

Updates an epic. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/update-epic.md

### `gitlab-update-issue` — Update Issue (Write)

Updates an existing project issue. See the documentation

Full schema: https://pipedream.com/apps/gitlab/actions/update-issue.md

## Triggers (10)

### `gitlab-new-commit` — New Commit (Instant) (Instant)

Emit new event when a new commit is pushed to a branch

Full schema: https://pipedream.com/apps/gitlab/triggers/new-commit.md

### `gitlab-new-branch` — New Branch (Instant) (Instant)

Emit new event when a new branch is created

Full schema: https://pipedream.com/apps/gitlab/triggers/new-branch.md

### `gitlab-new-project` — New Project (Polling)

Emit new event when a project (i.e. repository) is created

Full schema: https://pipedream.com/apps/gitlab/triggers/new-project.md

### `gitlab-new-audit-event` — New Audit Event (Instant) (Instant)

Emit new event when a new audit event is created

Full schema: https://pipedream.com/apps/gitlab/triggers/new-audit-event.md

### `gitlab-new-commit-comment` — New Commit Comment (Instant) (Instant)

Emit new event when a commit receives a comment

Full schema: https://pipedream.com/apps/gitlab/triggers/new-commit-comment.md

### `gitlab-new-issue` — New Issue (Instant) (Instant)

Emit new event when an issue is created in a project

Full schema: https://pipedream.com/apps/gitlab/triggers/new-issue.md

### `gitlab-new-mention` — New Mention (Instant) (Instant)

Emit new event when you are @mentioned in a new commit, comment, issue or pull request

Full schema: https://pipedream.com/apps/gitlab/triggers/new-mention.md

### `gitlab-new-merge-request` — New Merge Request (Instant) (Instant)

Emit new event when a merge request is created

Full schema: https://pipedream.com/apps/gitlab/triggers/new-merge-request.md

### `gitlab-new-milestone` — New Milestone (Polling)

Emit new event when a milestone is created in a project

Full schema: https://pipedream.com/apps/gitlab/triggers/new-milestone.md

### `gitlab-new-review-request` — New Review Request (Instant) (Instant)

Emit new event when a reviewer is added to a merge request

Full schema: https://pipedream.com/apps/gitlab/triggers/new-review-request.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
