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.
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.
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
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.
Setup
- 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.
- 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, tickread_apiinstead. - Copy the token right away: GitLab shows it only once. It starts with
glpat-. - Paste the token into
GITLAB_TOKEN, without the word Bearer. SetGITLAB_URLtohttps://gitlab.comfor GitLab.com, or to the address of your self-managed or Dedicated instance as you open it in the browser (for examplehttps://gitlab.example.com), without/api/v4and without a trailing slash. Then install the connector. - 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 asmy-group/my-project, or let the AI find it withgitlab_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.
Prerequisites: GITLAB_URL, GITLAB_TOKEN
Install the connector locally
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
Open http://localhost:3000/connectors/store, pick GitLab and paste in the env vars listed under Prerequisites.
Available tools
| Tool | What it does |
|---|---|
gitlab_get_current_user | Get the GitLab user the token belongs to: id, username, name, state, web_url and, for admins, is_admin |
gitlab_list_projects | List projects the token can see, newest activity first by default: id, path_with_namespace, default_branch, web_url, visibility and… |
gitlab_get_project | Get 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_members | List the members of a project, including those inherited from its groups: user id, username, name and access_level (10 Guest, 15 Planner… |
gitlab_list_labels | List a project's labels (including group labels): name, color, description and open issue and merge request counts |
gitlab_list_issues | List a project's issues with filters: iid, title, state, labels, assignees, author, milestone, due_date, web_url |
gitlab_list_my_issues | List 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_issue | Get one issue by its iid: title, description (Markdown), state, labels, assignees, author, milestone, due_date, time stats, related merge… |
gitlab_create_issue | Create an issue in a project |
gitlab_update_issue | Change an issue: title, description, labels (replace, add or remove), assignees, milestone, due date, or close or reopen it with state_event |
gitlab_delete_issue | Delete an issue for good |
gitlab_list_issue_notes | List the comments on an issue, newest first by default, including system notes (label and status changes, flagged system: true): id, body… |
gitlab_add_issue_note | Post a comment on an issue, as the token's user |
gitlab_list_merge_requests | List a project's merge requests with filters: iid, title, state, draft, source and target branch, author, reviewers, labels, merge_status… |
gitlab_list_my_merge_requests | List 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_request | Get one merge request by iid: title, description, state, draft, source and target branch, sha, detailed_merge_status (mergeable, conflict… |
gitlab_get_merge_request_diffs | Get 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_commits | List the commits of a merge request: id (SHA), short_id, title, message, author_name and created_at |
gitlab_list_merge_request_notes | List 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_note | Post a general comment on a merge request, as the token's user |
gitlab_create_merge_request | Open a merge request from a source branch into a target branch |
gitlab_update_merge_request | Change a merge request: title (add or remove the Draft: prefix), description, target branch, labels, assignees, reviewers, or close or… |
gitlab_list_pipelines | List a project's CI/CD pipelines, newest first: id, iid, status, ref, sha, source, created_at, updated_at and web_url |
gitlab_get_pipeline | Get one pipeline: status, ref, sha, source, duration, queued_duration, coverage, user, started_at, finished_at and web_url |
gitlab_list_pipeline_jobs | List the jobs of a pipeline: id, name, stage, status, failure_reason, duration, runner, allow_failure and web_url |
gitlab_get_job | Get 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_log | Read the log (trace) of a CI/CD job as plain text, with ANSI color codes |
gitlab_list_branches | List a project's branches: name, merged, protected, default, the last commit (id, title, author, date) and web_url |
gitlab_get_branch | Get one branch: its last commit, whether it is merged, protected or the default, and whether the user can push to it |
gitlab_create_branch | Create a branch from a branch, tag or commit |
gitlab_delete_branch | Delete a branch |
gitlab_list_commits | List 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_commit | Get one commit by SHA, branch or tag name: message, author, committer, parent_ids, stats (additions, deletions), the last pipeline and… |
gitlab_get_commit_diff | Get 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_tree | List files and folders in a repository folder: id (blob or tree SHA), name, type (blob = file, tree = folder), path and mode.… |
gitlab_get_file_info | Get 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_content | Read a file from the repository as text, at a branch, tag or commit (the default branch by default) |
gitlab_search | Search the whole instance (only what the token's user can see): projects, groups, issues, work_items, merge_requests, milestones, users or… |
gitlab_search_project | Search 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."
Next steps
Was this guide helpful?