Connector guide11-minute read39 MCP tools7 languages

How to Connect GitLab to ChatGPT via MCP

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

HCBy HelpCode teamUpdated 11 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

GitLab

GitLab

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

tools

39

Region

INTL

Category

Infrastructure

Authentication

Bearer Token

Required env vars

GITLAB_URLGITLAB_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the GitLab in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Try asking

Example prompts for GitLab

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

GitLab · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → GitLab, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

GitLab + ChatGPT

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

GITLAB_URL, GITLAB_TOKEN

Step 1 — Get credentials

  1. In GitLab, click your avatar → Edit profile → Access → Personal access tokens → Generate token. On GitLab.com the page is at gitlab.com/-/user_settings/personal_access_tokens.
  2. Name the token (for example "AnythingMCP"), set an expiry date (at most 365 days on GitLab.com) and tick the scope api. For a read-only setup, tick read_api instead.
  3. Copy the token right away: GitLab shows it only once. It starts with glpat-.
  4. Paste the token into GITLAB_TOKEN, without the word Bearer. Set GITLAB_URL to https://gitlab.com for GitLab.com, or to the address of your self-managed or Dedicated instance as you open it in the browser (for example https://gitlab.example.com), without /api/v4 and without a trailing slash. Then install the connector.
  5. Start with gitlab_get_current_user: it shows which GitLab user the token belongs to and confirms the address is right. Then name a project by its path, such as my-group/my-project, or let the AI find it with gitlab_list_projects.

Token expiry and access: on GitLab.com a token lasts at most 365 days. When yours expires, generate a new one with the same scope and paste it into GITLAB_TOKEN again. The connector acts as the token's user: the AI sees and changes exactly what that user can. A fine-grained personal access token (GitLab 19.2 and later) works the same way: give it read and write permission on issues, merge requests, repository, pipelines and jobs for the projects involved. Some GitLab.com groups enforce fine-grained tokens, and a classic token then fails on their projects with "Access denied: This operation requires a fine-grained personal access token". Project and group access tokens work too, but on GitLab.com they need Premium or Ultimate.

Read-only setup: use a token with read_api and switch off gitlab_create_issue, gitlab_update_issue, gitlab_add_issue_note, gitlab_create_merge_request, gitlab_update_merge_request, gitlab_add_merge_request_note and gitlab_create_branch.

Switched off at install: gitlab_delete_issue, which deletes an issue for good (only project owners and administrators may, and closing it with gitlab_update_issue is usually what you want), and gitlab_delete_branch. Turn them on only if the AI should delete issues or branches.

