GitLab MCP Server
Provides tools for interacting with GitLab, including browsing projects, managing issues and merge requests, checking pipeline status, and accessing repository files.
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 MCP Servershow my open merge requests"
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
An MCP (Model Context Protocol) server that allows LLMs to interact with GitLab. Access issues, merge requests, pipelines, and repository files directly from Claude Code or other MCP-compatible clients.
Features
Browse and search projects
View issues and merge requests (including your own and team-labeled)
Read MR diffs and comments
Check pipeline status and job logs
Browse repository files
Related MCP server: GitLab MCP Server
Setup
1. Install dependencies
make install
# or
uv sync2. Create GitLab Personal Access Token
Go to GitLab → Avatar (top-right) → Edit profile
Left sidebar → Access Tokens
Click Add new token
Configure:
Token name: e.g., "MCP Server"
Expiration date: choose as needed
Scopes:
read_api(required)read_repository(for file content access)
Click Create personal access token
Copy the token (won't be shown again)
Direct URL: https://gitlab.com/-/user_settings/personal_access_tokens
3. Configure environment
cp .env.example .envEdit .env with your values:
GITLAB_URL=https://gitlab.com
GITLAB_TOKEN=your-private-token-here
DEFAULT_ASSIGNEE=meConfiguration
Variable | Description | Default |
| Your GitLab instance URL |
|
| Personal access token | (required) |
| Username for "my_*" tools filters |
|
Usage
Run directly
uv run python main.pyRun in background
make start # Start server
make stop # Stop server
make restart # Restart server
make status # Check if running
make logs # Tail server logsAdd to Claude Code
Create .mcp.json in your project root:
{
"mcpServers": {
"gitlab": {
"command": "uv",
"args": ["run", "python", "main.py"],
"cwd": "/path/to/gitlab-mcp-server"
}
}
}Or use the CLI:
claude mcp add gitlab -- uv run python main.pyVerify with /mcp command inside Claude Code.
Test the server
# Test with MCP Inspector
npx @modelcontextprotocol/inspector uv run python main.py
# Test API connection
uv run python -c "
from tools.projects import get_client
with get_client() as client:
r = client.get('/user')
print('Authenticated as:', r.json().get('username'))
"Available Tools
Projects
Tool | Description |
| List accessible projects (search, filter by ownership/membership) |
| Get project details by path |
Issues
Tool | Description |
| List issues in a project (filter by state, labels, search) |
| List issues assigned to you (uses |
| List issues with a team label (default: "RE") |
| Get issue details including description |
| Get comments/notes on an issue |
Merge Requests
Tool | Description |
| List MRs in a project (filter by state, branches, search) |
| List MRs assigned to you |
| List MRs where you are a reviewer |
| List MRs with a team label (default: "RE") |
| Get MR details including description |
| Get MR file diffs |
| Get MR comments/discussions |
Pipelines
Tool | Description |
| List pipelines in a project (filter by status, branch) |
| Get jobs for a pipeline |
| Get job log output |
Repository
Tool | Description |
| List files/directories in a repo |
| Get file content from a repo |
Project Structure
gitlab-mcp-server/
├── main.py # Entry point
├── client.py # HTTP client & settings
├── models.py # Pydantic models
├── tools/
│ ├── projects.py # Project tools
│ ├── issues.py # Issue tools
│ ├── merge_requests.py # MR tools
│ ├── pipelines.py # Pipeline tools
│ └── repository.py # Repository tools
├── .env.example # Environment template
└── Makefile # Run commandsLicense
MIT
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/ProstoyVadila/gitlab_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server