Gitlab

Connect AI Agents to
Gitlab

Automate workflows and connect AI agents to Gitlab. Metorial is built for developers. Handling OAuth, compliance, observability, and more.

Gitlab on Metorial

The GitLab integration lets you interact with your repositories, issues, merge requests, and pipelines directly through natural language commands. Use it to search code, review MRs, update issue statuses, check CI/CD pipeline results, and manage your GitLab projects without leaving your workflow.

Deploy on Metorial

Combine Gitlab with other tools

Metorial has 600+ integrations available. Here are some related ones you might find interesting.

Hackernews

Hackernews

The Hackernews integration lets you search and retrieve stories, comments, and user data from Hackernews directly within your workflow, enabling you to analyze trends, monitor discussions, and gather insights from the tech community.

Exa

Exa

The Exa integration lets you search the web using neural search capabilities and retrieve high-quality, AI-ready content directly within your MCP-enabled applications.

Slack

Slack

The Slack integration lets you read messages, send messages to channels and users, and manage your workspace directly from your AI assistant. Use it to stay connected with your team, search conversation history, and automate routine Slack tasks without leaving your workflow.

Google Calendar

Google Calendar

The Google Calendar integration lets you view, create, and manage calendar events directly from your workflow, enabling seamless scheduling and time management without switching contexts.

Google Drive

Google Drive

The Google Drive integration lets you search, read, create, and manage files and folders in your Drive directly through AI interactions. Use it to organize documents, retrieve file contents, share files, and automate common Drive tasks without switching to your browser.

Microsoft 356

Microsoft 356

The Microsoft 365 integration lets you access and manage your emails, calendar events, documents, and collaborate across Word, Excel, PowerPoint, and Teams directly from your workspace. Use it to read and send messages, schedule meetings, edit files in OneDrive and SharePoint, and streamline your productivity workflows.

Neon

Neon

The Neon integration lets you connect to your Neon Postgres databases to query data, inspect schemas, and manage database operations directly from your AI assistant.

Supabase

Supabase

The Supabase integration lets you query and manage your database, authentication, and storage directly from your AI assistant, enabling natural language database operations and real-time data access.

Linear

Linear

The Linear integration lets you create, update, and search issues directly from your workspace, enabling seamless project management and task tracking without leaving your development environment.

Connect anything. Anywhere.

Supported tools and capabilities

Metorial helps you connect AI agents to Gitlab with various tools and resources. Tools allow you to interact with perform specific actions, while resources provide read-only access to data and information.

Help & Documentation

Find guides and articles to help you get started with Gitlab on Metorial.

More about Gitlab

GitLab MCP Server

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.

Overview

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.

Features

Project Management

  • Search and discover projects across your GitLab instance
  • Filter projects by visibility, membership, and starred status
  • Access detailed project information and statistics
  • Analyze programming languages used in projects
  • Manage project members and access levels

Repository Operations

  • Browse repository file structures and directory trees
  • Read, create, update, and delete files with full commit control
  • Compare branches and commits to understand code differences
  • Create and manage branches with protection rules
  • Access complete commit history and git blame information
  • Search code across projects with advanced filters

Issue Tracking

  • List, search, and filter issues with multiple criteria
  • Create new issues with full metadata support
  • Update existing issues including state, assignees, labels, and milestones
  • Close and reopen issues with proper state management
  • Add comments and notes to facilitate collaboration
  • Search issues across multiple projects

Merge Request Management

  • List and filter merge requests by state, branch, author, and assignee
  • Create merge requests with comprehensive configuration options
  • Update merge request metadata and target branches
  • Approve or unapprove merge requests
  • Merge requests with squash and branch cleanup options
  • Add comments and participate in code review discussions
  • Close and reopen merge requests as needed

Advanced Code Analysis

  • Search code across repositories with branch/tag targeting
  • View git blame information to track code authorship
  • Compare branches to understand divergence
  • Access detailed diff information for merge requests

Tools

list_projects

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_projects

Search for projects by name or description using a query string. Returns paginated results with up to 100 projects per page.

get_project_languages

Retrieve programming language statistics for a specific project, showing the distribution of languages used in the codebase.

compare_branches

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.

search_code

Perform code searches across projects with optional project-specific filtering and branch/tag references. Supports pagination and returns matching code snippets with context.

get_file_blame

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_file

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_file

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.

delete_file

Remove a file from a repository with a commit message explaining the deletion. Supports branch targeting and custom author information.

list_issues

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_issue

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.

update_issue

