GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more.
To add GitLab MCP Server to Claude, run the install command below or copy the ready-made config for Claude Code, Claude Desktop, Cursor and VS Code further down. Restart your client after adding it and its tools show up in your next conversation. It needs 21 environment variables, listed below.
Install
npx -y @zereight/mcp-gitlab@2.3.19Environment variables
GITLAB_PERSONAL_ACCESS_TOKENSet in your MCP configGITLAB_PERSONAL_ACCESS_TOKEN_FILESet in your MCP configGITLAB_JOB_TOKENSet in your MCP configGITLAB_AUTH_COOKIE_PATHSet in your MCP configGITLAB_USE_OAUTHSet in your MCP configGITLAB_OAUTH_CLIENT_IDSet in your MCP configGITLAB_OAUTH_TOKEN_SCRIPTSet in your MCP configGITLAB_API_URLSet in your MCP configGITLAB_ALLOWED_PROJECT_IDSSet in your MCP configGITLAB_PERMISSION_MODESet in your MCP configGITLAB_TOOLSETSSet in your MCP configGITLAB_TOOLSSet in your MCP configGITLAB_DENIED_TOOLS_REGEXSet in your MCP configGITLAB_TOOL_POLICY_APPROVESet in your MCP configGITLAB_TOOL_POLICY_HIDDENSet in your MCP configNODE_TLS_REJECT_UNAUTHORIZEDSet in your MCP configGITLAB_CA_CERT_PATHSet in your MCP configGITLAB_MASKING_ENABLEDSet in your MCP configGITLAB_MASKING_CONFIGSet in your MCP configGITLAB_MASKING_POLICY_FILESet in your MCP configGITLAB_MASKING_WORKSPACE_DIRSet in your MCP configInstall with your client
claude mcp add gitlab --env GITLAB_PERSONAL_ACCESS_TOKEN=<YOUR_GITLAB_PERSONAL_ACCESS_TOKEN> --env GITLAB_PERSONAL_ACCESS_TOKEN_FILE=<YOUR_GITLAB_PERSONAL_ACCESS_TOKEN_FILE> --env GITLAB_JOB_TOKEN=<YOUR_GITLAB_JOB_TOKEN> --env GITLAB_AUTH_COOKIE_PATH=<YOUR_GITLAB_AUTH_COOKIE_PATH> --env GITLAB_USE_OAUTH=<YOUR_GITLAB_USE_OAUTH> --env GITLAB_OAUTH_CLIENT_ID=<YOUR_GITLAB_OAUTH_CLIENT_ID> --env GITLAB_OAUTH_TOKEN_SCRIPT=<YOUR_GITLAB_OAUTH_TOKEN_SCRIPT> --env GITLAB_API_URL=<YOUR_GITLAB_API_URL> --env GITLAB_ALLOWED_PROJECT_IDS=<YOUR_GITLAB_ALLOWED_PROJECT_IDS> --env GITLAB_PERMISSION_MODE=<YOUR_GITLAB_PERMISSION_MODE> --env GITLAB_TOOLSETS=<YOUR_GITLAB_TOOLSETS> --env GITLAB_TOOLS=<YOUR_GITLAB_TOOLS> --env GITLAB_DENIED_TOOLS_REGEX=<YOUR_GITLAB_DENIED_TOOLS_REGEX> --env GITLAB_TOOL_POLICY_APPROVE=<YOUR_GITLAB_TOOL_POLICY_APPROVE> --env GITLAB_TOOL_POLICY_HIDDEN=<YOUR_GITLAB_TOOL_POLICY_HIDDEN> --env NODE_TLS_REJECT_UNAUTHORIZED=<YOUR_NODE_TLS_REJECT_UNAUTHORIZED> --env GITLAB_CA_CERT_PATH=<YOUR_GITLAB_CA_CERT_PATH> --env GITLAB_MASKING_ENABLED=<YOUR_GITLAB_MASKING_ENABLED> --env GITLAB_MASKING_CONFIG=<YOUR_GITLAB_MASKING_CONFIG> --env GITLAB_MASKING_POLICY_FILE=<YOUR_GITLAB_MASKING_POLICY_FILE> --env GITLAB_MASKING_WORKSPACE_DIR=<YOUR_GITLAB_MASKING_WORKSPACE_DIR> -- npx -y @zereight/mcp-gitlab@2.3.19
Run this in a terminal to add the server to Claude Code.
What this does
GitLab MCP Server exposes a set of tools to Claude over the Model Context Protocol. After you add it to claude_desktop_config.json (snippet above) and restart Claude Desktop, those tools become callable inside any conversation.
Requirements
This server needs the following environment variables to be set before it can run:
GITLAB_PERSONAL_ACCESS_TOKEN GITLAB_PERSONAL_ACCESS_TOKEN_FILE GITLAB_JOB_TOKEN GITLAB_AUTH_COOKIE_PATH GITLAB_USE_OAUTH GITLAB_OAUTH_CLIENT_ID GITLAB_OAUTH_TOKEN_SCRIPT GITLAB_API_URL GITLAB_ALLOWED_PROJECT_IDS GITLAB_PERMISSION_MODE GITLAB_TOOLSETS GITLAB_TOOLS GITLAB_DENIED_TOOLS_REGEX GITLAB_TOOL_POLICY_APPROVE GITLAB_TOOL_POLICY_HIDDEN NODE_TLS_REJECT_UNAUTHORIZED GITLAB_CA_CERT_PATH GITLAB_MASKING_ENABLED GITLAB_MASKING_CONFIG GITLAB_MASKING_POLICY_FILE GITLAB_MASKING_WORKSPACE_DIR
Set these via the env object in your MCP config (see claude_desktop_config.json snippet above).
Frequently asked questions
How do I install GitLab MCP Server?
Run the Claude Code command in the install section to add GitLab MCP Server to Claude Code, or copy the ready-made config for your client from the install section on this page. Restart your client afterwards and the tools appear in your next conversation.
Which clients work with GitLab MCP Server?
This page carries setup and config for Claude Code, Claude Desktop, Cursor and VS Code. Any other MCP client that accepts a standard server config can connect to GitLab MCP Server as well.
Does GitLab MCP Server need an API key?
Yes. Before it can run, set these environment variables: GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_PERSONAL_ACCESS_TOKEN_FILE, GITLAB_JOB_TOKEN, GITLAB_AUTH_COOKIE_PATH, GITLAB_USE_OAUTH, GITLAB_OAUTH_CLIENT_ID, GITLAB_OAUTH_TOKEN_SCRIPT, GITLAB_API_URL, GITLAB_ALLOWED_PROJECT_IDS, GITLAB_PERMISSION_MODE, GITLAB_TOOLSETS, GITLAB_TOOLS, GITLAB_DENIED_TOOLS_REGEX, GITLAB_TOOL_POLICY_APPROVE, GITLAB_TOOL_POLICY_HIDDEN, NODE_TLS_REJECT_UNAUTHORIZED, GITLAB_CA_CERT_PATH, GITLAB_MASKING_ENABLED, GITLAB_MASKING_CONFIG, GITLAB_MASKING_POLICY_FILE, GITLAB_MASKING_WORKSPACE_DIR. They go in the env block of your MCP config.
Imported from the Official MCP Registry. The details above come from the registry entry; the maker can claim this listing to correct them, add docs, and see its traffic.
Is this your MCP server?
Claim this listing to see its traffic, fix details yourself, and skip the review queue on future updates.
Add this badge to your README
Show visitors this server is listed in the ClaudeRules directory. The badge links straight to this listing.
[](https://clauderules.net/mcp/io-github-zereight-gitlab-mcp)<a href="https://clauderules.net/mcp/io-github-zereight-gitlab-mcp" target="_blank" rel="noopener noreferrer"><img src="https://clauderules.net/api/badge/io-github-zereight-gitlab-mcp" alt="Listed on clauderules.net" /></a>More DevTools MCP servers
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
Figma-Context-MCP
Give your coding agent access to your Figma data. Implement designs in any framework in one-shot.
Inbox Zero
Search Gmail and Outlook, save drafts, manage email rules, and view email stats.
