用于GitLab API的MCP服务器,支持项目管理、文件操作等功能。
什么是MCP服务器?
| 属性 | 详情 |
|---|---|
| Docker镜像 | https://hub.docker.com/repository/docker/mcp/gitlab |
| 作者 | https://github.com/modelcontextprotocol |
| 代码仓库 | https://github.com/modelcontextprotocol/servers |
| 属性 | 详情 |
|---|---|
| Dockerfile | https://github.com/modelcontextprotocol/servers/blob/b4ee623039a6c60053ce67269701ad9e95073306/src/gitlab/Dockerfile |
| 提交记录 | b4ee623039a6c60053ce67269701ad9e95073306 |
| Docker镜像构建者 | Docker Inc. |
| Docker Scout健康评分 | !Docker Scout Health Score |
| 验证签名 | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/gitlab --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| 许可证 | MIT许可证 |
| 服务器提供的工具 | 简短描述 |
|---|---|
create_branch | 在GitLab项目中创建新分支 |
create_issue | 在GitLab项目中创建新议题 |
create_merge_request | 在GitLab项目中创建新合并请求 |
create_or_update_file | 在GitLab项目中创建或更新单个文件 |
create_repository | 创建新的GitLab项目 |
fork_repository | 将GitLab项目分叉到您的账户或指定命名空间 |
get_file_contents | 获取GitLab项目中文件或目录的内容 |
push_files | 在单次提交中向GitLab项目推送多个文件 |
search_repositories | 搜索GitLab项目 |
工具:create_branch
在GitLab项目中创建新分支
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 新分支的名称 |
project_id | string | 项目ID或URL编码路径 |
ref | string 可选 | 新分支的源分支/提交 |
工具:create_issue
在GitLab项目中创建新议题
| 参数 | 类型 | 描述 |
|---|---|---|
project_id | string | 项目ID或URL编码路径 |
title | string | 议题标题 |
assignee_ids | array 可选 | 要分配的用户ID数组 |
description | string 可选 | 议题描述 |
labels | array 可选 | 标签名称数组 |
milestone_id | number 可选 | 要分配的里程碑ID |
工具:create_merge_request
在GitLab项目中创建新合并请求
| 参数 | 类型 | 描述 |
|---|---|---|
project_id | string | 项目ID或URL编码路径 |
source_branch | string | 包含更改的分支 |
target_branch | string | 要合并到的分支 |
title | string | 合并请求标题 |
allow_collaboration | boolean 可选 | 允许上游成员提交 |
description | string 可选 | 合并请求描述 |
draft | boolean 可选 | 创建为草稿合并请求 |
工具:create_or_update_file
在GitLab项目中创建或更新单个文件
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 要创建/更新文件的分支 |
commit_message | string | 提交消息 |
content | string | 文件内容 |
file_path | string | 要创建/更新文件的路径 |
project_id | string | 项目ID或URL编码路径 |
previous_path | string 可选 | 要移动/重命名的文件路径 |
工具:create_repository
创建新的GitLab项目
| 参数 | 类型 | 描述 |
|---|---|---|
name | string | 仓库名称 |
description | string 可选 | 仓库描述 |
initialize_with_readme | boolean 可选 | 使用README.md初始化 |
visibility | string 可选 | 仓库可见性级别 |
工具:fork_repository
将GitLab项目分叉到您的账户或指定命名空间
| 参数 | 类型 | 描述 |
|---|---|---|
project_id | string | 项目ID或URL编码路径 |
namespace | string 可选 | 要分叉到的命名空间(完整路径) |
工具:get_file_contents
获取GitLab项目中文件或目录的内容
| 参数 | 类型 | 描述 |
|---|---|---|
file_path | string | 文件或目录的路径 |
project_id | string | 项目ID或URL编码路径 |
ref | string 可选 | 要获取内容的分支/标签/提交 |
工具:push_files
在单次提交中向GitLab项目推送多个文件
| 参数 | 类型 | 描述 |
|---|---|---|
branch | string | 要推送的分支 |
commit_message | string | 提交消息 |
files | array | 要推送的文件数组 |
project_id | string | 项目ID或URL编码路径 |
工具:search_repositories
搜索GitLab项目
| 参数 | 类型 | 描述 |
|---|---|---|
search | string | 搜索查询 |
page | number 可选 | 分页页码(默认:1) |
per_page | number 可选 | 每页结果数(默认:20) |
json{ "mcpServers": { "gitlab": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITLAB_API_URL", "-e", "GITLAB_PERSONAL_ACCESS_TOKEN", "mcp/gitlab" ], "env": { "GITLAB_API_URL": "https://gitlab.com/api/v4", "GITLAB_PERSONAL_ACCESS_TOKEN": "<您的令牌>" } } } }
为什么使用Docker运行MCP服务器更安全?
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 版本下载页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务