GitLab (official)

GitLab (official)

Official

GitLab's own MCP server, built into every GitLab instance - merge requests, work items, pipelines and code, over OAuth.

Score 58(?)GitLabVerified Top MCPs for Git & Repo Workflows →

Quick answer

What it does

Exposes GitLab through toolsets: core (projects, users, to-dos, search, comments), merge_requests (get, list, save, review, accept), work_items (get, list, save, link, saved views), repository (files, tree, branches, commits, tags, releases, fork, add_commit), ci (pipelines, jobs, artifacts, save_pipeline) and duo_agent_platform, with wikis, code_security and orbit opt-in through the X-Gitlab-Enabled-Mcp-Server-Toolsets header.

Best for

  • Merge request review and approval
  • Work item triage and linking
  • Reading and retrying pipelines
  • Committing file changes from an agent

Not for

  • GitLab instances before 19.5
  • Setups that only have legacy personal access tokens

Source: top-mcps.com/mcp/gitlab-mcp-server — verified Nov 2026

Setup recipe

Pick your client, then follow the three steps.

  1. 1

    Install

    claude_desktop_config.json
    {
      "mcpServers": {
        "gitlab-mcp-server": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://gitlab.com/api/v4/mcp"
          ]
        }
      }
    }

    Claude Desktop launches stdio servers, so mcp-remote bridges to the hosted endpoint and opens the sign-in in your browser. On Pro, Max, Team and Enterprise you can skip the file: Settings → Connectors → Add custom connector → https://gitlab.com/api/v4/mcp. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    CLI or .mcp.json
    claude mcp add --transport http gitlab-mcp-server https://gitlab.com/api/v4/mcp

    Then run /mcp inside Claude Code to finish the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    .cursor/mcp.json
    {
      "mcpServers": {
        "gitlab-mcp-server": {
          "url": "https://gitlab.com/api/v4/mcp"
        }
      }
    }

    Global path: ~/.cursor/mcp.json. Cursor shows "Needs login" once it connects — click it to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    .vscode/mcp.json
    {
      "servers": {
        "gitlab-mcp-server": {
          "type": "http",
          "url": "https://gitlab.com/api/v4/mcp"
        }
      }
    }

    VS Code uses the "servers" key. Run MCP: List Servers → Start Server and allow the sign-in. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    ~/.codeium/windsurf/mcp_config.json
    {
      "mcpServers": {
        "gitlab-mcp-server": {
          "serverUrl": "https://gitlab.com/api/v4/mcp"
        }
      }
    }

    Windsurf uses "serverUrl" for hosted servers. Open via Cascade → hammer icon → Configure. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    cline_mcp_settings.json
    {
      "mcpServers": {
        "gitlab-mcp-server": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://gitlab.com/api/v4/mcp"
          ]
        }
      }
    }

    Bridged through mcp-remote. Open via the Cline sidebar → MCP Servers → Edit. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    ~/.continue/config.json
    {
      "experimental": {
        "modelContextProtocolServers": [
          {
            "transport": {
              "type": "streamable-http",
              "url": "https://gitlab.com/api/v4/mcp"
            }
          }
        ]
      }
    }

    Continue takes the hosted URL directly in the transport block. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    CLI
    codex mcp add gitlab-mcp-server --url https://gitlab.com/api/v4/mcp

    Codex detects OAuth support and opens the browser to authorize. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    ~/.config/zed/settings.json
    {
      "context_servers": {
        "gitlab-mcp-server": {
          "command": {
            "path": "npx",
            "args": [
              "-y",
              "mcp-remote",
              "https://gitlab.com/api/v4/mcp"
            ]
          }
        }
      }
    }

    Bridged through mcp-remote under "context_servers". Settings live-reload on save. Authorization happens in the browser on first use (OAuth); no token goes in the config file.

    ChatGPT → Settings → Connectors (remote URL)
    {
      "name": "GitLab (official)",
      "transport": "http",
      "url": "https://gitlab.com/api/v4/mcp"
    }

    Paste this into Settings → Connectors → Add custom connector. Requires ChatGPT Pro / Team / Enterprise / Edu with Developer mode enabled.

  2. 2

    Set required secrets

    No credentials required — this MCP runs over stdio without authentication.

  3. 3

    Try a minimum working prompt

    Minimum working prompt pending verification. Try any prompt from the MCP’s README once installed.

Tools & permissions

