Creativity · MCP — server
MCP GitLab Server
The MCP GitLab Server mirrors the GitHub MCP server for gitlab.com and self-hosted GitLab. It exposes projects, files, issues, merge requests, and CI/CD pipelines as MCP tools so an LLM agent can browse code, open MRs, and inspect pipeline status using a scoped Personal Access Token.
MCP facts
- Kind
- server
- Ecosystem
- anthropic-mcp
- Language
- TypeScript / Node.js
- Transports
- stdio
Capabilities
- Tools: search_repositories, get_file_contents, create_or_update_file, create_issue, create_merge_request
- Tools: list_pipelines, get_pipeline_jobs for CI inspection
- Resources: project tree and file contents at a given ref
- Supports self-hosted GitLab via GITLAB_API_URL override
Install
npx -y @modelcontextprotocol/server-gitlab Configuration
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-gitlab"],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxx",
"GITLAB_API_URL": "https://gitlab.com/api/v4"
}
}
}
} Frequently asked questions
Does the MCP GitLab server work with self-hosted GitLab?
Yes. Set GITLAB_API_URL to your instance's API root (for example https://gitlab.company.com/api/v4) and provide a PAT issued by that instance. The tools are identical to the gitlab.com surface.
What scopes does the GitLab PAT need?
api gives full read/write. For least-privilege choose read_api + read_repository for read-only agents, add write_repository for code commits, and api for merge request management.
Can the server trigger GitLab CI pipelines?
It lists pipelines and jobs by default. Pipeline trigger endpoints can be enabled by extending the server or via a pipeline trigger token — most teams keep the server read-only for CI and commit via the merge request flow.
Sources
- modelcontextprotocol/servers — gitlab — accessed 2026-04-20
- GitLab Personal Access Tokens — accessed 2026-04-20