GitLab MCP server
2026년 11월 14일 커밋Enables AI clients to interact with GitLab repositories, issues, merge requests, and CI/CD pipelines via the GitLab REST API.
다른 이름 ralscha/gitlab-mcp
- 스타
- 1
- Tools
- 33
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 14일
- 라이선스
- MIT
GitLab MCP란?
GitLab은(는) MCP server입니다. Enables AI clients to interact with GitLab repositories, issues, merge requests, and CI/CD pipelines via the GitLab REST API. 33개 도구를 제공합니다. 예: gitlab_get_metadata, gitlab_get_current_user, gitlab_list_projects.
프로젝트 README에서 생성된 요약
GitLab MCP server 정보
Managing GitLab repositories, issues, and CI/CD pipelines through an AI client is possible with this MCP server. It connects to both GitLab.com and self-managed instances using the GitLab REST API v4. Developers can choose between a readonly mode for inspecting code and metadata or a readwrite mode for performing actions like creating issues, managing merge requests, or running pipelines.
Setup requires a GitLab personal, project, or group access token provided via the GITLAB_TOKEN environment variable. The server supports two transport methods: stdio for local integration with clients like Claude Desktop or VS Code, and streamable HTTP for remote connections. When using HTTP, a separate MCP auth token is used to protect the endpoint. The server handles complex tasks like paginated results, file encoding for non-UTF-8 content, and automatic retries for rate-limited requests.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
GitLab MCP 도구 33
README에서 감지됨gitlab_get_metadatagitlab_get_current_usergitlab_list_projectsgitlab_get_projectgitlab_list_issuesgitlab_get_issuegitlab_list_issue_notesgitlab_list_merge_requestsgitlab_get_merge_requestgitlab_list_merge_request_diffsgitlab_list_merge_request_notesgitlab_list_repository_tree
| gitlab_get_metadata | — | |
| gitlab_get_current_user | — | |
| gitlab_list_projects | — | |
| gitlab_get_project | — | |
| gitlab_list_issues | — | |
| gitlab_get_issue | — | |
| gitlab_list_issue_notes | — | |
| gitlab_list_merge_requests | — | |
| gitlab_get_merge_request | — | |
| gitlab_list_merge_request_diffs | — | |
| gitlab_list_merge_request_notes | — | |
| gitlab_list_repository_tree | — |
도구 33개 모두 보기도구 수 줄이기
gitlab_get_filegitlab_list_branchesgitlab_list_commitsgitlab_get_commitgitlab_list_pipelinesgitlab_get_pipelinegitlab_list_pipeline_jobsgitlab_get_jobgitlab_get_job_tracegitlab_searchgitlab_create_issuegitlab_update_issuegitlab_add_issue_notegitlab_create_merge_requestgitlab_update_merge_requestgitlab_add_merge_request_notegitlab_accept_merge_requestgitlab_create_branchgitlab_create_commitgitlab_create_pipelinegitlab_retry_pipeline
| gitlab_get_file | — | |
| gitlab_list_branches | — | |
| gitlab_list_commits | — | |
| gitlab_get_commit | — | |
| gitlab_list_pipelines | — | |
| gitlab_get_pipeline | — | |
| gitlab_list_pipeline_jobs | — | |
| gitlab_get_job | — | |
| gitlab_get_job_trace | — | |
| gitlab_search | — | |
| gitlab_create_issue | — | |
| gitlab_update_issue | — | |
| gitlab_add_issue_note | — | |
| gitlab_create_merge_request | — | |
| gitlab_update_merge_request | — | |
| gitlab_add_merge_request_note | — | |
| gitlab_accept_merge_request | — | |
| gitlab_create_branch | — | |
| gitlab_create_commit | — | |
| gitlab_create_pipeline | — | |
| gitlab_retry_pipeline | — |
구성
GITLAB_BASE_URLGITLAB_MODEGITLAB_TOKEN
| 이름 | 설명 | 유형 |
|---|---|---|
| GITLAB_BASE_URL | — | |
| GITLAB_MODE | — | |
| GITLAB_TOKEN | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능ralscha/gitlab-mcp is public and reachablegithub.com/ralscha/gitlab-mcp ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-14github.com/ralscha/gitlab-mcp ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음33 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기gitlab-mcp
A Model Context Protocol server for the
current GitLab REST API v4, written in Go
with the official
github.com/modelcontextprotocol/go-sdk.
It supports GitLab.com and GitLab Self-Managed, stdio and streamable HTTP
transports, paginated results, and separate readonly and readwrite modes.
The default is readonly.
Quick start
Using binary releases
Download a pre-built binary from the releases page:
export GITLAB_TOKEN=glpat-your-token
./gitlab-mcp --mode=readonly --transport=http --http-addr=127.0.0.1:8080 \
--auth-token=choose-a-separate-mcp-token
Building from source
Create a GitLab personal, project, or group access token, then run:
export GITLAB_TOKEN=glpat-your-token
go run ./cmd/gitlab-mcp --mode=readonly --transport=http --http-addr=127.0.0.1:8080 \
--auth-token=choose-a-separate-mcp-token
For a self-managed instance:
export GITLAB_BASE_URL=https://gitlab.example.com
export GITLAB_TOKEN=glpat-your-token
go run ./cmd/gitlab-mcp
GITLAB_BASE_URL is the instance URL, without /api/v4; the server appends
the stable GitLab REST API path itself.
Configuration
Flags override environment variables.
| Environment variable | CLI flag | Default | Description |
|---|---|---|---|
GITLAB_BASE_URL |
--gitlab-base-url |
https://gitlab.com |
GitLab instance URL |
GITLAB_TOKEN |
--gitlab-token |
required | Personal, project, or group access token |
GITLAB_MODE |
--mode |
readonly |
readonly or readwrite |
MCP_TRANSPORT |
--transport |
stdio |
stdio or http |
MCP_HTTP_ADDR |
--http-addr |
:8080 |
HTTP listen address |
MCP_AUTH_TOKEN |
--auth-token |
empty | Bearer token required from HTTP MCP clients |
Run gitlab-mcp --version to print the build version.
Tools
Project arguments accept either a numeric project ID or an unescaped full path
such as group/subgroup/project.
Read-only tools
| Tool | Purpose |
|---|---|
gitlab_get_metadata |
Get the connected GitLab version and instance metadata |
gitlab_get_current_user |
Get the user represented by the configured token |
gitlab_list_projects |
List and filter visible projects |
gitlab_get_project |
Get a project by ID or path |
gitlab_list_issues |
List issues in a project or across projects |
gitlab_get_issue |
Get an issue by project and IID |
gitlab_list_issue_notes |
List issue comments and system notes |
gitlab_list_merge_requests |
List merge requests in a project or across projects |
gitlab_get_merge_request |
Get a merge request by project and IID |
gitlab_list_merge_request_diffs |
List the changed files and patches in a merge request |
gitlab_list_merge_request_notes |
List merge request notes |
gitlab_list_repository_tree |
Browse a repository tree |
gitlab_get_file |
Read a repository file at a ref, defaulting to the default branch |
gitlab_list_branches |
List repository branches |
gitlab_list_commits |
List repository commits |
gitlab_get_commit |
Get one commit |
gitlab_list_pipelines |
List project pipelines |
gitlab_get_pipeline |
Get one pipeline |
gitlab_list_pipeline_jobs |
List jobs in a pipeline |
gitlab_get_job |
Get a CI/CD job by its job ID |
gitlab_get_job_trace |
Read a CI/CD job log (up to 1 MiB) |
gitlab_search |
Search globally or within a group or project |
Write tools
These tools are registered only when GITLAB_MODE=readwrite or
--mode=readwrite is set.
| Tool | Purpose |
|---|---|
gitlab_create_issue |
Create an issue |
gitlab_update_issue |
Update, close, or reopen an issue |
gitlab_add_issue_note |
Add an issue note |
gitlab_create_merge_request |
Create a merge request |
gitlab_update_merge_request |
Update, close, or reopen a merge request |
gitlab_add_merge_request_note |
Add a merge request note |
gitlab_accept_merge_request |
Merge now or automatically when all checks pass |
gitlab_create_branch |
Create a branch from a ref |
gitlab_create_commit |
Commit a batch of file create/update/move/delete/chmod actions |
gitlab_create_pipeline |
Run a pipeline, optionally with variables and typed inputs |
gitlab_retry_pipeline |
Retry failed or canceled pipeline jobs |
Issue and merge-request descriptions and notes use GitLab Flavored Markdown
directly, including quick actions
that can change project state. Repository files are capped at 25 MiB decoded.
gitlab_get_file returns encoding: "text" for UTF-8 content and
encoding: "base64" for content that is not valid UTF-8, preserving the bytes
returned by GitLab. Omit
ref to read from HEAD (the project's default branch).
The job tools use the GitLab Jobs API.
Job logs larger than 1 MiB return a size-limit error instead of a partial log;
use the job's web_url to view larger logs in GitLab.
Rate-limited 429 responses are retried up to three times for all replayable
requests. Ambiguous 502, 503, and 504 responses are retried only for
GET, HEAD, OPTIONS, and DELETE requests. Creates and updates are not
retried on these errors, because even updates can execute quick actions more
than once. Retries honor Retry-After, capped at 30 seconds per retry.
Commit actions distinguish omitted content from an empty string. Create and
update actions require content; use "" to create or truncate an empty file.
For move actions, omitting content preserves the file's contents, while ""
empties the moved file.
Merge requests use GitLab's Draft: title convention for draft state. The
merge tool accepts auto_merge to merge when all checks pass; the deprecated
merge_when_pipeline_succeeds input remains available as an alias.
Authentication and token scopes
The server sends the configured token in GitLab's recommended PRIVATE-TOKEN
header. Use the narrowest token and project membership that supports the tools
you enable:
readonly: useread_api; addread_repositorywhen repository content is needed and the token type supports that scope.readwrite: useapi, because issue, merge request, repository, and pipeline writes require API write access.
GitLab authorization still applies to every request. A token cannot access or modify resources that its user, project, or group membership cannot access.
Transports
stdio
gitlab-mcp --transport=stdio
Streamable HTTP
gitlab-mcp --transport=http --http-addr=127.0.0.1:8080 \
--auth-token=choose-a-separate-mcp-token
HTTP clients must then send Authorization: Bearer <mcp-token>. This token
protects the MCP endpoint and is separate from GITLAB_TOKEN. If no MCP auth
token is configured, the HTTP endpoint has no application-level
authentication. The server logs a warning when that is combined with
readwrite mode.
Cross-origin browser POST requests are rejected. Native MCP clients without an
Origin header and same-origin browser clients are supported.
MCP client configuration
Claude Desktop:
{
"mcpServers": {
"gitlab": {
"command": "gitlab-mcp",
"args": [],
"env": {
"GITLAB_BASE_URL": "https://gitlab.com",
"GITLAB_TOKEN": "glpat-your-token",
"GITLAB_MODE": "readonly"
}
}
}
}
VS Code .vscode/mcp.json:
{
"servers": {
"gitlab": {
"command": "gitlab-mcp",
"args": [],
"env": {
"GITLAB_BASE_URL": "https://gitlab.com",
"GITLAB_TOKEN": "glpat-your-token",
"GITLAB_MODE": "readonly"
}
}
}
}
Development
Requires Go 1.27.3 or newer, matching go.mod.
go build ./...
go test ./...
go vet ./...
Tests cover configuration, authentication, project-path and file-path
encoding, pagination headers and links, API errors, safe retry handling, merge
request drafts and diffs, binary file preservation, empty-file commit actions,
job details and logs, tool mode gating, secret-safe CLI help, and end-to-end
stdio and HTTP MCP connections. CI also runs the race detector and go vet.
License
MIT. See LICENSE.
GitLab MCP 질문
GitLab MCP는 어떤 도구를 제공하나요?
33개 도구를 제공합니다. 예: gitlab_get_metadata, gitlab_get_current_user, gitlab_list_projects, gitlab_get_project, gitlab_list_issues.
Does this server support self-managed GitLab instances?
Yes, it supports both GitLab.com and GitLab Self-Managed instances.
Can I use this server to modify GitLab data?
Yes, but you must explicitly set the mode to 'readwrite' to enable write tools like creating issues or merge requests.
What happens if a GitLab job log is very large?
If a job log exceeds 1 MiB, the server returns a size-limit error instead of a partial log.
How does the server handle API rate limits?
The server automatically retries rate-limited 429 responses up to three times.