Projects, issues and merge requests: the tools take a project by its numeric id or its full path, such as my-group/my-project. Issues and merge requests are addressed by the number GitLab shows (#42, !17), not by their global id. gitlab_list_project_members provides the user ids for assignees and reviewers. gitlab_list_my_issues and gitlab_list_my_merge_requests work across all projects and show the token user's own items by default, including merge requests waiting for their review.

Reviews, pipelines and code: to review a merge request, the AI reads gitlab_get_merge_request (merge status and conflicts), then gitlab_get_merge_request_diffs page by page, gitlab_list_merge_request_commits and gitlab_list_merge_request_notes. A file whose diff is too large comes back without its text; the AI then reads it with gitlab_get_file_content on the source branch. For a failed pipeline it goes from gitlab_list_pipelines to gitlab_list_pipeline_jobs (failed jobs only) to gitlab_get_job_log. Files and job logs are cut at 200 KB, keeping the beginning: open a longer log in GitLab. gitlab_search_project searches code inside one project on every tier; code search across the whole instance with gitlab_search needs advanced search, a Premium feature.

Confirm writes first: issues, comments, merge requests and branches are created under the token user's name. The AI shows you the title, text or branch first and waits for your confirmation. GitLab carries out quick actions in a comment, such as /label, /assign, /close, /approve or /merge, so the AI only includes them when you ask. Creating a branch needs Developer access.

Rate limits: GitLab.com allows about 2,000 API requests per minute per user, 200 new issues and 60 new comments per minute, and 100 searches per minute. On a self-managed instance the administrator sets the limits. Over a limit GitLab answers 429: wait and try again.

Common errors: 401 means the token is wrong, expired or revoked, or GITLAB_URL points at a different instance than the one that issued it. 403 means a missing scope (for example a read_api token on a write) or a role too low for the action. 404 means the project, issue or file does not exist or the user cannot see it: GitLab hides private resources behind 404. 400 names the missing or invalid field. 409 on a new merge request means one is already open for those branches. A renamed project still answers reads at its old path, but writes there fail with 405: use the new path or the numeric id.

The connector has no tools to merge or approve merge requests, push commits, edit files, or run, retry or cancel pipelines, and it does not cover CI/CD variables, releases, wikis, packages, the container registry or administration.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in ChatGPT

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

ChatGPT connects to MCP servers as custom apps in developer mode, available on paid plans (not on Free). On Business and Enterprise workspaces an admin may have to allow it first.

  1. In ChatGPT, open Settings → Security and login and turn on Developer mode.
  2. Go to chatgpt.com/plugins and click +.
  3. Enter a name and a short description, e.g. Name: GitLab.
  4. Under Connection, enter the MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID and create the connection.
  5. When ChatGPT asks, sign in to AnythingMCP (OAuth) and allow access.

Available tools

ToolWhat it does
gitlab_get_current_userGet the GitLab user the token belongs to: id, username, name, state, web_url and, for admins, is_admin
gitlab_list_projectsList projects the token can see, newest activity first by default: id, path_with_namespace, default_branch, web_url, visibility and…
gitlab_get_projectGet one project by id or path: default_branch, visibility, description, web_url, open_issues_count, permissions of the token's user, and…
gitlab_list_project_membersList the members of a project, including those inherited from its groups: user id, username, name and access_level (10 Guest, 15 Planner…
gitlab_list_labelsList a project's labels (including group labels): name, color, description and open issue and merge request counts
gitlab_list_issuesList a project's issues with filters: iid, title, state, labels, assignees, author, milestone, due_date, web_url
gitlab_list_my_issuesList issues across all projects: by default the ones assigned to the token's user, or the ones they created, or every issue they can see
gitlab_get_issueGet one issue by its iid: title, description (Markdown), state, labels, assignees, author, milestone, due_date, time stats, related merge…
gitlab_create_issueCreate an issue in a project
gitlab_update_issueChange an issue: title, description, labels (replace, add or remove), assignees, milestone, due date, or close or reopen it with state_event
gitlab_delete_issueDelete an issue for good
gitlab_list_issue_notesList the comments on an issue, newest first by default, including system notes (label and status changes, flagged system: true): id, body…
gitlab_add_issue_notePost a comment on an issue, as the token's user
gitlab_list_merge_requestsList a project's merge requests with filters: iid, title, state, draft, source and target branch, author, reviewers, labels, merge_status…
gitlab_list_my_merge_requestsList merge requests across all projects: by default the ones created by the token's user, or assigned to them, or waiting for their review…
gitlab_get_merge_requestGet one merge request by iid: title, description, state, draft, source and target branch, sha, detailed_merge_status (mergeable, conflict…
gitlab_get_merge_request_diffsGet the changed files of a merge request, page by page: old_path, new_path, new_file, renamed_file, deleted_file and the diff text of each
gitlab_list_merge_request_commitsList the commits of a merge request: id (SHA), short_id, title, message, author_name and created_at
gitlab_list_merge_request_notesList the comments on a merge request, including review comments on lines (with a position) and system notes: id, body, author, created_at…
gitlab_add_merge_request_notePost a general comment on a merge request, as the token's user
gitlab_create_merge_requestOpen a merge request from a source branch into a target branch
gitlab_update_merge_requestChange a merge request: title (add or remove the Draft: prefix), description, target branch, labels, assignees, reviewers, or close or…
gitlab_list_pipelinesList a project's CI/CD pipelines, newest first: id, iid, status, ref, sha, source, created_at, updated_at and web_url
gitlab_get_pipelineGet one pipeline: status, ref, sha, source, duration, queued_duration, coverage, user, started_at, finished_at and web_url
gitlab_list_pipeline_jobsList the jobs of a pipeline: id, name, stage, status, failure_reason, duration, runner, allow_failure and web_url
gitlab_get_jobGet one CI/CD job: name, stage, status, failure_reason, duration, started_at, finished_at, the commit, the pipeline, artifacts and web_url
gitlab_get_job_logRead the log (trace) of a CI/CD job as plain text, with ANSI color codes
gitlab_list_branchesList a project's branches: name, merged, protected, default, the last commit (id, title, author, date) and web_url
gitlab_get_branchGet one branch: its last commit, whether it is merged, protected or the default, and whether the user can push to it
gitlab_create_branchCreate a branch from a branch, tag or commit
gitlab_delete_branchDelete a branch
gitlab_list_commitsList commits of a branch, tag or the default branch, newest first: id (SHA), short_id, title, author_name, authored_date and web_url
gitlab_get_commitGet one commit by SHA, branch or tag name: message, author, committer, parent_ids, stats (additions, deletions), the last pipeline and…
gitlab_get_commit_diffGet the changes of one commit, page by page: old_path, new_path, new_file, renamed_file, deleted_file and the diff text per file
gitlab_list_repository_treeList files and folders in a repository folder: id (blob or tree SHA), name, type (blob = file, tree = folder), path and mode.…
gitlab_get_file_infoGet a file's metadata without its content: file_name, file_path, size, encoding, content_sha256, blob_id, commit_id and last_commit_id on…
gitlab_get_file_contentRead a file from the repository as text, at a branch, tag or commit (the default branch by default)
gitlab_searchSearch the whole instance (only what the token's user can see): projects, groups, issues, work_items, merge_requests, milestones, users or…
gitlab_search_projectSearch inside one project: code (blobs, with file name, path, line number and the matching lines), commits, issues, merge_requests…

Example prompts

  • "Which merge requests are waiting for my review across all projects, and which of them have conflicts or a failing pipeline?"
  • "Why did the latest pipeline on main in my-group/web-app fail? Show me the failed job and the error from its log."
  • "Summarize merge request !128 in my-group/web-app: what changed, in which files, and which review comments are still unresolved."
  • "Create an issue in my-group/web-app titled Checkout button misaligned on mobile, with the label bug, and assign it to Lena."

FAQ

Does the free ChatGPT plan work with custom MCP connectors? No. Custom MCP connections need developer mode, which is only on paid plans.

Next steps

Was this guide helpful?

Your GitLab agent is one click away.

Install the connector, paste the key, prompt ChatGPT. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect GitLab to Claude via MCP

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Connectors

How to Connect GitLab to Cursor via MCP

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Connectors

How to Connect GitLab to Gemini via MCP

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Connectors

How to Connect GitLab to Meta Muse via MCP

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Connectors

GitLab to MCP: Drive GitLab from any AI Agent

Let your AI work in GitLab: find projects, triage and update issues, review merge requests with their diffs and comments, check pipelines and read failing job logs, and read branches, commits and files. GitLab.com or your own GitLab instance, with a personal access token.

Connectors

How to Connect Canva to ChatGPT via MCP

Let your AI work in Canva: find and read designs, create new ones, export them to PDF, PNG, PowerPoint or video with download links, organise folders, upload images from a link, read brand templates and comment on designs.