All integrations

GitLab

Projects, issues, merge requests, and CI pipelines on GitLab.com.

OAuth 36 tools

Overview

Give AI access to GitLab.com projects, issues, merge requests, repository files, and CI pipelines.

Prerequisites

  • A GitLab.com account
  • A stackgate.ai account

Getting credentials

Option A - OAuth (recommended when available)

  1. Open Integrations → GitLab in stackgate.ai.
  2. Click Activate, then Connect GitLab.
  3. Authorize stackgate.ai on GitLab.com (api scope).
  4. After redirect, use Edit tool access if you want a Read-only tool set.

Option B - Personal access token

  1. Open GitLab.com → Preferences → Access tokens.
  2. Create a token with read_api (read tools) or api (create and update issues, notes, and merge requests).
  3. Paste the token on Integrations → GitLab and save.

This integration is GitLab.com only. Self-managed GitLab instances are not supported.

Using with AI clients

  • Dedicated endpoint: POST /mcp/gitlab
  • Private gateway: gitlab__* tools

Troubleshooting

  • 401 from GitLab - reconnect OAuth or create a new personal access token. OAuth access tokens expire after two hours and refresh automatically when a refresh token is stored.
  • 403 from GitLab - the token may lack api for write tools, or your project role may be too low. Code search (search with scope=blobs) needs project_id; GitLab.com often forbids global blob search.
  • 405 from GitLab - accept_merge_request failed because the MR cannot be merged (conflicts, draft, or a failed pipeline).
  • 429 from GitLab - wait and reduce per_page. Search is throttled more aggressively.
  • Wrong issue or MR - use issue_iid / merge_request_iid from list tools, not the global id.

Available tools

  • get_me

    Get the connected GitLab user profile.

  • list_projects

    List GitLab.com projects the connected account is a member of.

  • get_project

    Get metadata for a single GitLab project.

  • list_groups

    List GitLab groups accessible to the connected account.

  • get_group

    Get metadata for a single GitLab group.

  • list_group_projects

    List projects in a GitLab group.

  • list_issues

    List issues in a GitLab project. State uses opened, not open.

  • get_issue

    Get a single GitLab issue by project-scoped issue_iid.

  • create_issue

    Create a new issue on a GitLab project.

  • update_issue

    Update an existing GitLab issue. Use state_event close or reopen to change state.

  • list_issue_notes

    List comments (notes) on a GitLab issue.

  • add_issue_note

    Add a comment to a GitLab issue.

  • list_merge_requests

    List merge requests in a GitLab project.

  • get_merge_request

    Get a single GitLab merge request by project-scoped merge_request_iid.

  • list_merge_request_changes

    List file diffs for a GitLab merge request.

  • list_merge_request_notes

    List comments (notes) on a GitLab merge request.

  • add_merge_request_note

    Add a comment to a GitLab merge request.

  • create_merge_request

    Create a merge request on a GitLab project.

  • update_merge_request

    Update a GitLab merge request. Use state_event close or reopen to change state.

  • accept_merge_request

    Merge an open GitLab merge request into the target branch. Confirm with the user first.

  • list_branches

    List branches for a GitLab project.

  • create_branch

    Create a branch in a GitLab project from an existing ref.

  • list_commits

    List commits for a GitLab project branch or SHA.

  • get_commit

    Get a single commit from a GitLab project.

  • compare_repository

    Compare two refs in a GitLab project (commits and diffs).

  • get_file

    Get a file from a GitLab repository. Content is base64-encoded.

  • list_tree

    List files and directories at a path in a GitLab repository.

  • list_tags

    List tags for a GitLab project.

  • list_releases

    List releases for a GitLab project.

  • list_pipelines

    List CI pipelines for a GitLab project.

  • get_pipeline

    Get a single GitLab CI pipeline.

  • list_pipeline_jobs

    List jobs for a GitLab CI pipeline.

  • list_labels

    List labels for a GitLab project.

  • list_milestones

    List milestones for a GitLab project.

  • list_project_members

    List members of a GitLab project (useful for assignee IDs).

  • search

    Search GitLab.com projects, issues, merge requests, or code. Pass project_id for scope=blobs; GitLab.com often forbids global code search.

MCP endpoint: https://stackgate.ai/mcp/gitlab (HTTP) or via the private gateway.