GitLab
v0.26.0GitLab MCP server (MCP 2026-07-28): projects, MRs, pipelines, CI/CD, issues; writes or read-only
Values you need
| Variable | What it is | |
|---|---|---|
GITLAB_TOKEN | optional 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_URL | required | GitLab instance URL (e.g. https://gitlab.com) |
GITLAB_READ_ONLY | optional | 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_ONLY | optional | 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 | optional | 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 | optional | Authentication mode: token (default) or oauth (OAuth 2.1 proxy; streamable-http only) |
GITLAB_OAUTH_CLIENT_ID | optional | Application ID of the GitLab OAuth app (oauth mode, or local sign-in on a self-managed instance) |
GITLAB_OAUTH_CLIENT_SECRET | optional secret | Secret of the GitLab OAuth app (oauth mode) |
GITLAB_OAUTH_BASE_URL | optional | Public URL of this server, no trailing slash (oauth mode); redirect URI is <base>/auth/callback |
GITLAB_OAUTH_SCOPES | optional | Space-separated GitLab scopes required on every request (oauth mode; default api) |
GITLAB_OAUTH_JWT_KEY | optional secret | FastMCP JWT signing key, >=32 random chars (oauth mode; defaults to one derived from the client secret) |
GITLAB_HTTP_BEARER_TOKEN | optional 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.2Add 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.2Add 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
- Ask the user for: GITLAB_URL. Never invent or guess these values; secrets go into the client config, not into chat logs.
- 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).
- Restart or reload the client so it starts the server.
- 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