GitLab MCP server (Model Context Protocol) per the GitLab docs connects AI tools to live GitLab data: projects, merge requests, issues, pipelines, wiki. The team that uses GitLab MCP has AI agents that can read issues, review MRs, and query pipelines.
Table of contents
- What the GitLab MCP does
- Enable GitLab Duo and MCP
- Connect Claude Desktop
- Community alternatives
- What the agent can do
- Security
- Self-hosted GitLab
- FAQ
What the GitLab MCP does
The official GitLab MCP server exposes:
- Projects: list, get, search.
- Merge requests: read, review, comment.
- Issues: read, create, update.
- Pipelines: list, get status, get logs.
- Wiki: read pages.
- Releases/tags/milestones: list and details.
The team that uses this has AI that interacts with GitLab as a peer would.
Enable GitLab Duo and MCP
The MCP server is part of GitLab Duo:
- Enable GitLab Duo in your GitLab instance.
- Generate a personal access token (with
apiscope). - Configure MCP client with the token and GitLab URL.
The team that has GitLab Duo enabled has the MCP server.
Connect Claude Desktop
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@gitlab/mcp-server"],
"env": {
"GITLAB_API_URL": "https://gitlab.com",
"GITLAB_TOKEN": "glpat-xxxxxxxxxxxx"
}
}
}
}
The team that uses Claude has direct GitLab access in the AI.
Community alternatives
Beyond the official server, community implementations exist:
- zereight/gitlab-mcp: more comprehensive feature set.
- Various Docker images (e.g.,
mcp/gitlab).
The team that has specific needs uses community implementations.
What the agent can do
With GitLab MCP:
- “Show me all open issues assigned to me.”
- “Review MR #123 and suggest improvements.”
- “Why is pipeline #456 failing?”
- “Create an issue for the bug we just discussed.”
- “List recent releases in this project.”
The team that uses this has AI that bridges code and project management.
Security
The MCP server has full API access. The team that uses a read-only token (limited scope) has reduced risk. The team that uses a personal access token with api scope has full account access - rotate the token regularly.
Self-hosted GitLab
Self-hosted GitLab supports MCP too:
"env": {
"GITLAB_API_URL": "https://gitlab.internal.example.com",
"GITLAB_TOKEN": "..."
}
The team that has self-hosted GitLab has MCP working with the same config, just different URL.
FAQ
Is GitLab MCP official?
Yes - the GitLab team maintains the official MCP server.
Do I need GitLab Duo?
Yes - GitLab MCP is part of the Duo feature set. May require a paid tier for some features.
Can the agent create issues and MRs?
Yes - the official MCP server supports write operations. Use a scoped token to limit damage from prompt injection.
Is the agent’s GitLab access logged?
Yes - all GitLab API calls are logged in the user’s activity log. The team that audits has visibility.
Can I extend the official server?
Limited - the official server has fixed tools. The team that needs more uses community implementations or builds their own with the SDK.
If you are sizing the infrastructure for the kind of project this post covers, the RunxBuild hosting calculator is the right place to model the line items. The compute, the memory, the storage, the bandwidth, the database - each one is a separate number, and the team’s mental model for the platform is the sum of those numbers. The RunxBuild dashboard is where the team sees the actual usage in one place.
Useful related references: