gitlab-mcp
Allows AI assistants to access GitLab CI pipelines, job logs, repositories, branches, merge requests, and commits through the GitLab REST API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gitlab-mcp show the latest pipeline status for the main branch"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gitlab-mcp
MCP server for GitLab — gives AI assistants access to CI pipelines, job logs, repositories, branches, merge requests, and commits through the GitLab REST API.
Why
CI failures, pipeline status, and MR reviews are a constant context-switch. This server lets an AI assistant fetch job logs, retry failures, inspect diffs, and comment on MRs without the developer leaving their current task.
Related MCP server: qodev-gitlab-mcp
Tools
Pipelines & Jobs
Tool | Description |
| Recent pipelines with status |
| Pipeline summary + job breakdown |
| Jobs in a specific pipeline |
| Status of a single job |
| Raw log output (with |
| Block until a job reaches a terminal state |
| Retry a failed/cancelled job |
| Cancel a running job |
| Retry all failed jobs in a pipeline |
| Trigger a new pipeline on a ref |
Repositories & Branches
Tool | Description |
| Projects accessible to the token |
| Project metadata |
| Branches with latest commit |
| File contents at any ref |
| Commit log for a ref |
| Commit detail + diff stats |
Merge Requests
Tool | Description |
| Open/closed/merged MRs |
| Full MR detail |
| Open a new MR |
| Post a comment on an MR |
Configuration
Variable | Description |
| GitLab instance base URL |
| Personal or project access token |
| Default project path (e.g. |
|
|
| SSE listen address |
Run
pip install -e .
GITLAB_URL=https://gitlab.example.com GITLAB_TOKEN=... gitlab-mcpDeploy
Deployed as a systemd SSE service on Proteus. GitLab CI pushes on merge to main.
Available Tools
20 toolsgitlab_add_mr_noteB
Add a comment to a merge request.
Args: mr_iid: The merge request IID (e.g. 42 for !42). body: Comment text (markdown supported). project_path: GitLab project path, e.g. 'group/project'.
Inputs: body (required), mr_iid (required), project_path. Returns: result
gitlab_cancel_jobA
Cancel a running CI job.
Args: job_id: The numeric job ID to cancel. project_path: GitLab project path, e.g. 'group/project'.
Inputs: job_id (required), project_path. Returns: result
gitlab_create_merge_requestB
Create a new merge request.
Args: title: MR title. source_branch: Branch to merge from. target_branch: Branch to merge into. project_path: GitLab project path, e.g. 'group/project'. description: Optional MR description / body text. remove_source_branch: Delete source branch after merge (default False). squash: Squash commits on merge (default False).
Inputs: title (required), source_branch (required), target_branch (required), squash, +3 more. Returns: result
gitlab_get_commitB
Get details and diff stats for a specific commit.
Args: sha: Full or short commit SHA. project_path: GitLab project path, e.g. 'group/project'.
Inputs: sha (required), project_path. Returns: result
gitlab_get_fileA
Retrieve the contents of a file from the repository.
Args: file_path: Path to the file within the repo, e.g. 'src/main.py'. ref: Branch, tag, or commit SHA (default 'HEAD'). project_path: GitLab project path, e.g. 'group/project'.
Inputs: file_path (required), ref, project_path. Returns: result
gitlab_get_jobA
Get the current status of a GitLab CI job by ID.
Args: job_id: The numeric job ID (visible in the GitLab UI URL). project_path: GitLab project path, e.g. 'group/project'. Defaults to GITLAB_DEFAULT_PROJECT env var if not provided.
Inputs: job_id (required), project_path. Returns: result
gitlab_get_job_logA
Fetch the raw log output of a CI job.
Args: job_id: The numeric job ID. project_path: GitLab project path, e.g. 'group/project'. tail: Return only the last N lines (default 100, 0 = all lines).
Inputs: job_id (required), tail, project_path. Returns: result
gitlab_get_merge_requestA
Get details of a merge request by its project-level IID.
Args: mr_iid: The merge request IID (shown in the GitLab UI as !123). project_path: GitLab project path, e.g. 'group/project'.
Inputs: mr_iid (required), project_path. Returns: result
gitlab_get_pipelineA
Get the status and summary of a GitLab CI pipeline.
Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.
Inputs: pipeline_id (required), project_path. Returns: result
gitlab_get_projectB
Get metadata for a GitLab project.
Args: project_path: GitLab project path, e.g. 'group/project'.
Inputs: project_path. Returns: result
gitlab_list_branchesA
List branches in a project.
Args: project_path: GitLab project path, e.g. 'group/project'. search: Optional keyword to filter branch names. limit: Max branches to return (default 20, max 100).
Inputs: limit, search, project_path. Returns: result
gitlab_list_commitsA
List commits on a branch or ref.
Args: project_path: GitLab project path, e.g. 'group/project'. ref: Branch, tag, or commit SHA (default 'HEAD'). limit: Max commits to return (default 20, max 100).
Inputs: ref, limit, project_path. Returns: result
gitlab_list_jobsB
List all jobs in a specific pipeline with their statuses.
Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.
Inputs: pipeline_id (required), project_path. Returns: result
gitlab_list_merge_requestsA
List merge requests for a project.
Args: project_path: GitLab project path, e.g. 'group/project'. state: Filter by state: 'opened', 'closed', 'merged', or 'all' (default 'opened'). limit: Max MRs to return (default 20, max 100).
Inputs: limit, state, project_path. Returns: result
gitlab_list_pipelinesA
List the most recent pipelines for a project.
Args: project_path: GitLab project path, e.g. 'group/project'. limit: Number of pipelines to return (default 10, max 100).
Inputs: limit, project_path. Returns: result
gitlab_list_projectsA
List GitLab projects accessible to the authenticated user.
Args: search: Optional keyword to filter projects by name. limit: Max projects to return (default 20, max 100).
Inputs: limit, search. Returns: result
gitlab_poll_jobA
Poll a GitLab CI job until it reaches a terminal state.
Checks every interval_seconds and gives up after timeout_minutes. Returns the final job status summary.
Args: job_id: The numeric job ID. project_path: GitLab project path, e.g. 'group/project'. interval_seconds: How often to poll (default 30s). timeout_minutes: Stop polling after this many minutes (default 30).
Inputs: job_id (required), project_path, timeout_minutes, interval_seconds. Returns: result
gitlab_retry_jobA
Retry a failed or cancelled CI job.
Args: job_id: The numeric job ID to retry. project_path: GitLab project path, e.g. 'group/project'.
Inputs: job_id (required), project_path. Returns: result
gitlab_retry_pipelineC
Retry all failed jobs in a pipeline.
Args: pipeline_id: The numeric pipeline ID. project_path: GitLab project path, e.g. 'group/project'.
Inputs: pipeline_id (required), project_path. Returns: result
gitlab_trigger_pipelineA
Trigger a new CI pipeline on the given branch or tag.
Args: ref: Branch name, tag, or SHA to run the pipeline on. project_path: GitLab project path, e.g. 'group/project'. variables: Optional dict of CI variable key/value pairs to inject.
Inputs: ref (required), variables, project_path. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Each tool targets a distinct operation (e.g., get_job vs get_job_log vs poll_job are clearly different). No two tools have overlapping purposes; all are well-separated.
All tools follow the consistent pattern `gitlab_verb_noun` in snake_case. Examples: gitlab_create_merge_request, gitlab_get_job_log, gitlab_trigger_pipeline. No deviations.
20 tools cover a broad yet focused scope (projects, MRs, CI/CD, files, branches). Each tool serves a clear purpose without redundancy, making the set well-scoped for a GitLab integration.
Key operations are present (create/get/list MRs, CI triggers, job management), but missing write actions like merge/close MRs, create/update files, or manage branches. This leaves notable gaps for full lifecycle coverage.
Maintenance
Related MCP Connectors
Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProduction-ready MCP server providing GitLab integration with OAuth authentication, enabling AI assistants to manage projects, issues, merge requests, branches, files, and commits across GitLab instances.MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for GitLab integration, enabling AI assistants to manage projects, merge requests, pipelines, issues, releases, and more.MIT
- AlicenseCqualityBmaintenanceA production-ready MCP server for GitLab enabling AI assistants to read and manage GitLab projects, merge requests, issues, pipelines, wikis, releases, and more through a unified interface.2681,908 npm10MIT
- AlicenseAqualityCmaintenanceMCP server for GitLab REST API enabling AI agents to manage pipelines, merge requests, diffs, and local reviews.159 npmMIT