Connect to AI
DevOps Bearer Token

GitLab REST API

Complete DevOps platform REST API for CI/CD automation

GitLab's REST API provides comprehensive access to repositories, CI/CD pipelines, issue tracking, and project management. Developers use it to automate DevOps workflows, integrate GitLab with external tools, and build custom applications on top of GitLab's complete DevOps platform. The API supports everything from repository operations to advanced pipeline orchestration and security scanning.

Base URL https://gitlab.com/api/v4

API Endpoints

MethodEndpointDescription
GET/projectsList all projects accessible to the authenticated user
GET/projects/:idGet details of a specific project by ID or URL-encoded path
POST/projectsCreate a new project with specified configuration
GET/projects/:id/repository/commitsList commits in a project repository, filtered by ref_name or date range. Returns commit SHA, message, and author details.
GET/projects/:id/pipelinesList CI/CD pipelines for a project, filtered by status or ref. Returns pipeline ID, status, and SHA.
POST/projects/:id/pipelineTrigger a new CI/CD pipeline run for a specified ref. Returns the created pipeline ID and status.
GET/projects/:id/pipelines/:pipeline_id/jobsList jobs in a specific pipeline, including job name, status, and stage. Requires pipeline_id in the path.
GET/projects/:id/merge_requestsList merge requests for a project, filtered by state or author. Returns MR IID, title, and source branch.
POST/projects/:id/merge_requestsCreate a new merge request with source_branch and target_branch. Returns the created MR IID and web URL.
PUT/projects/:id/merge_requests/:merge_request_iid/mergeAccept and merge a merge request identified by merge_request_iid. Optionally removes source branch after merge.
GET/projects/:id/issuesList issues for a project, filtered by state, labels, or assignee. Returns issue IID, title, and status.
POST/projects/:id/issuesCreate a new issue in a project with title and description. Returns the created issue IID and web URL.
GET/usersList all users in the GitLab instance, including username, email, and state. Admin access may show additional details.
GET/groupsList all groups accessible to the authenticated user, including group ID, name, and visibility level.
GET/projects/:id/repository/branchesList all branches in a project repository, returning branch name, commit SHA, and protected status.

Code Examples

curl --header "PRIVATE-TOKEN: glpat-xxxxxxxxxxxxxxxxxxxx" \
  "https://gitlab.com/api/v4/projects/12345/pipelines" \
  | jq '.[] | {id: .id, status: .status, ref: .ref}'

Use GitLab from Claude / Cursor / ChatGPT

Get a hosted MCP endpoint for GitLab. Paste your GitLab API key, copy back one URL, drop it into Claude Desktop, Cursor, or any AI client that supports remote MCP. Your AI calls GitLab directly with your credentials — no local install, works on mobile.

trigger_gitlab_pipeline Trigger a CI/CD pipeline run for a specific project and branch with optional variables
create_merge_request Create a merge request from source to target branch with title, description, and assignees
get_pipeline_status Check the status of running pipelines and retrieve job logs for debugging
manage_project_issues Create, update, and search issues across GitLab projects with filtering and labeling
analyze_repository_metrics Retrieve commit history, contributor statistics, and code quality metrics for projects

Connect in 60 seconds

Paste your GitLab key → get an MCP URL → paste into Claude/Cursor. Hosted by IOX, encrypted at rest.

Connect GitLab to your AI →

Related APIs