GitLab

v0.26.0
io.github.vish288/mcp-gitlab Checked 1 day ago Published 22 hours ago

GitLab MCP server (MCP 2026-07-28): projects, MRs, pipelines, CI/CD, issues; writes or read-only

Values you need

VariableWhat it is
GITLAB_TOKENoptional secret GitLab personal access token (token mode). Optional after `mcp-gitlab auth login`; also accepts GITLAB_PAT, GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_TOKEN
GITLAB_URLrequired GitLab instance URL (e.g. https://gitlab.com)
GITLAB_READ_ONLYoptional Alias for MCP_READ_ONLY. Any value other than false/0/no/off/empty locks the server read-only; --read-only can only raise the lock
MCP_READ_ONLYoptional 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_TOOLSETSoptional 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_AUTHoptional Authentication mode: token (default) or oauth (OAuth 2.1 proxy; streamable-http only)
GITLAB_OAUTH_CLIENT_IDoptional Application ID of the GitLab OAuth app (oauth mode, or local sign-in on a self-managed instance)
GITLAB_OAUTH_CLIENT_SECREToptional secret Secret of the GitLab OAuth app (oauth mode)
GITLAB_OAUTH_BASE_URLoptional Public URL of this server, no trailing slash (oauth mode); redirect URI is <base>/auth/callback
GITLAB_OAUTH_SCOPESoptional Space-separated GitLab scopes required on every request (oauth mode; default api)
GITLAB_OAUTH_JWT_KEYoptional secret FastMCP JWT signing key, >=32 random chars (oauth mode; defaults to one derived from the client secret)
GITLAB_HTTP_BEARER_TOKENoptional secret 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)

PyPI (uvx)

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add mcp-gitlab -e 'GITLAB_URL=<GITLAB_URL>' -- uvx mcp-gitlab==0.25.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "mcp-gitlab==0.25.2"
      ],
      "command": "uvx",
      "env": {
        "GITLAB_URL": "<GITLAB_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "mcp-gitlab==0.25.2"
      ],
      "command": "uvx",
      "env": {
        "GITLAB_URL": "<GITLAB_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GITLAB_URL",
      "id": "gitlab-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-gitlab": {
      "args": [
        "mcp-gitlab==0.25.2"
      ],
      "command": "uvx",
      "env": {
        "GITLAB_URL": "${input:gitlab-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-gitlab]
command = "uvx"
args = ["mcp-gitlab==0.25.2"]
env = { "GITLAB_URL" = "<GITLAB_URL>" }

Docker

Requires Docker

Run in a terminal
claude mcp add mcp-gitlab -e 'GITLAB_URL=<GITLAB_URL>' -- docker run -i --rm -e GITLAB_URL ghcr.io/vish288/mcp-gitlab:0.25.2
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITLAB_URL",
        "ghcr.io/vish288/mcp-gitlab:0.25.2"
      ],
      "command": "docker",
      "env": {
        "GITLAB_URL": "<GITLAB_URL>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITLAB_URL",
        "ghcr.io/vish288/mcp-gitlab:0.25.2"
      ],
      "command": "docker",
      "env": {
        "GITLAB_URL": "<GITLAB_URL>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GITLAB_URL",
      "id": "gitlab-url",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-gitlab": {
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GITLAB_URL",
        "ghcr.io/vish288/mcp-gitlab:0.25.2"
      ],
      "command": "docker",
      "env": {
        "GITLAB_URL": "${input:gitlab-url}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-gitlab]
command = "docker"
args = ["run", "-i", "--rm", "-e", "GITLAB_URL", "ghcr.io/vish288/mcp-gitlab:0.25.2"]
env = { "GITLAB_URL" = "<GITLAB_URL>" }

For AI agents

  1. Ask the user for: GITLAB_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json