# GitLab — how to use (mcp.ai)

A web-based DevOps lifecycle tool that provides a Git repository manager providing wiki, issue-tracking, and CI/CD pipeline features.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_gitlab?ms=1781541720000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `gitlab_archive_project`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/gitlab`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/gitlab/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/gitlab/archive/project` — Tool to archive a project. use when you need to mark a project read-only after finishing active development. call after confirming no further changes are required.
  - body: { id: integer }
- `POST https://api.mcp.ai/api/gitlab/create/group` — Tool to create a new group in gitlab. use when you need to establish a new group for projects or collaboration.
  - body: { name: string, path: string, avatar?: string, parent_id?: integer, visibility?: string, description?: string, lfs_enabled?: boolean, default_branch?: string, emails_enabled?: boolean, membership_lock?: boolean, organization_id?: integer, duo_availability?: string, mentions_disabled?: boolean, wiki_access_level?: string, auto_devops_enabled?: boolean, share_with_group_lock?: boolean, project_creation_level?: string, request_access_enabled?: boolean, subgroup_creation_level?: string, two_factor_grace_period?: integer, enabled_git_access_protocol?: string, experiment_features_enabled?: boolean, shared_runners_minutes_limit?: integer, require_two_factor_authentication?: boolean, default_branch_protection_defaults?: object, extra_shared_runners_minutes_limit?: integer }
- `POST https://api.mcp.ai/api/gitlab/create/project` — Tool to create a new project in gitlab. implements post /projects endpoint.
  - body: { name: string, path: string, visibility?: string, description?: string, namespace_id?: integer, wiki_enabled?: boolean, default_branch?: string, issues_enabled?: boolean, snippets_enabled?: boolean, build_git_strategy?: string, merge_requests_enabled?: boolean, container_registry_enabled?: boolean }
- `POST https://api.mcp.ai/api/gitlab/create/project/issue` — Tool to create a new issue in a gitlab project. use when you need to report a bug, request a feature, or track a task within a specific project.
  - body: { id: string, iid?: integer, title: string, labels?: string, weight?: integer, epic_id?: integer, due_date?: string, epic_iid?: integer, created_at?: string, issue_type?: string, assignee_id?: integer, description?: string, assignee_ids?: integer[], confidential?: boolean, milestone_id?: integer, discussion_to_resolve?: string, merge_request_to_resolve_discussions_of?: integer }
- `POST https://api.mcp.ai/api/gitlab/create/repository/branch` — Tool to create a new branch in a project. use when you need to create a new branch from an existing branch or a specific commit in a gitlab project.
  - body: { ref: string, project_id: integer, branch_name: string }
- `POST https://api.mcp.ai/api/gitlab/delete/project` — Tool to delete a gitlab project by its id. use when you need to remove a project, either by marking it for later deletion or deleting it immediately.
  - body: { id: integer, full_path?: string, permanently_remove?: boolean }
- `POST https://api.mcp.ai/api/gitlab/download/project/avatar` — Tool to download a project’s avatar image. use when you need the raw avatar bytes after confirming the project exists.
  - body: { id: string }
