GitLab MCP Server
Interact with GitLab projects, merge requests, issues, and pipelines.
Installation
npx -y @modelcontextprotocol/server-gitlab 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. |
Prerequisites
- Node.js 18 or later
- Required API keys — see the Environment Variables table above
Common Errors
- Server not found / spawn error — ensure Node.js is on your PATH and the package is accessible via npx.
- Permission denied — check that the path in args is readable by the process running your AI client.
- Authentication failed — verify your API key is set correctly in the env block.