Updated April 2026
Install GitLab MCP Server
Pick your client, copy the command, done.
1
Add it to Claude Code
Run this in a terminal.
claude mcp add --transport sse gitlab-mcp http://localhost:8001/sseRequired:
GITLAB_URLGITLAB_TOKEN+ 5 optionalEnvironment Variables
Set these before running GitLab MCP Server.
VariableDescriptionRequired
GITLAB_URLGitLab instance URLYesGITLAB_TOKENPersonal Access Token with api and read_user scopesYesGITLAB_MCP_TRANSPORTTransport mode (stdio or sse)NoGITLAB_MCP_HOSTSSE listening hostNoGITLAB_MCP_PORTSSE listening portNoGITLAB_MCP_LOG_LEVELLogging levelNoGITLAB_TIMEOUTAPI request timeout in secondsNoAvailable Tools (30)
Once configured, GitLab MCP Server gives your AI agent access to:
server_infoGet server information and GitLab version.health_checkCheck connection status.list_projectsList accessible projects with search support.get_projectGet project details.list_project_membersList project members.list_merge_requestsList merge requests with status filtering.get_merge_requestGet merge request details.create_merge_requestCreate a new merge request.update_merge_requestUpdate merge request title, description, assignee, or status.merge_merge_requestExecute a merge request merge.approve_merge_requestApprove a merge request.get_merge_request_changesGet merge request file changes (diff).get_merge_request_commitsGet commits included in a merge request.list_merge_request_notesList merge request comments.create_merge_request_noteAdd a comment to a merge request.list_pipelinesList pipelines with status and branch filtering.get_pipelineGet pipeline details.create_pipelineTrigger a new pipeline.retry_pipelineRetry a pipeline.cancel_pipelineCancel a pipeline.list_pipeline_jobsList jobs for a specific pipeline.get_jobGet job details.get_job_logGet job execution logs.retry_jobRetry a single job.list_branchesList repository branches.get_branchGet branch details.list_commitsList repository commits.get_commitGet commit details.compare_branchesCompare differences between two branches.list_repository_treeBrowse repository file structure.Try It Out
After setup, try these prompts with your AI agent:
→List all open merge requests for the current project and summarize the changes in the latest one.
→Check the status of the latest pipeline for the main branch and get the logs if it failed.
→Find all files in the repository tree and list the recent commits for the develop branch.
→Approve the merge request with ID 123 and add a comment saying 'Looks good to merge'.
Prerequisites & system requirements
- An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
- Docker installed and running
GITLAB_URL— GitLab instance URLGITLAB_TOKEN— Personal Access Token with api and read_user scopes
Alternative installation methods
Docker Run
docker run -d --name gitlab-mcp -p 8001:8000 -e GITLAB_URL=https://your-gitlab.example.com -e GITLAB_TOKEN=your_token_here -e GITLAB_MCP_TRANSPORT=sse --restart unless-stopped gitlab-mcpKeep this setup from going cold
Save the docs, env vars, and workflow around GitLab MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.
Need the legacy visual installer? Open Conare IDE.