GitLab MCP Server
Interact with GitLab projects, merge requests, issues, and pipelines.
claude_desktop_config.json
{
"mcpServers": {
"server-gitlab": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "your-token-here"
}
}
}
} Environment Variables
| Variable | Required | Description |
|---|---|---|
GITLAB_PERSONAL_ACCESS_TOKEN | ✓ Required | GitLab personal access token with api scope. |
GITLAB_API_URL | Optional | GitLab API base URL. Defaults to https://gitlab.com/api/v4 for cloud. |
Setup Instructions
- Ensure Node.js 18+ is installed on your system.
-
Copy the config block above into your
claude_desktop_config.jsonfile (typically at~/.config/claude/claude_desktop_config.jsonon macOS/Linux or%APPDATA%\Claude\claude_desktop_config.jsonon Windows). - Set the
GITLAB_PERSONAL_ACCESS_TOKENenvironment variable: GitLab personal access token with api scope. - Restart your AI client to apply the config.