GitLab MCP
Exposes the GitLab REST API to MCP clients for managing projects, issues, merge requests, repositories, and CI/CD pipelines. It is multi-tenant, allowing each user to authenticate with their own token and instance URL.
README
GitLab MCP
A Model Context Protocol server that exposes the GitLab REST API to MCP clients (Claude Code, Claude Desktop, etc.) to drive projects, issues, merge requests, repositories, and CI/CD pipelines.
The server is multi-tenant: it stores no credentials. Every caller supplies their own GitLab token and instance URL, so one deployed server can serve many users, each acting as themselves.
Authentication
Each request resolves credentials in this order:
- HTTP headers (for networked transports — the normal case for a deployed server):
X-GitLab-Token: glpat-xxxx(orAuthorization: Bearer glpat-xxxx)X-GitLab-Url: https://gitlab.example.com(defaults tohttps://gitlab.com)
- Environment variables (fallback, handy for local stdio use):
GITLAB_TOKEN,GITLAB_URL
Create the token in GitLab under Settings → Access Tokens with the api scope.
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
Run
gitlab-mcp # console script (installed by pip)
# or
python -m gitlab_mcp
The server speaks MCP over stdio.
Docker / deploy on a server
CI publishes an image to GitHub Container Registry on every push to main and on
version tags:
docker pull ghcr.io/shahabmosavi/gitlab_mcp:main
Run it as a networked MCP server (HTTP transport). No token is baked in — callers authenticate per request with headers:
docker run -d --name gitlab-mcp -p 8000:8000 \
-e MCP_TRANSPORT=streamable-http \
ghcr.io/shahabmosavi/gitlab_mcp:main
| Env var | Default | Purpose |
|---|---|---|
MCP_TRANSPORT |
stdio |
stdio, streamable-http, or sse |
MCP_HOST |
0.0.0.0 |
Bind host for networked transports |
MCP_PORT |
8000 |
Bind port for networked transports |
Use with Claude Code
Connect to a deployed server (each user adds it with their own token/instance):
claude mcp add --transport http gitlab https://your-server:8000/mcp \
--header "X-GitLab-Token: glpat-xxxxxxxx" \
--header "X-GitLab-Url: https://gitlab.example.com"
Or run it locally over stdio (token via env, no headers needed):
claude mcp add gitlab --env GITLAB_TOKEN=glpat-xxxx --env GITLAB_URL=https://gitlab.example.com -- gitlab-mcp
(Use the absolute path to the gitlab-mcp binary inside .venv/bin/ if it isn't on
your PATH.)
Tools
| Area | Tools |
|---|---|
| Projects/Groups | list_projects, get_project, create_project, list_groups, list_group_projects |
| Issues | list_issues, get_issue, create_issue, update_issue, comment_issue, list_issue_notes |
| Merge requests | list_merge_requests, get_merge_request, get_merge_request_diffs, create_merge_request, update_merge_request, merge_merge_request, approve_merge_request, comment_merge_request, list_merge_request_notes |
| Repository | list_branches, create_branch, delete_branch, get_file, create_or_update_file, delete_file, list_repository_tree, list_commits, get_commit_diff, create_commit, list_tags, create_tag |
| CI/CD | list_pipelines, get_pipeline, create_pipeline, retry_pipeline, cancel_pipeline, list_pipeline_jobs, get_job_log |
| Misc | get_current_user, search_users, search |
| Escape hatch | gitlab_api — call any GitLab REST endpoint directly |
Whatever isn't covered by a dedicated tool is reachable through gitlab_api, so the
server can do anything your token is allowed to do.
Notes
project_idaccepts a numeric ID or a URL path likegroup/subgroup/project.- Issues and merge requests are addressed by their project-scoped IID (the number in the web URL), not their global ID.
- List tools trim responses to the most useful fields to keep them compact; use
gitlab_apiwhen you need the full, raw payload.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。