Skip to main content
Glama

gitlab-mcp

GitLab API용 MCP 서버입니다. 자체 호스팅 GitLab 인스턴스 및 gitlab.com과 함께 작동합니다.

이슈, 머지 리퀘스트, 코드 리뷰, 파이프라인, 마일스톤, 릴리스, 검색 및 파일 액세스를 위한 도구를 제공합니다.

필수 조건

  • Node.js >= 18

  • npm

  • api 범위가 포함된 GitLab 개인 액세스 토큰

Related MCP server: GitLab MCP Server

설치

git clone <repo-url> gitlab-mcp
cd gitlab-mcp
npm install
npm run build

구성

프로젝트 루트에 config.json을 생성합니다:

{
  "token": "glpat-your-token-here",
  "apiUrl": "https://your-gitlab-instance.com/api/v4"
}

gitlab.com의 경우, "apiUrl": "https://gitlab.com/api/v4"를 사용하거나 해당 필드를 완전히 생략하십시오.

또는 config.json을 사용하는 대신 환경 변수를 설정할 수 있습니다:

export GITLAB_PERSONAL_ACCESS_TOKEN="glpat-your-token-here"
export GITLAB_API_URL="https://your-gitlab-instance.com/api/v4"

GitLab 토큰 생성

  1. GitLab > 설정 > 액세스 토큰으로 이동합니다.

  2. api 범위가 포함된 토큰을 생성합니다.

  3. 토큰을 config.json에 복사합니다.

Claude Code에 추가

Claude Code MCP 설정(~/.claude/settings.json 또는 프로젝트 수준의 .claude/settings.local.json)에 서버를 추가합니다:

{
  "mcpServers": {
    "gitlab": {
      "command": "node",
      "args": ["/absolute/path/to/gitlab-mcp/index.js"]
    }
  }
}

Claude Code를 다시 시작하거나 /mcp를 실행하여 연결합니다.

사용 가능한 도구

이슈

도구

설명

gitlab_get_issue

프로젝트 및 IID로 단일 이슈 가져오기

gitlab_list_group_issues

필터(상태, 라벨, 담당자, 검색, 마일스톤)를 사용하여 그룹 내 이슈 나열

gitlab_list_milestone_issues

마일스톤 내 이슈 나열

gitlab_create_issue

새 이슈 생성

gitlab_update_issue

이슈 업데이트(상태, 제목, 설명, 라벨, 담당자, 마일스톤)

gitlab_add_comment

이슈에 댓글 추가

머지 리퀘스트

도구

설명

gitlab_list_merge_requests

필터(상태, 작성자, 리뷰어, 담당자, 날짜, 대상 브랜치)를 사용하여 MR 나열. 프로젝트는 선택 사항입니다. 프로젝트 간 검색을 위해 생략하십시오.

gitlab_get_merge_request

프로젝트 및 IID로 단일 MR 가져오기

gitlab_get_mr_changes

MR의 diff / 변경된 파일 가져오기

gitlab_list_mr_notes

MR의 댓글/노트 나열

gitlab_add_mr_note

MR에 일반 댓글 추가

gitlab_create_mr_discussion

특정 파일 및 줄에 인라인 diff 댓글 생성

프로젝트, 마일스톤, 릴리스

도구

설명

gitlab_list_projects

그룹 내 프로젝트 나열

gitlab_list_milestones

그룹 내 마일스톤 나열

gitlab_list_releases

프로젝트의 릴리스 나열

검색 및 파일

도구

설명

gitlab_search

프로젝트 내 검색(코드, 이슈, MR, 커밋, 노트)

gitlab_get_file

저장소에서 파일 내용 가져오기

gitlab_list_pipelines

필터(상태, 참조)를 사용하여 CI/CD 파이프라인 나열

일반 API 요청

도구

설명

gitlab_api_request

모든 GitLab REST API 엔드포인트를 직접 호출합니다. 전용 도구가 없을 때 사용하십시오. method(GET/POST/PUT/PATCH/DELETE), path(예: /projects/93/merge_requests/2387/notes/74875) 및 선택적 body를 사용합니다.

예시 — 기존 MR 노트 편집:

gitlab_api_request({
  method: "PUT",
  path: "/projects/93/merge_requests/2387/notes/74875",
  body: { body: "Updated comment text" }
})

Claude Code에서의 사용 예시

> Review MR !2397 in octopus/reunion/client

Claude will use gitlab_get_merge_request, gitlab_get_mr_changes,
and gitlab_create_mr_discussion to review and leave inline comments.

개발

# Edit index.ts, then rebuild
npm run build

# Reconnect in Claude Code
/mcp

Related MCP Connectors

Related MCP Servers