GitLab MCP server

OfficialGitLabConfig last verified Jun 1, 2026

GitLab's official, built-in remote MCP server for issues, merge requests, pipelines, and code search via OAuth.

The GitLab MCP Server is GitLab's official, first-party integration, built directly into the GitLab platform rather than shipped as a separate package. It exposes a remote MCP endpoint on your instance at /api/v4/mcp (use gitlab.com for SaaS) so an agent can act on real GitLab data: creating and reading issues, opening and inspecting merge requests with their commits and diffs, driving CI/CD pipelines and reading job output, commenting on work items, and searching across the instance including semantic code search.

Authentication is handled with OAuth 2.0, and the server supports Dynamic Client Registration so a connecting AI tool can register itself as an OAuth application on first use and receive a scoped access token - no manual app setup required. The recommended connection is the HTTP transport pointed straight at the endpoint; for clients that cannot speak remote MCP yet, GitLab documents a local stdio bridge using the mcp-remote proxy. Because these tools can read your source and act on your behalf, GitLab warns to use them only on objects you trust and to guard against prompt injection.

Quick install

Copy-paste configs are provided for all 8 supported clients. Pick your client below.

Add to ~/.claude.json

~/.claude.json
json
{
  "mcpServers": {
    "gitlab": {
      "type": "http",
      "url": "https://gitlab.com/api/v4/mcp"
    }
  }
}
Or via CLI
bash
claude mcp add --transport http gitlab https://gitlab.com/api/v4/mcp

Heads up

  • First tool call opens a browser to authorize.

Available tools

ToolDescription
get_mcp_server_versionReturns the current version of the GitLab MCP server.
create_issueCreates a new issue in a GitLab project.
get_issueRetrieves detailed information about a specific GitLab issue.
create_merge_requestCreates a merge request in a GitLab project.
get_merge_requestRetrieves detailed information about a specific GitLab merge request.
get_merge_request_commitsRetrieves the list of commits in a specific GitLab merge request.
get_merge_request_diffsRetrieves the diffs for a specific GitLab merge request.
get_merge_request_pipelinesRetrieves the pipelines for a specific GitLab merge request.
get_pipeline_jobsRetrieves the jobs for a specific GitLab CI/CD pipeline.
manage_pipelineManages CI/CD pipelines in a project: list, create, retry, cancel, or delete a pipeline.
create_workitem_noteCreates a new note (comment) on a GitLab work item.
get_workitem_notesRetrieves all notes (comments) for a specific GitLab work item.
searchSearches for a term across the entire GitLab instance using the search API.
search_labelsSearches for labels in a GitLab project or group.
semantic_code_searchSearches for relevant code snippets in a GitLab project using semantic search.

Required configuration

  • GITLAB_PERSONAL_ACCESS_TOKENOptional

    GitLab personal access token for bearer authentication. Not needed when using the interactive OAuth flow.

  • GITLAB_API_URLOptional

    Base API URL of your GitLab instance, e.g. https://gitlab.com/api/v4 for SaaS or a self-managed host.

What you can do with it

Open and track merge requests

An agent creates a merge request, then reads its commits, diffs, and pipeline status to report whether the change is ready to merge.

Investigate a failing pipeline

Using get_pipeline_jobs and manage_pipeline, the agent inspects which CI jobs failed, retries them, and summarizes the cause.

FAQ

Is it free?
The MCP server is part of GitLab itself, so there is no separate purchase; availability follows your GitLab plan and instance configuration, and you only need an account with access to the projects involved.
Does it support remote/OAuth?
Yes. It is a remote server at /api/v4/mcp (gitlab.com for SaaS) that uses OAuth 2.0 with Dynamic Client Registration; a local stdio bridge via mcp-remote is documented for clients that cannot connect remotely.
Is this the official GitLab server or a community one?
This record describes GitLab's official, built-in MCP server. There are also maintained community servers such as @zereight/mcp-gitlab, but the canonical, verifiable option is the one shipped with GitLab.
← Browse all version-control servers