Modify an existing issue's properties including title, description, labels, assignees, milestone, due date, and state. Supports bulk updates in a single operation.

close_issue

Close an open issue by project ID and issue IID (internal ID). Changes the issue state to closed.

reopen_issue

Reopen a previously closed issue, returning it to an open state for continued work.

add_issue_comment

Add a comment or note to an issue for collaboration and discussion. Requires project ID, issue IID, and comment body text.

search_issues

Search for issues across projects using query strings with optional state filtering and project-specific scoping. Returns paginated results.

list_merge_requests

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_merge_request

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

Update merge request properties including title, description, labels, assignees, milestone, target branch, and state. Allows comprehensive modification of existing merge requests.

merge_merge_request

Accept and merge a merge request with optional commit squashing and custom merge commit messages. Can automatically remove the source branch after merging.

close_merge_request

Close a merge request without merging it, preserving the source branch and marking the merge request as closed.

reopen_merge_request

Reopen a previously closed merge request to resume review and allow merging.

add_merge_request_comment

Add comments or notes to merge requests for code review discussions and collaboration.

approve_merge_request

Approve a merge request, indicating the code changes meet quality standards and are ready for merging.

unapprove_merge_request

Remove a previous approval from a merge request if concerns arise or further changes are needed.

create_branch

Create a new branch in a repository from an existing branch or commit SHA. Requires the new branch name and reference point.

delete_branch

Delete a branch from a repository permanently. Use with caution as this operation cannot be undone.

protect_branch

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.

get_current_user

Retrieve details about the currently authenticated user including username, email, and permission levels.

list_project_members

List all members of a project with their roles and access levels. Supports pagination for projects with many members.

Resource Templates

gitlab://project/{projectId}

Access detailed information about a specific GitLab project including description, visibility, statistics, and configuration.

gitlab://project/{projectId}/file/{filePath}

Retrieve the content of a specific file from a repository. The file path should be URL-encoded for paths containing special characters.

gitlab://project/{projectId}/tree/{path}

Get a directory listing showing files and subdirectories at a specific path in the repository tree. Useful for browsing repository structure.

gitlab://project/{projectId}/branches

List all branches in a repository with their latest commit information and protection status.

gitlab://project/{projectId}/commits

Access the commit history for a repository with commit messages, authors, timestamps, and changed files.

gitlab://project/{projectId}/issue/{issueIid}

Retrieve complete details of a specific issue including description, comments, labels, assignees, and state.

gitlab://project/{projectId}/issue/{issueIid}/notes

Access all comments and notes associated with an issue in chronological order.

gitlab://project/{projectId}/merge-request/{mergeRequestIid}

Get comprehensive information about a merge request including description, reviewers, approvals, and pipeline status.

gitlab://project/{projectId}/merge-request/{mergeRequestIid}/notes

Retrieve all comments and discussion threads on a merge request.

gitlab://project/{projectId}/merge-request/{mergeRequestIid}/changes

Access the complete diff showing all code changes in a merge request including additions, deletions, and modifications.

Use Cases

This MCP server enables a wide range of GitLab automation and enhancement scenarios:

  • Automated Code Review: AI assistants can analyze merge requests, examine diffs, and provide intelligent feedback on code changes.
  • Issue Management: Create, update, and organize issues based on natural language descriptions and project context.
  • Code Search and Discovery: Find relevant code snippets, functions, or implementations across multiple projects quickly.
  • Repository Navigation: Browse repository structures and read file contents without leaving your AI interface.
  • Project Insights: Analyze project languages, commit history, and team activity to understand codebase health.
  • Workflow Automation: Automate repetitive tasks like branch creation, file updates, and merge request approvals.
  • Collaborative Development: Facilitate team communication through automated commenting and issue tracking.

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.

Ready to build with Metorial?

Let's take your AI-powered applications to the next level, together.

About Metorial

Metorial provides developers with instant access to 600+ MCP servers for building AI agents that can interact with real-world tools and services. Built on MCP, Metorial simplifies agent tool integration by offering pre-configured connections to popular platforms like Google Drive, Slack, GitHub, Notion, and hundreds of other APIs. Our platform supports all major AI agent frameworks—including LangChain, AutoGen, CrewAI, and LangGraph—enabling developers to add tool calling capabilities to their agents in just a few lines of code. By eliminating the need for custom integration code, Metorial helps AI developers move from prototype to production faster while maintaining security and reliability. Whether you're building autonomous research agents, customer service bots, or workflow automation tools, Metorial's MCP server library provides the integrations you need to connect your agents to the real world.

Star us on GitHub