I spend a lot of time in Claude Code, and a lot of time in GitLab. The constant tab-switching between the two — copy an issue ID, paste it into a prompt, jump back to read a job log, paste that too — got tiresome. So I wrote gitlab-mcp, a Model Context Protocol server that lets Claude Code talk to GitLab directly.

What an MCP server actually does

If you haven’t met MCP yet: it’s a protocol for exposing tools to LLM clients via stdio. Claude Code can register an MCP server and call its tools as part of a conversation. From the user’s point of view, you just say “list open issues for myorg/myproject” and Claude does it.

gitlab-mcp covers the parts of GitLab I touch daily:

  • Issues: list, create, update, comment
  • Labels: list with filters
  • Project metadata: descriptions and topics
  • Epics: list and create (Premium/Ultimate tier)
  • CI/CD: latest pipeline, list jobs, fetch job logs, download traces

The full tool list lives in the README. The point isn’t to be exhaustive — it’s to cover the workflows where I’d otherwise be context-switching.

Install and wire it up

Homebrew is the easy path:

brew tap sgaunet/homebrew-tools
brew install sgaunet/tools/gitlab-mcp

Then the standard GitLab token ritual:

export GITLAB_TOKEN=glpat-xxxxxxxxxxxxxxx
# Optional for self-hosted instances
export GITLAB_URI=https://gitlab.example.com

You’ll want a token with api, read_api, and write_api scopes. Add the server to Claude Code:

# Apple Silicon
claude mcp add gitlab-mcp -s user -- /opt/homebrew/bin/gitlab-mcp

# Intel Mac / Linux
claude mcp add gitlab-mcp -s user -- /usr/local/bin/gitlab-mcp

That’s it. Restart Claude Code and start asking it things.

What this looks like in practice

These are the kinds of prompts that just work now:

List all open issues for project myorg/myproject
Create an issue with title "Bug fix needed" for project myorg/myproject
Get the latest pipeline for myorg/myproject

The thing I didn’t fully appreciate until I’d been using it for a while is the direct project access by path. No more hunting for project IDs — myorg/myproject is enough.

The CI/CD tools are the killer feature for me. When a pipeline fails, “fetch the logs of the failed job and tell me what broke” is now a single sentence instead of a multi-tab investigation.

Trim the tool surface

LLMs pay tokens for every tool exposed to them, even ones they don’t call. If you only use gitlab-mcp for CI/CD debugging, you can disable everything else:

gitlab-mcp --no-issues --no-labels --no-project-metadata --no-epics

Or the inverse — issue management only:

gitlab-mcp --no-project-metadata --no-epics --no-pipelines

Available toggles: --no-issues, --no-labels, --no-project-metadata, --no-epics, --no-pipelines. A few seconds of configuration saves a lot of context.

Where to find it

  • Source: github.com/sgaunet/gitlab-mcp
  • License: MIT
  • Setup details: the README links to a full setup guide, Docker deployment doc, and complete tool reference

If you live in Claude Code and your code lives in GitLab, this is the bridge. Try it for one afternoon and see how often you stop reaching for the GitLab tab.