A GitLab MCP server lets an AI read your projects, issues, merge requests and pipeline data — and act on them through the GitLab API. In 2026 GitLab maintains an official server exposed over HTTP, so there's nothing to install. Here's the setup.
The pick: GitLab's official MCP server
GitLab's MCP server is built into the platform and served over HTTP at /api/v4/mcp. It uses OAuth, so you authorise in a browser rather than pasting a token.
Step 1 — add the server (Claude Code)
Claude Code connects over HTTP transport with no extra dependencies:
claude mcp add --transport http gitlab https://gitlab.com/api/v4/mcp
For a self-managed instance, swap gitlab.com for your host (e.g. https://gitlab.example.com/api/v4/mcp).
Step 2 — authorise
Type /mcp in Claude Code, select the gitlab server, and approve the authorization request in your browser. Run /mcp again to confirm it shows as connected.
For Claude Desktop and other clients, add the same HTTP URL as a custom/remote connector and complete the OAuth flow.
Step 3 — verify
Ask: "List my open merge requests in group X and summarise what each one changes." Real MRs back confirms it works.
Common problems
- OAuth window doesn't return — make sure pop-ups/redirects aren't blocked; retry
/mcp. - 403 on actions — your GitLab role lacks permission for that project; access mirrors your own GitLab permissions.
- Self-managed not reachable — confirm the instance exposes
/api/v4/mcpand that your network can reach it.
Security
The server acts as you — every action inherits your GitLab permissions, so scope your own access sensibly and prefer reporter/developer roles over owner where possible. Keep OAuth tokens out of shared configs. See MCP security best practices.
GitLab vs GitHub
If you're choosing between the two, read GitHub MCP vs GitLab MCP and the best GitHub MCP server rundown. For the broader stack, see best MCP for code review and top MCP servers for DevOps.
Going further
See the GitLab agent profile, browse the developer-tools category, or grab the DevOps/SRE loadout.