GitLab MCP
Provides tools for managing GitLab projects, issues, merge requests, repositories (branches, files, commits, tags), and CI/CD pipelines via the GitLab REST API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitLab MCPshow open merge requests in my-group/my-project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitLab MCP
A Model Context Protocol server that exposes the GitLab REST API to MCP clients (Claude Code, Claude Desktop, etc.) to drive projects, issues, merge requests, repositories, and CI/CD pipelines.
The server is multi-tenant: it stores no credentials. Every caller supplies their own GitLab token and instance URL, so one deployed server can serve many users, each acting as themselves.
Authentication
Each request resolves credentials in this order:
HTTP headers (for networked transports — the normal case for a deployed server):
X-GitLab-Token: glpat-xxxx(orAuthorization: Bearer glpat-xxxx)X-GitLab-Url: https://gitlab.example.com(defaults tohttps://gitlab.com)
Environment variables (fallback, handy for local stdio use):
GITLAB_TOKEN,GITLAB_URL
Create the token in GitLab under Settings → Access Tokens with the api scope.
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -e .Run
gitlab-mcp # console script (installed by pip)
# or
python -m gitlab_mcpThe server speaks MCP over stdio.
Docker / deploy on a server
CI publishes an image to GitHub Container Registry on every push to main and on
version tags:
docker pull ghcr.io/shahabmosavi/gitlab_mcp:mainRun it as a networked MCP server (HTTP transport). No token is baked in — callers authenticate per request with headers:
docker run -d --name gitlab-mcp -p 8000:8000 \
-e MCP_TRANSPORT=streamable-http \
ghcr.io/shahabmosavi/gitlab_mcp:mainEnv var | Default | Purpose |
|
|
|
|
| Bind host for networked transports |
|
| Bind port for networked transports |
Use with Claude Code
Connect to a deployed server (each user adds it with their own token/instance):
claude mcp add --transport http gitlab https://your-server:8000/mcp \
--header "X-GitLab-Token: glpat-xxxxxxxx" \
--header "X-GitLab-Url: https://gitlab.example.com"Or run it locally over stdio (token via env, no headers needed):
claude mcp add gitlab --env GITLAB_TOKEN=glpat-xxxx --env GITLAB_URL=https://gitlab.example.com -- gitlab-mcp(Use the absolute path to the gitlab-mcp binary inside .venv/bin/ if it isn't on
your PATH.)
Tools
Area | Tools |
Projects/Groups |
|
Issues |
|
Merge requests |
|
Repository |
|
CI/CD |
|
Misc |
|
Escape hatch |
|
Whatever isn't covered by a dedicated tool is reachable through gitlab_api, so the
server can do anything your token is allowed to do.
Notes
project_idaccepts a numeric ID or a URL path likegroup/subgroup/project.Issues and merge requests are addressed by their project-scoped IID (the number in the web URL), not their global ID.
List tools trim responses to the most useful fields to keep them compact; use
gitlab_apiwhen you need the full, raw payload.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shahabmosavi/gitlab_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server