- `POST https://api.mcp.ai/api/gitlab/erase/job` — Tool to erase the content of a specified job within a project. use when you need to remove job artifacts and logs.
  - body: { job_id: integer, project_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/commit/refs` — Tool to get all references (branches or tags) a commit is pushed to. use when you need to find out which branches or tags a specific commit belongs to in a gitlab project.
  - body: { sha: string, ref_type?: string, project_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/commit/sequence` — Tool to get the sequence number of a commit in a project by following parent links from the given commit. use when you need to determine the order of a commit in the project's history.
  - body: { sha: string, project_id: integer, first_parent?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/group` — Tool to retrieve information about a specific group by its id. use when you need to get details of a gitlab group.
  - body: { id: integer, with_projects?: boolean, with_custom_attributes?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/group/member` — Tool to retrieve details for a specific group member. use when you need to fetch membership information for a user in a group after you know both group id and user id.
  - body: { id: integer, user_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/groups` — Get groups
  - body: { page?: integer, sort?: string, owned?: boolean, search?: string, order_by?: string, per_page?: integer, statistics?: boolean, all_available?: boolean, skip_groups[]?: integer[], with_projects?: boolean, with_two_factor?: boolean, min_access_level?: integer, with_custom_attributes?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/job/details` — Tool to retrieve details of a single job by its id within a specified project. use this when you need to fetch specific information about a particular ci/cd job.
  - body: { job_id: integer, project_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/merge/request/notes` — Tool to fetch comments on a merge request. use when you need to retrieve all notes for a specific merge request.
  - body: { id: integer, page?: integer, per_page?: integer, merge_request_iid: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project` — Tool to get a single project by id or url-encoded path.
  - body: { id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project/languages` — Tool to list programming languages used in a project with percentages. use when you need the project language breakdown.
  - body: { id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project/member` — Tool to retrieve details for a specific project member. use after confirming project and user ids to fetch membership information for a project member.
  - body: { id: integer, user_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project/member/all` — Tool to retrieve details for a specific project member (including inherited and invited members). use when you need the effective membership info (including invitations and inheritance).
  - body: { id: integer, user_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project/merge/request/commits` — Tool to get commits of a merge request. use when you need to retrieve all commits associated with a specific merge request.
  - body: { id: integer, merge_request_iid: integer }
- `POST https://api.mcp.ai/api/gitlab/get/project/merge/requests` — Tool to retrieve a list of merge requests for a specific project. use when you need to get all merge requests associated with a project, with options to filter by state, labels, milestones, and other 
  - body: { id: integer, wip?: string, page?: integer, sort?: string, view?: string, scope?: string, state?: string, iids[]?: integer[], labels?: string, search?: string, approved?: string, order_by?: string, per_page?: integer, author_id?: integer, milestone?: string, not_filter?: object, assignee_id?: integer, environment?: string, reviewer_id?: integer, approver_ids?: integer[], created_after?: string, merge_user_id?: integer, source_branch?: string, target_branch?: string, updated_after?: string, created_before?: string, deployed_after?: string, updated_before?: string, approved_by_ids?: integer[], author_username?: string, deployed_before?: string, my_reaction_emoji?: string, reviewer_username?: string, merge_user_username?: string, with_labels_details?: boolean, with_merge_status_recheck?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/projects` — Tool to list all projects accessible to the authenticated user. supports filtering.
  - body: { page?: integer, sort?: string, owned?: boolean, search?: string, simple?: boolean, starred?: boolean, archived?: boolean, id_after?: integer, order_by?: string, per_page?: integer, id_before?: integer, membership?: boolean, statistics?: boolean, visibility?: string, min_access_level?: integer, with_issues_enabled?: boolean, with_custom_attributes?: boolean, with_programming_language?: string, with_merge_requests_enabled?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/projects/id/merge/requests/iid/diffs` — Tool to list all diff versions of a merge request. use when you need to inspect changes across different diff versions after creating or updating a merge request.
  - body: { id: integer, merge_request_iid: integer }
- `POST https://api.mcp.ai/api/gitlab/get/repository/branch` — Tool to retrieve information about a specific branch in a project. use when you need to get details for a single branch.
  - body: { project_id: integer, branch_name: string }
- `POST https://api.mcp.ai/api/gitlab/get/repository/branches` — Retrieves a list of repository branches for a project. use this when you need to get all branches or search for specific branches within a gitlab project.
  - body: { regex?: string, search?: string, project_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/single/commit` — Tool to get a specific commit identified by the commit hash or name of a branch or tag. use this when you need to retrieve detailed information about a single commit in a gitlab project repository.
  - body: { id: integer, sha: string, stats?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/single/pipeline` — Tool to retrieve details of a single pipeline by its id within a specified project. use when you need to get information about a specific ci/cd pipeline.
  - body: { project_id: integer, pipeline_id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/user` — Tool to retrieve information about a specific user by their id. use when you need to fetch details for a single gitlab user.
  - body: { id: integer }
- `POST https://api.mcp.ai/api/gitlab/get/user/preferences` — Tool to get the current user's preferences. use when you need to retrieve the user's diff display and ci identity jwt settings after authentication.
- `POST https://api.mcp.ai/api/gitlab/get/user/status` — Tool to get the current user's status. use when displaying or verifying the authenticated user's gitlab status after login.
- `POST https://api.mcp.ai/api/gitlab/get/user/support/pin` — Tool to get details of the current user's support pin. use when you need to retrieve the active support pin and its expiration for the authenticated user.
- `POST https://api.mcp.ai/api/gitlab/get/users` — Tool to retrieve a list of users from gitlab. use this when you need to find user information, search for specific users, or filter users based on various criteria like activity status or creation dat
  - body: { page?: integer, sort?: string, active?: boolean, admins?: boolean, humans?: boolean, search?: string, blocked?: boolean, auditors?: boolean, external?: boolean, order_by?: string, per_page?: integer, provider?: string, username?: string, skip_ldap?: boolean, extern_uid?: string, two_factor?: string, created_after?: string, created_before?: string, exclude_active?: boolean, exclude_humans?: boolean, exclude_external?: boolean, exclude_internal?: boolean, without_projects?: boolean, without_project_bots?: boolean }
- `POST https://api.mcp.ai/api/gitlab/get/users/id/status` — Tool to get a user's status by id. use when you need to retrieve a gitlab user's current status message, emoji, and availability after identifying their user id.
  - body: { user_id: integer }
- `POST https://api.mcp.ai/api/gitlab/import/project/members` — Tool to import members from one project to another. use when migrating members between projects.
  - body: { id: string, project_id: string }
- `POST https://api.mcp.ai/api/gitlab/list/all/group/members` — Tool to list all members of a group including direct, inherited, and invited members. use when you need a comprehensive membership list beyond direct members.
  - body: { id: integer, page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/all/project/members` — Tool to list all members of a project (direct, inherited, invited). use when you need the effective membership list including inherited and invited members.
  - body: { id: integer, page?: integer, query?: string, state?: string, per_page?: integer, user_ids?: integer[], show_seat_info?: boolean }
- `POST https://api.mcp.ai/api/gitlab/list/billable/group/members` — Tool to list billable members of a top-level group (including its subgroups and projects). use when generating billing reports; requires owner role on the group.
  - body: { id: integer, page?: integer, sort?: string, search?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/group/members` — Tool to list direct members of a group. use when you need to retrieve or filter a group's direct membership.
  - body: { id: integer, page?: integer, sort?: string, query?: string, active?: boolean, per_page?: integer, relations?: string[], skip_users?: integer[], two_factor?: string, include_inherited?: boolean }
- `POST https://api.mcp.ai/api/gitlab/list/pending/group/members` — Tool to list pending members of a group and its subgroups and projects. use when you need to review users awaiting approval or invited without an account. call after confirming the top-level group id.
  - body: { id: integer, page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/pipeline/jobs` — Tool to retrieve a list of jobs for a specified pipeline within a project. use this when you need to inspect the status or details of jobs associated with a particular ci/cd pipeline.
  - body: { id: integer, scope?: string, pipeline_id: integer, include_retried?: boolean }
- `POST https://api.mcp.ai/api/gitlab/list/project/groups` — Tool to list ancestor groups of a project. use when you need to retrieve all groups a project belongs to or is shared with.
  - body: { id: integer, page?: integer, search?: string, per_page?: integer, skip_groups?: integer[], with_shared?: boolean, shared_visible_only?: boolean, shared_min_access_level?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/project/invited/groups` — Tool to list groups invited to a project. use when auditing which groups have access to a project.
  - body: { id: integer, page?: integer, per_page?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/project/pipelines` — Tool to retrieve a list of pipelines for a specified project. use when you need to get information about ci/cd pipelines, such as their status, source, or creation/update times.
  - body: { id: integer, ref?: string, sha?: string, name?: string, page?: integer, sort?: string, scope?: string, source?: string, status?: string, order_by?: string, per_page?: integer, username?: string, yaml_errors?: boolean, created_after?: string, updated_after?: string, created_before?: string, updated_before?: string }
- `POST https://api.mcp.ai/api/gitlab/list/project/shareable/groups` — Tool to list groups that can be shared with a project. use before sharing a project to fetch eligible groups.
  - body: { id: integer, page?: integer, search?: string, per_page?: integer, skip_groups?: integer[] }
- `POST https://api.mcp.ai/api/gitlab/list/project/tags` — Tool to retrieve a list of repository tags for a specified project. use when you need to get all tags associated with a project in gitlab.
  - body: { id: integer, page?: integer, sort?: string, search?: string, order_by?: string, per_page?: integer }
- `POST https://api.mcp.ai/api/gitlab/list/project/transfer/locations` — Tool to list namespaces available for project transfer. use when you need to determine which groups a project can be transferred into.
  - body: { id: integer, search?: string }
- `POST https://api.mcp.ai/api/gitlab/list/project/users` — Tool to list users of a project. use after you have a project id and want to retrieve its users.
  - body: { id: string, search?: string, skip_users?: integer[] }
- `POST https://api.mcp.ai/api/gitlab/list/repository/commits` — Tool to get a list of repository commits in a project. use when you need to retrieve commit history for a specific project, branch, or time range.
  - body: { all?: boolean, path?: string, order?: string, since?: string, until?: string, author?: string, ref_name?: string, trailers?: boolean, project_id: integer, with_stats?: boolean, first_parent?: boolean }
- `POST https://api.mcp.ai/api/gitlab/list/user/projects` — Tool to list projects owned by a specific user. use after obtaining target user identity to fetch owned projects.
  - body: { id: integer, page?: integer, sort?: string, owned?: boolean, search?: string, simple?: boolean, starred?: boolean, archived?: boolean, id_after?: integer, order_by?: string, per_page?: integer, id_before?: integer, membership?: boolean, statistics?: boolean, visibility?: string, updated_after?: string, updated_before?: string, min_access_level?: integer, with_issues_enabled?: boolean, with_custom_attributes?: boolean, with_programming_language?: string, with_merge_requests_enabled?: boolean }
- `POST https://api.mcp.ai/api/gitlab/post/user/support/pin` — Tool to create a support pin for your authenticated user. use when gitlab support requests a pin to verify your identity.
- `POST https://api.mcp.ai/api/gitlab/put/user/preferences` — Tool to update the current user's preferences. use when adjusting default diff viewing and ci identity settings.
  - body: { view_diffs_file_by_file: boolean, show_whitespace_in_diffs: boolean, pass_user_identities_to_ci_jwt: boolean }
- `POST https://api.mcp.ai/api/gitlab/set/user/status` — Tool to set the current user's status. use when you need to update availability or convey current mood on gitlab.
  - body: { emoji?: string, message?: string, clear_status_after?: string }
- `POST https://api.mcp.ai/api/gitlab/share/project/with/group` — Tool to share a project with a group. use when you need to grant a group specific access level to a project.
  - body: { id: integer, group_id: integer, expires_at?: string, group_access: integer }
- `POST https://api.mcp.ai/api/gitlab/start/project/housekeeping` — Tool to start the housekeeping task for a project. use when you need to trigger manual maintenance or pruning on a repository.
  - body: { id: integer, task?: string }

## More
- Page: https://mcp.ai/gitlab
- Agent spec (llms.txt): https://mcp.ai/gitlab/llms.txt
- Postman collection: https://mcp.ai/gitlab/postman.json
