M

MCP Gitlab

by vish288 · io.github.vish288/mcp-gitlab

MCP server for the GitLab REST API providing tools to manage projects, merge requests, pipelines, CI/CD variables, approvals, issues, and code reviews.

pypi Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-vish288-mcp-gitlab": {
      "command": "uvx",
      "args": [
        "mcp-gitlab"
      ],
      "env": {
        "GITLAB_TOKEN": "<YOUR_VALUE>",
        "GITLAB_URL": "<VALUE>",
        "GITLAB_READ_ONLY": "false",
        "MCP_READ_ONLY": "<VALUE>",
        "MCP_TOOLSETS": "<VALUE>",
        "GITLAB_AUTH": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_ID": "<VALUE>",
        "GITLAB_OAUTH_CLIENT_SECRET": "<YOUR_VALUE>",
        "GITLAB_OAUTH_BASE_URL": "<VALUE>",
        "GITLAB_OAUTH_SCOPES": "<VALUE>",
        "GITLAB_OAUTH_JWT_KEY": "<YOUR_VALUE>",
        "GITLAB_HTTP_BEARER_TOKEN": "<YOUR_VALUE>",
        "GITLAB_PAT": "<VALUE>",
        "GITLAB_TIMEOUT": "30",
        "GITLAB_API_TOKEN": "<VALUE>",
        "GITLAB_SSL_VERIFY": "true",
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
GITLAB_TOKEN secret No Authentication token
GITLAB_URL Yes GitLab instance URL (e.g. https://gitlab.example.com)
GITLAB_READ_ONLY No Set to true to disable write operations Default: false
MCP_READ_ONLY No Locks the server read-only: write tools and write-workflow prompts are not listed and nothing lifts the lock at runtime. Shared name across the mcp-* servers; set it in the deployer's env
MCP_TOOLSETS No Comma list of tool groups to expose (code, review, ci, issues, release, admin); unset or 'all' lists every tool. Shrinks tools/list for clients with a tool budget; MCP_READ_ONLY still applies after the selection
GITLAB_AUTH No Authentication mode: token (default) or oauth (OAuth 2.1 proxy; streamable-http only)
GITLAB_OAUTH_CLIENT_ID No Application ID of the GitLab OAuth app (oauth mode, or local sign-in on a self-managed instance)
GITLAB_OAUTH_CLIENT_SECRET secret No Secret of the GitLab OAuth app (oauth mode)
GITLAB_OAUTH_BASE_URL No Public URL of this server, no trailing slash (oauth mode); redirect URI is <base>/auth/callback
GITLAB_OAUTH_SCOPES No Space-separated GitLab scopes required on every request (oauth mode; default api)
GITLAB_OAUTH_JWT_KEY secret No FastMCP JWT signing key, >=32 random chars (oauth mode; defaults to one derived from the client secret)
GITLAB_HTTP_BEARER_TOKEN secret No Bearer token (min 16 chars) required to bind an HTTP transport to a non-loopback host; clients send it as 'Authorization: Bearer <token>' (token mode; --auth oauth has its own sign-in)
GITLAB_PAT No Authentication token
GITLAB_TIMEOUT No Request timeout in seconds Default: 30
GITLAB_API_TOKEN No Authentication token
GITLAB_SSL_VERIFY No Set to false to skip SSL verification Default: true
GITLAB_PERSONAL_ACCESS_TOKEN No Authentication token

Similar servers