GitLab
Projects, issues, merge requests, and CI pipelines on GitLab.com.
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)
- Open Integrations → GitLab in stackgate.ai.
- Click Activate, then Connect GitLab.
- Authorize stackgate.ai on GitLab.com (
apiscope). - After redirect, use Edit tool access if you want a Read-only tool set.
Option B - Personal access token
- Open GitLab.com → Preferences → Access tokens.
- Create a token with read_api (read tools) or api (create and update issues, notes, and merge requests).
- 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
apifor write tools, or your project role may be too low. Code search (searchwithscope=blobs) needsproject_id; GitLab.com often forbids global blob search. - 405 from GitLab -
accept_merge_requestfailed 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_iidfrom list tools, not the globalid.
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.