gitlab-mcp-server
MCP server for managing GitLab repositories — merge requests, pipelines, branches, and file operations.
README
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)
Installation
pip install gitlab-mcp-server
Or 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 |
|---|---|---|---|
GITLAB_TOKEN |
Yes | — | GitLab Personal Access Token |
GITLAB_URL |
No | https://gitlab.com |
GitLab instance URL |
Usage
Run as a standalone MCP server (stdio)
export GITLAB_TOKEN=glpat-your-token
python -m gitlab_mcp_server
Configure 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_mr |
Create a merge request |
list_mrs |
List merge requests (filter by state) |
get_mr |
Get merge request details |
review_code |
Get MR diff/changes for code review |
comment_on_mr |
Add a note to a merge request |
list_pipelines |
List pipelines (filter by ref) |
get_pipeline |
Get pipeline details |
retry_pipeline |
Retry a failed pipeline |
cancel_pipeline |
Cancel a running pipeline |
create_branch |
Create a new branch from a ref |
delete_branch |
Delete a branch |
list_branches |
List repository branches |
get_branch |
Get branch details |
push_files |
Create/update/delete/move files in a single commit |
get_file |
Read a file from the repository |
Running Tests
python -m pytest tests -v
Project 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.py
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.