gitlab-mcp-server
Provides tools for managing GitLab repositories, including merge requests, pipelines, branches, and file operations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
gitlab-mcp-server
MCP server for managing GitLab repositories — merge requests, pipelines, branches, and file operations — over the Model Context Protocol.
Features
Merge Requests — create, list, get, review diffs, and comment
Pipelines — list, get, retry, and cancel
Branches — create, delete, list, and inspect
Files — push (create/update/delete/move) and read file contents
Enterprise support — works with any GitLab instance (set
GITLAB_URL)
Related MCP server: gitlab-ci-mcp
Installation
pip install gitlab-mcp-serverOr install from source:
git clone https://github.com/hhldiniz/gitlabmcp.git
cd gitlabmcp
pip install -e .For tests:
pip install -e ".[test]"Configuration
Set the following environment variables:
Variable | Required | Default | Description |
| Yes | — | GitLab Personal Access Token |
| No |
| GitLab instance URL |
Usage
Run as a standalone MCP server (stdio)
export GITLAB_TOKEN=glpat-your-token
python -m gitlab_mcp_serverConfigure with an MCP client
Add to your MCP client config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"gitlab": {
"command": "python",
"args": ["-m", "gitlab_mcp_server"],
"env": {
"GITLAB_TOKEN": "glpat-your-token",
"GITLAB_URL": "https://gitlab.com"
}
}
}
}Tools
Tool | Description |
| Create a merge request |
| List merge requests (filter by state) |
| Get merge request details |
| Get MR diff/changes for code review |
| Add a note to a merge request |
| List pipelines (filter by ref) |
| Get pipeline details |
| Retry a failed pipeline |
| Cancel a running pipeline |
| Create a new branch from a ref |
| Delete a branch |
| List repository branches |
| Get branch details |
| Create/update/delete/move files in a single commit |
| Read a file from the repository |
Running Tests
python -m pytest tests -vProject Structure
gitlabmcp/
├── pyproject.toml
├── .env.example
├── client.py # Example MCP client
├── src/
│ └── gitlab_mcp_server/
│ ├── __init__.py
│ ├── __main__.py
│ ├── gitlab_client.py # GitLab API wrapper
│ ├── tools.py # MCP tool definitions + dispatch
│ └── server.py # MCP server (stdio transport)
└── tests/
├── conftest.py # Fixtures and mocks
├── test_gitlab_client.py
├── test_tools.py
└── test_server.pyTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- -licenseAqualityBmaintenanceMCP Server for the GitLab API, enabling project management, file operations, and more.95,950 npm92,139MIT
- AlicenseAqualityBmaintenanceMCP server for GitLab CI/CD — pipelines, jobs, schedules, branches, tags, merge requests and repository files. Works with any GitLab (SaaS gitlab.com or self-hosted) via python-gitlab.242MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for interacting with GitLab API, supporting both self-hosted instances and gitlab.com. Provides tools for managing issues, merge requests, code review, pipelines, milestones, releases, search, and file access.MIT
- AlicenseNot gradedqualityBmaintenanceMCP server for the GitLab REST API providing tools to manage projects, merge requests, pipelines, CI/CD variables, approvals, issues, and code reviews.3,759 PyPI7MIT