GitLab MCP Server

v3.2.0
io.github.sumirati/mcp-gitlab Checked 16 hours ago Published 1 month ago

Developer-ready GitLab MCP server for CE and EE instances.

Values you need

VariableWhat it is
GITLAB_PERSONAL_ACCESS_TOKENrequired secret GitLab Personal Access Token with api scope
GITLAB_API_URLoptional GitLab instance API URL (defaults to https://gitlab.com/api/v4) Default: https://gitlab.com/api/v4
GITLAB_READ_ONLYoptional Enable read-only safety mode (true/false, default: false) Default: false
GITLAB_EXPOSE_ALL_TOOLSoptional Set to true to expose all 90 catalog actions directly on ListTools instead of the 5-tool hybrid surface Default: false
MCP_OUTPUT_FORMAToptional Default output format: 'markdown' (default, compact tables) or 'json' Default: markdown

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add mcp-gitlab -e 'GITLAB_PERSONAL_ACCESS_TOKEN=<GITLAB_PERSONAL_ACCESS_TOKEN>' -- npx -y @sumirati/mcp-gitlab@3.2.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "-y",
        "@sumirati/mcp-gitlab@3.2.0"
      ],
      "command": "npx",
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-gitlab": {
      "args": [
        "-y",
        "@sumirati/mcp-gitlab@3.2.0"
      ],
      "command": "npx",
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "<GITLAB_PERSONAL_ACCESS_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "GITLAB_PERSONAL_ACCESS_TOKEN",
      "id": "gitlab-personal-access-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "mcp-gitlab": {
      "args": [
        "-y",
        "@sumirati/mcp-gitlab@3.2.0"
      ],
      "command": "npx",
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab-personal-access-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.mcp-gitlab]
command = "npx"
args = ["-y", "@sumirati/mcp-gitlab@3.2.0"]
env = { "GITLAB_PERSONAL_ACCESS_TOKEN" = "<GITLAB_PERSONAL_ACCESS_TOKEN>" }

For AI agents

  1. Ask the user for: GITLAB_PERSONAL_ACCESS_TOKEN. 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. Verify: the server should expose these tools: gitlab_find_actions, gitlab_execute_action, get_file_contents, get_project, get_commit.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json