GitLab MCP Server
The GitLab MCP Server is a TypeScript-based Model Context Protocol server that provides comprehensive GitLab integration for AI assistants, enabling management of projects, issues, merge requests, pipelines, and repositories through natural language commands.
Projects: List and search projects with filtering by ownership, visibility, and search terms; get detailed project information with optional simplified views for token efficiency
Issues: List, view, and create issues with filtering by state, scope, labels, author, and assignee; search by title and description; manage descriptions and milestones
Merge Requests: Complete lifecycle management including listing, creating, and updating MRs; filter by state, author, assignee, scope, and branches; manage title, description, labels, assignees, reviewers, and state (close/reopen); set merge options (auto-merge when pipeline succeeds, squash commits, remove source branch); mark as draft or ready for review
Code Review: Create comments, threaded discussions, and inline code comments; resolve/unresolve discussions
CI/CD Pipelines: List, create, retry, cancel, and delete pipelines with filtering by status, branch, SHA, username, and dates; manage pipeline variables
Jobs & Logs: List jobs within pipelines with status filtering; retrieve full job logs and traces with advanced options (partial logs, tail mode, line limits, raw format)
Repository: List branches with search capability; get commit history with filtering by date range, author, and branch/tag
User Management: Retrieve current authenticated user information
Additional Features: Supports both GitLab.com and self-hosted instances; fully typed TypeScript implementation; pagination support; token-optimized responses
Provides comprehensive integration with GitLab's REST API, enabling interaction with projects, issues, merge requests, pipelines, jobs, branches, commits, and user information. Allows listing, creating, and managing GitLab resources with complete type safety.
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 Serverlist my open merge requests"
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 Server
A fully typed TypeScript Model Context Protocol (MCP) server for comprehensive GitLab integration.
Quick Start
1. Get a GitLab Token
Create a GitLab Personal Access Token with api, read_user, and read_repository scopes.
2. Add to Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@alosies/gitlab-mcp-server"],
"env": {
"NPM_CONFIG_TOKEN": "your-gitlab-token-here"
}
}
}
}3. Start Using
Ask Claude things like:
"List my GitLab projects"
"Show me open issues in myproject"
"Create a merge request from feature-branch to main"
"Comment on MR #42 in myproject"
"Show me MRs where I'm assigned as reviewer"
"Mark MR #15 as ready for review"
"Get the logs for job #123"
Related MCP server: GitLab MCP Server
Features
Projects: List, get details
Issues: List, get, create
Merge Requests: List, get, create, update with full review workflow support
Comments & Discussions: Create notes, threaded discussions, inline code comments
Review Management: Resolve/unresolve discussions, mark as draft/ready
Filtering: Filter by reviewer, assignee, author
Templates: Use GitLab MR templates for descriptions
Pipelines: List, get, create, retry, cancel, delete
Jobs: List jobs, get logs with advanced trace options
Repository: List branches, get commits
User: Get current user info
TypeScript: Fully typed with comprehensive type definitions
Documentation
Installation Guide - Detailed installation options and setup
Available Tools - Complete list of tools and parameters
Configuration - Optional configuration file setup
Usage Examples - Real-world usage examples and workflows
TypeScript Guide - TypeScript usage and type definitions
Development - Contributing and development setup
Self-Hosted GitLab
For self-hosted GitLab instances, add your base URL:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@alosies/gitlab-mcp-server"],
"env": {
"NPM_CONFIG_TOKEN": "your-token",
"GITLAB_BASE_URL": "https://gitlab.mycompany.com"
}
}
}
}Support
Issues: GitHub Issues
GitLab API: GitLab API Documentation
MCP Protocol: Model Context Protocol
License
MIT License
Available Tools
50 toolsapprove_mrB
Approve a merge request. The authenticated user must have permission to approve.
Inputs: project_id (required), merge_request_iid (required), sha, approval_password.
cancel_pipelineB
Cancel a running pipeline
Inputs: project_id (required), pipeline_id (required).
create_issueC
Create a new issue
Inputs: title (required), project_id (required), labels, description, +2 more.
create_merge_requestC
Create a new merge request
Inputs: title (required), project_id (required), source_branch (required), target_branch (required), +5 more.
create_mr_discussionA
Create a new discussion on a merge request. Can be a general discussion or an inline comment on the diff. Supports embedding images/files via attachments parameter.
Inputs: body (required), project_id (required), merge_request_iid (required), position, +1 more.
create_mr_discussion_noteB
Add a new note to an existing merge request discussion thread
Inputs: body (required), project_id (required), discussion_id (required), merge_request_iid (required).
create_mr_noteA
Add a new top-level comment to a merge request. Supports embedding images/files via attachments parameter.
Inputs: body (required), project_id (required), merge_request_iid (required), attachments.
create_pipelineD
Create a new pipeline
Inputs: ref (required), project_id (required), variables.
delete_mr_discussion_noteC
Delete a note from a merge request discussion
Inputs: note_id (required), project_id (required), discussion_id (required), merge_request_iid (required).
delete_mr_noteA
Delete a top-level note (comment) from a merge request
Inputs: note_id (required), project_id (required), merge_request_iid (required).
delete_pipelineC
Delete a pipeline
Inputs: project_id (required), pipeline_id (required).
get_branch_diffsB
Get the changes/diffs between two branches or commits in a GitLab project
Inputs: to (required), from (required), project_id (required), straight.
get_commitB
Get details of a specific commit
Inputs: sha (required), project_id (required), stats.
get_commit_diffB
Get changes/diffs of a specific commit
Inputs: sha (required), project_id (required).
get_issueB
Get details of a specific issue
Inputs: issue_iid (required), project_id (required).
get_job_logsB
Get the log (trace) file of a specific job
Inputs: job_id (required), project_id (required).
get_job_traceB
Get job trace with options for partial logs, tail mode, and line limits
Inputs: job_id (required), project_id (required), raw, tail, +1 more.
get_merge_requestA
Get details of a merge request. Either merge_request_iid or source_branch must be provided.
Inputs: project_id (required), source_branch, merge_request_iid.
get_merge_request_diffsB
Get the changes/diffs of a merge request. Either merge_request_iid or source_branch must be provided.
Inputs: project_id (required), view, source_branch, merge_request_iid.
get_mr_approvalsA
Get the approval status of a merge request, including who has approved, how many approvals are needed, and approval rules.
Inputs: project_id (required), merge_request_iid (required).
get_mr_templateB
Get a specific merge request description template by name
Inputs: name (required), project_id (required).
get_pipelineB
Get details of a specific pipeline
Inputs: project_id (required), pipeline_id (required).
get_pipeline_variablesB
Get variables of a pipeline
Inputs: project_id (required), pipeline_id (required).
get_projectC
Get details of a specific project
Inputs: project_id (required).
get_project_commitsB
List repository commits with filtering options
Inputs: project_id (required), all, page, path, +9 more.
get_userA
Get current user information
Inputs: no named parameters.
list_issuesC
List issues in a project
Inputs: project_id (required), scope, state, labels, +4 more.
list_merge_request_diffsA
List merge request diffs with pagination support. Either merge_request_iid or source_branch must be provided.
Inputs: project_id (required), page, unidiff, per_page, +2 more.
list_merge_requestsC
List merge requests in a project
Inputs: project_id (required), scope, state, search, +7 more.
list_mr_discussionsA
List discussions (threaded comments including inline code comments) on a merge request. Use unresolved_only=true to fetch only unresolved discussions (saves tokens).
Inputs: project_id (required), merge_request_iid (required), page, per_page, +1 more.
list_mr_notesA
List all notes (comments) on a merge request
Inputs: project_id (required), merge_request_iid (required), page, sort, +2 more.
list_mr_templatesA
List available merge request description templates in a project
Inputs: project_id (required).
list_pipeline_jobsB
List jobs in a pipeline
Inputs: project_id (required), pipeline_id (required), scope, include_retried.
list_pipelinesB
List pipelines in a project
Inputs: project_id (required), ref, sha, name, +8 more.
list_project_branchesB
List branches in a project
Inputs: project_id (required), search, per_page.
list_project_labelsA
List all labels available in a project. Useful for discovering valid label names before adding them to issues or merge requests.
Inputs: project_id (required), search, with_counts, include_ancestor_groups.
list_projectsA
List GitLab projects with minimal info by default (to reduce token usage from 40k+ to much less). Use simple=false for full project details when needed.
Inputs: owned, search, simple, per_page, +1 more.
list_project_uploadsB
List files that have been uploaded to a project
Inputs: project_id (required).
mark_mr_as_draftA
Mark a merge request as draft (work in progress, not ready for review)
Inputs: project_id (required), merge_request_iid (required).
mark_mr_as_readyA
Mark a merge request as ready (remove draft status, ready for review)
Inputs: project_id (required), merge_request_iid (required).
reply_to_mr_discussionB
Reply to an existing discussion thread on a merge request
Inputs: body (required), project_id (required), discussion_id (required), merge_request_iid (required).
resolve_mr_discussionB
Mark a discussion on a merge request as resolved
Inputs: project_id (required), discussion_id (required), merge_request_iid (required).
retry_pipelineB
Retry a failed pipeline
Inputs: project_id (required), pipeline_id (required).
unapprove_mrB
Remove your approval from a merge request.
Inputs: project_id (required), merge_request_iid (required).
unresolve_mr_discussionA
Mark a discussion on a merge request as unresolved
Inputs: project_id (required), discussion_id (required), merge_request_iid (required).
update_merge_requestA
Update an existing merge request. Either merge_request_iid or source_branch must be provided.
Inputs: project_id (required), title, labels, squash, +12 more.
update_mr_discussion_noteB
Modify an existing merge request discussion note
Inputs: body (required), note_id (required), project_id (required), discussion_id (required), +1 more.
update_mr_labelsA
Add or remove labels from a merge request. More convenient than update_merge_request for label-only changes.
Inputs: project_id (required), merge_request_iid (required), add_labels, remove_labels.
update_mr_noteA
Update the content of an existing top-level note (comment) on a merge request. Supports embedding images/files via attachments parameter.
Inputs: body (required), note_id (required), project_id (required), merge_request_iid (required), +1 more.
upload_project_fileA
Upload a file to a GitLab project. Returns a markdown string and URL that can be embedded in MR comments, issue descriptions, etc.
Inputs: file (required), project_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 50 tools
Most tools are clearly separated by resource (projects, issues, MRs, pipelines, commits). However, there is some overlap between get_merge_request_diffs and list_merge_request_diffs, and between get_job_logs and get_job_trace, which could cause confusion.
The naming mostly follows a consistent verb_noun pattern (list_, get_, create_, update_, delete_). Minor deviations include mark_mr_as_draft/mark_mr_as_ready and approve_mr/unapprove_mr, which are still readable but slightly inconsistent with the dominant pattern.
50 tools is on the heavy side, but the server covers a broad GitLab domain (projects, issues, MRs, branches, commits, pipelines, users). The count is justified by the scope, though it borders on overwhelming and could benefit from consolidation.
The tool surface is quite comprehensive for GitLab workflows: project listing/creation, issue CRUD, MR lifecycle with discussions/approvals, pipelines, commits, and branches. Minor gaps include no project deletion/update, no issue update/delete, and no branch creation/deletion, but core workflows are well covered.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
A TypeScript MCP server for Home Assistant, enabling programmatic management of entities, automati…
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Related MCP Servers
- -licenseAqualityBmaintenanceMCP Server for the GitLab API, enabling project management, file operations, and more.95,398 npm91,812MIT
- AlicenseCqualityDmaintenanceAn MCP server that enables communication with GitLab repositories, allowing interaction with GitLab's API to manage projects, issues, and repositories through natural language.45189,695 npm1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for the GitLab API that enables comprehensive project management, file operations, and issue tracking. It supports automated branch creation, batch file pushes, and interaction with merge requests and CI/CD logs.MIT
- FlicenseNot gradedqualityDmaintenanceHTTP-based MCP server for GitLab API, enabling project management, issue tracking, merge requests, and file operations through natural language.-