gitlab
Built by Metorial, the integration platform for agentic AI.
gitlab
Server Summary
Manage GitLab projects
Review code changes
Track issues
Handle merge requests
A comprehensive Model Context Protocol (MCP) server that provides seamless integration with GitLab's API, enabling AI assistants to interact with GitLab projects, repositories, issues, merge requests, and more. This server bridges the gap between AI capabilities and GitLab's powerful development platform, allowing for automated workflows, intelligent code analysis, and streamlined project management directly through conversational interfaces.
The GitLab MCP server transforms how you interact with GitLab by providing a rich set of tools and resources that can be accessed through AI assistants. Whether you need to search across projects, manage issues and merge requests, manipulate repository files, or analyze code changes, this server provides the comprehensive functionality required for modern software development workflows. It handles authentication, API communication, and data formatting, allowing AI assistants to seamlessly perform GitLab operations on your behalf.
List accessible GitLab projects with optional filters including search queries, visibility levels (public, internal, private), membership status, and starred projects. Supports pagination with configurable page size (1-100 results per page).
Search for projects by name or description using a query string. Returns paginated results with up to 100 projects per page.
Retrieve programming language statistics for a specific project, showing the distribution of languages used in the codebase.
Compare two branches or commits within a project to view differences, additions, and deletions between them. Requires project ID and source/target branch or commit references.
Perform code searches across projects with optional project-specific filtering and branch/tag references. Supports pagination and returns matching code snippets with context.
Retrieve git blame information for a specific file, showing line-by-line authorship and commit information. Defaults to the main branch but accepts custom branch or commit references.
Create a new file in a repository with specified content, commit message, and branch. Supports custom author information and the ability to create new branches from existing ones.
Update an existing file's content with a new commit. Requires project ID, file path, new content, commit message, and target branch. Supports custom author attribution.
Remove a file from a repository with a commit message explaining the deletion. Supports branch targeting and custom author information.
List issues for a project with extensive filtering options including state (opened, closed, all), labels, author, assignee, and search queries. Fully paginated with configurable results per page.
Create a new issue in a project with a title and optional description, labels, assignees, milestone, and due date. Returns the created issue with its assigned IID.
Modify an existing issue's properties including title, description, labels, assignees, milestone, due date, and state. Supports bulk updates in a single operation.
Close an open issue by project ID and issue IID (internal ID). Changes the issue state to closed.
Reopen a previously closed issue, returning it to an open state for continued work.
Add a comment or note to an issue for collaboration and discussion. Requires project ID, issue IID, and comment body text.
Search for issues across projects using query strings with optional state filtering and project-specific scoping. Returns paginated results.
List merge requests for a project with comprehensive filtering by state (opened, closed, locked, merged, all), labels, author, assignee, source branch, target branch, and search queries. Supports pagination.
Create a new merge request specifying source and target branches, title, and optional description, labels, assignees, milestone, and source branch removal preference.
Update merge request properties including title, description, labels, assignees, milestone, target branch, and state. Allows comprehensive modification of existing merge requests.
Accept and merge a merge request with optional commit squashing and custom merge commit messages. Can automatically remove the source branch after merging.
Close a merge request without merging it, preserving the source branch and marking the merge request as closed.
Reopen a previously closed merge request to resume review and allow merging.
Add comments or notes to merge requests for code review discussions and collaboration.
Approve a merge request, indicating the code changes meet quality standards and are ready for merging.
Remove a previous approval from a merge request if concerns arise or further changes are needed.
Create a new branch in a repository from an existing branch or commit SHA. Requires the new branch name and reference point.
Delete a branch from a repository permanently. Use with caution as this operation cannot be undone.
Apply branch protection rules to prevent force pushes and accidental deletions. Configure push and merge access levels (no access, developer, maintainer) and force push allowances.
Retrieve details about the currently authenticated user including username, email, and permission levels.
List all members of a project with their roles and access levels. Supports pagination for projects with many members.
Access detailed information about a specific GitLab project including description, visibility, statistics, and configuration.
Retrieve the content of a specific file from a repository. The file path should be URL-encoded for paths containing special characters.
Get a directory listing showing files and subdirectories at a specific path in the repository tree. Useful for browsing repository structure.
List all branches in a repository with their latest commit information and protection status.
Access the commit history for a repository with commit messages, authors, timestamps, and changed files.
Retrieve complete details of a specific issue including description, comments, labels, assignees, and state.
Access all comments and notes associated with an issue in chronological order.
Get comprehensive information about a merge request including description, reviewers, approvals, and pipeline status.
Retrieve all comments and discussion threads on a merge request.
Access the complete diff showing all code changes in a merge request including additions, deletions, and modifications.
This MCP server enables a wide range of GitLab automation and enhancement scenarios:
The GitLab MCP server empowers AI assistants to become active participants in your development workflow, providing intelligent assistance while maintaining full integration with GitLab's robust platform.