gitlab-mcp
Provides tools for managing GitLab projects, issues, merge requests, pipelines, and notes. Supports multi-profile PAT management for self-hosted GitLab instances.
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 my open issues in the backend 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 Server
Token-optimized Model Context Protocol server for self-hosted GitLab instances, designed for Claude Code.
Features
Multi-profile PAT management — switch between multiple GitLab instances
Compact text responses — minimal token usage for LLM context
Project caching — avoids redundant API calls (2min TTL)
Full GitLab workflow — issues, merge requests, pipelines, notes
Env or config-file auth — flexible credential management
Related MCP server: GitLab MCP Server
Setup
1. Install dependencies
bun install2. Get a GitLab Personal Access Token
Go to your GitLab instance → Settings → Access Tokens
Create a token with scopes:
api,read_user
3. Configure
Option A: Environment variables
export GITLAB_BASE_URL="https://gitlab.example.com"
export GITLAB_TOKEN="your-personal-access-token"
export GITLAB_DEFAULT_PROJECT="group/subgroup/repo" # optionalOption B: Use the set_gitlab_pat tool at runtime — profiles are stored in ~/.config/gitlab-mcp-server/config.json with 0600 permissions.
4. Add to Claude Code
Add to your ~/.claude/settings.json or project .claude/settings.json:
{
"mcpServers": {
"gitlab": {
"command": "bun",
"args": ["run", "/path/to/gitlab-mcp-server/index.ts"],
"env": {
"GITLAB_BASE_URL": "https://gitlab.example.com",
"GITLAB_TOKEN": "your-personal-access-token",
"GITLAB_DEFAULT_PROJECT": "group/subgroup/repo"
}
}
}
}Available Tools
Profile Management
Tool | Description |
| Save or update a GitLab PAT profile |
| List saved profiles (tokens masked) |
| Switch active profile |
| Delete a saved profile |
| Verify PAT and show current user |
Projects
Tool | Description |
| List accessible projects (search, filter) |
| Get project details by ID or path |
Issues
Tool | Description |
| List issues with filters (state, labels, assignee) |
| Full issue details with recent notes |
| Create a new issue |
| Add a comment to an issue |
Merge Requests
Tool | Description |
| List MRs with filters (state, assignee) |
| Full MR details with recent notes |
| Create a new merge request |
| Add a comment to a merge request |
Pipelines
Tool | Description |
| List recent pipelines (filter by ref, status) |
| Pipeline details with job breakdown |
| Retry all failed jobs in a pipeline |
| Cancel a running pipeline |
Multi-Instance Support
All tools use the active profile. Switch between GitLab instances:
# Save profiles
set_gitlab_pat(name: "work", baseUrl: "https://gitlab.company.com", token: "...")
set_gitlab_pat(name: "oss", baseUrl: "https://gitlab.com", token: "...")
# Switch
use_gitlab_profile(name: "work")Projects can be referenced by ID or path:
projectId: "123"
projectPath: "group/subgroup/repo"If defaultProject is set in the profile, it's used when neither is provided.
License
MIT
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/DKeken/gitlab-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server