GitLab MCP Server

Advanced GitLab MCP server with 44 tools across 18 entity types

README.md

Advanced GitLab MCP server

Advanced GitLab MCP server — 44 tools across 18 entity types with CQRS architecture, OAuth 2.1, and multiple transport modes.

Quick Start

{
  "mcpServers": {
    "gitlab": {
      "command": "npx",
      "args": ["-y", "@structured-world/gitlab-mcp"],
      "env": {
        "GITLAB_TOKEN": "your_gitlab_token",
        "GITLAB_API_URL": "https://gitlab.com"
      }
    }
  }
}

Requirements: Node.js >= 24

Highlights

  • 44 tools across 18 entity types — projects, merge requests, pipelines, work items, wiki, and more
  • CQRS architecturebrowse_* for queries, manage_* for commands
  • Multi-instance support — Connect to multiple GitLab instances with per-instance OAuth and rate limiting
  • Multiple transports — stdio, SSE, StreamableHTTP
  • OAuth 2.1 — Per-user authentication via Claude Custom Connector
  • Read-only mode — Safe operation for production environments
  • Auto-discovery — Detects GitLab config from git remotes
  • Fine-grained control — Enable/disable tool groups, filter actions, customize descriptions
  • Docker supportghcr.io/structured-world/gitlab-mcp:latest

Documentation

Full documentation is available at gitlab-mcp.sw.foundation

Section Description
Installation npm, Docker, VS Code, Codex
Configuration Environment variables, feature flags
Multi-Instance Connect to multiple GitLab instances
Tool Reference All 44 tools with parameters
OAuth Setup Team authentication with Claude
TLS/HTTPS Production deployment with SSL
Customization Tool descriptions, action filtering
CLI Tools Browse and export tool documentation

Auto-generated Tool Reference

For the complete tool reference with parameters:

# View locally
yarn list-tools --detail

# Generate documentation
yarn list-tools --export --toc > docs/tools/api-reference.md

See the Full API Reference for the auto-generated tool documentation.

Docker

# HTTP mode
docker run -e PORT=3002 -e GITLAB_TOKEN=your_token -p 3333:3002 \
  ghcr.io/structured-world/gitlab-mcp:latest

# stdio mode
docker run -i --rm -e GITLAB_TOKEN=your_token \
  ghcr.io/structured-world/gitlab-mcp:latest

Feature Flags

Flag Default Tools Enabled
USE_LABELS true Label management
USE_MRS true Merge requests
USE_FILES true File operations
USE_VARIABLES true CI/CD variables
USE_WORKITEMS true Issues, epics, tasks
USE_WEBHOOKS true Webhook management
USE_SNIPPETS true Code snippets
USE_INTEGRATIONS true 50+ integrations
USE_GITLAB_WIKI true Wiki pages
USE_MILESTONE true Milestones
USE_PIPELINE true Pipelines & CI/CD
`USE_REL

Tools 4

browse_projectsList and search GitLab projects
manage_merge_requestsCreate, update, or close merge requests
browse_pipelinesList pipelines for a specific project
manage_work_itemsCreate or update issues, epics, and tasks

Environment Variables

GITLAB_TOKENrequiredPersonal access token for GitLab authentication
GITLAB_API_URLBase URL for the GitLab instance (defaults to https://gitlab.com)
PORTPort for HTTP transport mode

Try it

List all open merge requests assigned to me in the current project.
Find the latest pipeline status for the main branch of my repository.
Create a new issue in the project with the title 'Fix authentication bug' and assign it to the team.
Search for all epics related to the Q4 roadmap in my GitLab group.

Frequently Asked Questions

What are the key features of GitLab MCP?

44 tools covering 18 entity types including projects, merge requests, and pipelines. CQRS architecture separating query and command operations. Multi-instance support for connecting to multiple GitLab servers. Multiple transport modes including stdio, SSE, and StreamableHTTP. OAuth 2.1 support for secure per-user authentication.

What can I use GitLab MCP for?

Automating merge request reviews and status updates via AI. Querying CI/CD pipeline health directly from the chat interface. Managing project work items like issues and epics without leaving the IDE. Synchronizing documentation and wiki pages across multiple GitLab instances.

How do I install GitLab MCP?

Install GitLab MCP by running: npx -y @structured-world/gitlab-mcp

What MCP clients work with GitLab MCP?

GitLab MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep GitLab MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare