用于GitLab API的MCP服务器,支持项目管理、文件操作等功能,可通过Docker运行,提供安全的API交互能力。

25 次收藏下载次数: 0状态:社区镜像维护者:mcp(Model Context Protocol)仓库类型:镜像最近更新:1 年前
下载命令
点击查看

GitLab (Archived) MCP Server

MCP Server for the GitLab API, enabling project management, file operations, and more.

https://www.anthropic.com/news/model-context-protocol

MCP Info

AttributeDetails
Docker Imagehttps://hub.docker.com/repository/docker/mcp/gitlab
Authorhttps://github.com/modelcontextprotocol
Repositoryhttps://github.com/modelcontextprotocol/servers

Image Building Info

AttributeDetails
Dockerfilehttps://github.com/modelcontextprotocol/servers/blob/b4ee623039a6c60053ce67269701ad9e95073306/src/gitlab/Dockerfile
Commitb4ee623039a6c60053ce67269701ad9e95073306
Docker Image built byDocker Inc.
Docker Scout Health Score
Verify SignatureCOSIGN_REPOSITORY=mcp/signatures cosign verify mcp/gitlab --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub
LicenceMIT License

Available Tools (9)

Tools provided by this ServerShort Description
create_branchCreate a new branch in a GitLab project
create_issueCreate a new issue in a GitLab project
create_merge_requestCreate a new merge request in a GitLab project
create_or_update_fileCreate or update a single file in a GitLab project
create_repositoryCreate a new GitLab project
fork_repositoryFork a GitLab project to your account or specified namespace
get_file_contentsGet the contents of a file or directory from a GitLab project
push_filesPush multiple files to a GitLab project in a single commit
search_repositoriesSearch for GitLab projects

Tools Details

Tool: create_branch

Create a new branch in a GitLab project

ParametersTypeDescription
branchstringName for the new branch
project_idstringProject ID or URL-encoded path
refstring optionalSource branch/commit for new branch

Tool: create_issue

Create a new issue in a GitLab project

ParametersTypeDescription
project_idstringProject ID or URL-encoded path
titlestringIssue title
assignee_idsarray optionalArray of user IDs to assign
descriptionstring optionalIssue description
labelsarray optionalArray of label names
milestone_idnumber optionalMilestone ID to assign

Tool: create_merge_request

Create a new merge request in a GitLab project

ParametersTypeDescription
project_idstringProject ID or URL-encoded path
source_branchstringBranch containing changes
target_branchstringBranch to merge into
titlestringMerge request title
allow_collaborationboolean optionalAllow commits from upstream members
descriptionstring optionalMerge request description
draftboolean optionalCreate as draft merge request

Tool: create_or_update_file

Create or update a single file in a GitLab project

ParametersTypeDescription
branchstringBranch to create/update the file in
commit_messagestringCommit message
contentstringContent of the file
file_pathstringPath where to create/update the file
project_idstringProject ID or URL-encoded path
previous_pathstring optionalPath of the file to move/rename

Tool: create_repository

Create a new GitLab project

ParametersTypeDescription
namestringRepository name
descriptionstring optionalRepository description
initialize_with_readmeboolean optionalInitialize with README.md
visibilitystring optionalRepository visibility level

Tool: fork_repository

Fork a GitLab project to your account or specified namespace

ParametersTypeDescription
project_idstringProject ID or URL-encoded path
namespacestring optionalNamespace to fork to (full path)

Tool: get_file_contents

Get the contents of a file or directory from a GitLab project

ParametersTypeDescription
file_pathstringPath to the file or directory
project_idstringProject ID or URL-encoded path
refstring optionalBranch/tag/commit to get contents from

Tool: push_files

Push multiple files to a GitLab project in a single commit

ParametersTypeDescription
branchstringBranch to push to
commit_messagestringCommit message
filesarrayArray of files to push
project_idstringProject ID or URL-encoded path

Tool: search_repositories

Search for GitLab projects

ParametersTypeDescription
searchstringSearch query
pagenumber optionalPage number for pagination (default: 1)
per_pagenumber optionalNumber of results per page (default: 20)

Use this MCP Server

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": "<YOUR_TOKEN>"
      }
    }
  }
}

https://www.docker.com/blog/the-model-context-protocol-simplifying-building-ai-apps-with-anthropic-claude-desktop-and-docker/

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 gitlab 镜像标签

docker pull docker.xuanyuan.run/mcp/gitlab:<标签>

DockerHub 原生拉取命令

docker pull mcp/gitlab:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持99.95% SLA 保障付费会员免广告