gitlab
Built by Metorial, the integration platform for agentic AI.
gitlab
Server Summary
Manage GitLab repositories
Handle merge requests
Track issues and tasks
Search code repositories
Manage CI/CD pipelines
A comprehensive Model Context Protocol (MCP) server that provides seamless integration with GitLab's extensive API. This server enables AI assistants and applications to interact with GitLab repositories, manage issues and merge requests, search code, and perform a wide range of development workflow operations. Whether you're looking to automate repository management, streamline code reviews, or enhance project collaboration, this server provides the tools needed to work efficiently with GitLab.
The GitLab MCP server acts as a bridge between AI applications and GitLab's powerful platform, exposing a rich set of capabilities through the Model Context Protocol. It supports operations across the entire GitLab workflow including project management, repository operations, issue tracking, merge request handling, and team collaboration features. The server provides both read and write access, allowing you to query information, create and modify content, and manage your GitLab resources programmatically.
List accessible GitLab projects with comprehensive filtering options.
Parameters:
page (number, optional): Page number for pagination (minimum: 1, default: 1)per_page (number, optional): Number of results per page (1-100, default: 20)search (string, optional): Search query to filter projects by name or descriptionmembership (boolean, optional): Limit results to projects where you are a memberstarred (boolean, optional): Show only starred projectsvisibility (string, optional): Filter by visibility level (public, internal, or private)Search for projects by name or description with keyword matching.
Parameters:
query (string, required): Search query stringper_page (number, optional): Number of results per page (1-100, default: 20)Retrieve programming languages used in a project with percentage breakdowns.
Parameters:
projectId (string, required): Project ID or pathCreate a new file in a repository with full commit metadata.
Parameters:
projectId (string, required): Project ID or pathfilePath (string, required): Path for the new filecontent (string, required): File contentcommitMessage (string, required): Commit messagebranch (string, required): Target branch namestartBranch (string, optional): Source branch for creating a new branchauthorName (string, optional): Commit author nameauthorEmail (string, optional): Commit author emailUpdate an existing file in a repository.
Parameters:
projectId (string, required): Project ID or pathfilePath (string, required): Path to the filecontent (string, required): New file contentcommitMessage (string, required): Commit messagebranch (string, required): Target branch namestartBranch (string, optional): Source branch for creating a new branchauthorName (string, optional): Commit author nameauthorEmail (string, optional): Commit author emailRemove a file from a repository.
Parameters:
projectId (string, required): Project ID or pathfilePath (string, required): Path to the file to deletecommitMessage (string, required): Commit messagebranch (string, required): Target branch namestartBranch (string, optional): Source branch for creating a new branchauthorName (string, optional): Commit author nameauthorEmail (string, optional): Commit author emailSearch for code across projects with optional project-specific filtering.
Parameters:
query (string, required): Search queryprojectId (string, optional): Limit search to specific projectref (string, optional): Branch or tag name to search inper_page (number, optional): Number of results per page (1-100, default: 20)Get git blame information showing who last modified each line of a file.
Parameters:
projectId (string, required): Project ID or pathfilePath (string, required): Path to the fileref (string, optional): Branch or commit SHA (default: main)Compare two branches or commits to see differences.
Parameters:
projectId (string, required): Project ID or pathfrom (string, required): Source branch or commit SHAto (string, required): Target branch or commit SHAList issues for a project with extensive filtering capabilities.
Parameters:
projectId (string, required): Project ID or pathpage (number, optional): Page number (minimum: 1, default: 1)per_page (number, optional): Results per page (1-100, default: 20)state (string, optional): Filter by state (opened, closed, or all)search (string, optional): Search querylabels (string, optional): Comma-separated list of label namesauthorId (number, optional): Filter by author user IDassigneeId (number, optional): Filter by assignee user IDCreate a new issue in a project.
Parameters:
projectId (string, required): Project ID or pathtitle (string, required): Issue titledescription (string, optional): Issue descriptionlabels (string, optional): Comma-separated list of label namesassigneeIds (array of numbers, optional): User IDs to assignmilestoneId (number, optional): Milestone IDdueDate (string, optional): Due date in YYYY-MM-DD formatUpdate an existing issue with new information.
Parameters:
projectId (string, required): Project ID or pathissueIid (number, required): Issue IID (internal ID)title (string, optional): New titledescription (string, optional): New descriptionlabels (string, optional): Comma-separated list of label namesassigneeIds (array of numbers, optional): User IDs to assignmilestoneId (number, optional): Milestone IDdueDate (string, optional): Due date in YYYY-MM-DD formatstateEvent (string, optional): State change event (close or reopen)Close an open issue.
Parameters:
projectId (string, required): Project ID or pathissueIid (number, required): Issue IID (internal ID)Reopen a previously closed issue.
Parameters:
projectId (string, required): Project ID or pathissueIid (number, required): Issue IID (internal ID)Add a comment or note to an issue.
Parameters:
projectId (string, required): Project ID or pathissueIid (number, required): Issue IID (internal ID)body (string, required): Comment text contentSearch for issues across projects.
Parameters:
query (string, required): Search queryprojectId (string, optional): Limit search to specific projectstate (string, optional): Filter by state (opened, closed, or all)per_page (number, optional): Results per page (1-100, default: 20)List merge requests for a project with comprehensive filtering.
Parameters:
projectId (string, required): Project ID or pathpage (number, optional): Page number (minimum: 1, default: 1)per_page (number, optional): Results per page (1-100, default: 20)state (string, optional): Filter by state (opened, closed, locked, merged, or all)search (string, optional): Search querylabels (string, optional): Comma-separated list of label namesauthorId (number, optional): Filter by author user IDassigneeId (number, optional): Filter by assignee user IDsourceBranch (string, optional): Filter by source branch nametargetBranch (string, optional): Filter by target branch nameCreate a new merge request in a project.
Parameters:
projectId (string, required): Project ID or pathsourceBranch (string, required): Source branch nametargetBranch (string, required): Target branch nametitle (string, required): Merge request titledescription (string, optional): Merge request descriptionlabels (string, optional): Comma-separated list of label namesassigneeIds (array of numbers, optional): User IDs to assignmilestoneId (number, optional): Milestone IDremoveSourceBranch (boolean, optional): Remove source branch after mergeUpdate an existing merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)title (string, optional): New titledescription (string, optional): New descriptionlabels (string, optional): Comma-separated list of label namesassigneeIds (array of numbers, optional): User IDs to assignmilestoneId (number, optional): Milestone IDtargetBranch (string, optional): New target branchstateEvent (string, optional): State change event (close or reopen)removeSourceBranch (boolean, optional): Remove source branch after mergeAccept and merge a merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)mergeCommitMessage (string, optional): Custom merge commit messagesquash (boolean, optional): Squash commits on mergeshouldRemoveSourceBranch (boolean, optional): Remove source branch after mergeClose a merge request without merging.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)Reopen a previously closed merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)Add a comment or note to a merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)body (string, required): Comment text contentApprove a merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)Remove your approval from a merge request.
Parameters:
projectId (string, required): Project ID or pathmergeRequestIid (number, required): Merge request IID (internal ID)Create a new branch in a repository.
Parameters:
projectId (string, required): Project ID or pathbranch (string, required): Name of the new branchref (string, required): Source branch name or commit SHADelete a branch from a repository.
Parameters:
projectId (string, required): Project ID or pathbranch (string, required): Name of the branch to deleteProtect a branch from force pushes and deletion with access controls.
Parameters:
projectId (string, required): Project ID or pathbranch (string, required): Name of the branch to protectpushAccessLevel (string, optional): Push access level (0=No access, 30=Developer, 40=Maintainer)mergeAccessLevel (string, optional): Merge access level (0=No access, 30=Developer, 40=Maintainer)allowForcePush (boolean, optional): Allow force pushGet details of the currently authenticated user.
Parameters: None required
List all members of a project with their access levels.
Parameters:
projectId (string, required): Project ID or pathpage (number, optional): Page number (minimum: 1, default: 1)per_page (number, optional): Results per page (1-100, default: 20)The server provides resource templates for accessing GitLab data through URI-based requests:
Get details of a specific GitLab project including metadata, settings, and statistics.
URI Template: gitlab://project/{projectId}
Retrieve file content from a GitLab repository at a specific path.
URI Template: gitlab://project/{projectId}/file/{filePath}
Get directory listing showing files and subdirectories in a repository path.
URI Template: gitlab://project/{projectId}/tree/{path}
List all branches in a GitLab repository with commit information.
URI Template: gitlab://project/{projectId}/branches
Get commit history from a GitLab repository with detailed commit information.
URI Template: gitlab://project/{projectId}/commits
Get complete details of a specific issue including description, metadata, and status.
URI Template: gitlab://project/{projectId}/issue/{issueIid}
Retrieve all comments and notes associated with an issue.
URI Template: gitlab://project/{projectId}/issue/{issueIid}/notes
Get detailed information about a specific merge request including status and metadata.
URI Template: gitlab://project/{projectId}/merge-request/{mergeRequestIid}
Retrieve all comments and discussion notes on a merge request.
URI Template: gitlab://project/{projectId}/merge-request/{mergeRequestIid}/notes
Get the diff and changes for a merge request showing modified files and lines.
URI Template: gitlab://project/{projectId}/merge-request/{mergeRequestIid}/changes
This GitLab MCP server enables numerous powerful workflows:
The server's comprehensive API coverage makes it suitable for both simple queries and complex multi-step workflows, providing the flexibility needed for diverse GitLab integration scenarios.