ToolDescriptionArgsSide effects
get_merge_requestRetrieve a merge request, optionally with diffs, commits, notes, pipelines and conflicts.—Read
list_merge_requestsList or search merge requests in a project or group.—Read
save_merge_requestCreate a merge request, or update one when an IID is given.—Write
save_merge_request_reviewPost review notes or diff comments, and approve or unapprove.—Write
accept_merge_requestMerge a merge request now, or schedule auto-merge.—Write
get_work_itemRetrieve a work item, optionally with notes, discussions and related MRs.—Read
save_work_itemCreate or update a work item (recommended over create_issue).—Write
get_repository_fileRead a file's committed content at a given ref.—Read
add_commitCommit one or more file changes to a branch in one call.—Write
get_pipelineRetrieve a pipeline, optionally with jobs, downstream pipelines or artifacts.—Read
get_jobRetrieve a job's metadata, and optionally its log or artifacts.—Read
save_pipelineCreate, retry, cancel or rename a pipeline.—Write
searchSearch across GitLab.—Read

Security & scope

Access scope
Read + write
Sandbox
Runs inside GitLab and acts as the authorising user, within that user's project and group permissions. OAuth grants carry the `mcp` scope; fine-grained tokens carry the MCP tool resource.
Gotchas
  • accept_merge_request and add_commit act immediately under the user's permissions; branch protection and merge rules are the guard, so keep them on default branches.
  • On Self-Managed and Dedicated an administrator must enable MCP access before any client can connect.
  • Over stdio the server is reached through the mcp-remote proxy, which needs Node.js 20 or later.

Agent prompt pack

— copy into Claude, Cursor, or ChatGPT.
Paste into Claude, Cursor, or ChatGPT. Edit the [brackets] before sending.
Recommend the best MCP servers for [task: e.g. git & repo workflows work] in [client: Claude].

Constraints:
- Prefer tools that are [official | open-source | read-only] — pick what matters for my use case.
- Exclude MCPs that require [e.g. a paid plan, OAuth-only flows, remote-only transport].
- Return at most 3 picks, ranked.

For each pick include:
1. One-sentence rationale.
2. The ready-to-paste install snippet for my client.
3. Any required secrets I need to create before installing.

Cross-check the top-mcps.com listing: https://top-mcps.com/top-mcps-for-git-repo-workflows
Compare GitLab (official) against a real alternative. Swap the second MCP in [brackets] if you want a different match.
Compare GitLab (official) MCP vs [GitLab (community) MCP] for the following job: [describe the job, e.g. "let an agent create GitHub issues on bug triage"].

Judge them on:
- Setup time and complexity (what a new user hits first).
- Auth model (none / API key / OAuth 2.1) and credential risk.
- Transport (stdio / Streamable HTTP / SSE) and where the server runs.
- Required secrets and the blast radius if they leak.
- Operational risk in an unattended agent loop.
- Which one is "good enough" for a weekend prototype vs. production.

End with one sentence: which should I pick for my scenario, which is: [my scenario].

References:
- https://top-mcps.com/mcp/gitlab-mcp-server
- top-mcps.com listing for GitLab (community)
Asks the agent to install and verify. Works inside Claude Code, Cursor Agent, Codex CLI.
Install the GitLab (official) MCP server for my [client: Claude] at the default config path for that client.

Use the exact install snippet published at https://top-mcps.com/mcp/gitlab-mcp-server (fetch https://top-mcps.com/mcp/gitlab-mcp-server.json for the canonical server.json if you can read URLs).

Before finishing:
1. Create the required secrets (no secrets) and put them in the appropriate env block — do not hard-code them.
2. Restart or reload the client so it picks up the new server.
3. Verify the server is connected (green / running state) and at least one tool is listed.
4. If anything fails, read the client's MCP logs and report the exact error — do not silently retry.

Confirm when done and list the tools the server now exposes.

Frequently asked questions

What changed

— 1 update tracked.
  1. Added alongside the community GitLab server: GitLab's built-in MCP server is generally available since GitLab 19.5 and bundled by the Claude gitlab plugin.

More Git & Repo Workflows MCPs

Other tools in the same category worth evaluating.

Official

Full GitHub API access: repos, PRs, issues, and code search.

git, github, repos, prs
5 minLow
GitLab (community)

Full GitLab API access: repos, MRs, issues, pipelines, and registries.

git, gitlab, repos, mrs
5 minLow
Git
Official

Local Git operations: commit, diff, log, branch, and more.

git, local, commits, diff
2 minLow

Compared with GitLab (official)

Side-by-side breakdowns for the choices people most often weigh against this MCP.

Exploring Top MCPs for Git & Repo Workflows? See all Git & Repo Workflows MCPs →