Skip to main content
Glama

GitLab MCP Server

Official

GitLab MCP 서버

GitLab API를 위한 MCP 서버로, 프로젝트 관리, 파일 작업 등을 지원합니다.

특징

  • 자동 브랜치 생성 : 파일을 생성/업데이트하거나 변경 사항을 푸시할 때 브랜치가 없으면 자동으로 생성됩니다.
  • 포괄적인 오류 처리 : 일반적인 문제에 대한 명확한 오류 메시지
  • Git 기록 보존 : 운영자는 강제 푸시 없이 적절한 Git 기록을 유지합니다.
  • 일괄 작업 : 단일 파일 및 다중 파일 작업 모두 지원

도구

  1. create_or_update_file
    • 프로젝트에서 단일 파일을 생성하거나 업데이트합니다.
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • file_path (문자열): 파일을 생성/업데이트할 경로
      • content (문자열): 파일의 내용
      • commit_message (문자열): 커밋 메시지
      • branch (문자열): 파일을 생성/업데이트할 브랜치
      • previous_path (선택적 문자열): 이동/이름을 바꿀 파일의 경로
    • 반환: 파일 내용 및 커밋 세부 정보
  2. push_files
    • 단일 커밋에 여러 파일 푸시
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • branch (문자열): 푸시할 브랜치
      • files (배열): 푸시할 파일, 각각 file_pathcontent 있음
      • commit_message (문자열): 커밋 메시지
    • 반환: 업데이트된 지점 참조
  3. search_repositories
    • GitLab 프로젝트 검색
    • 입력:
      • search (문자열): 검색어
      • page (선택적 숫자): 페이지 번호
      • per_page (선택적 숫자): 페이지당 결과(기본값 20)
    • 반환: 프로젝트 검색 결과
  4. create_repository
    • 새로운 GitLab 프로젝트를 만듭니다
    • 입력:
      • name (문자열): 프로젝트 이름
      • description (선택 문자열): 프로젝트 설명
      • visibility (선택적 문자열): '비공개', '내부' 또는 '공개'
      • initialize_with_readme (선택적 부울): README로 초기화
    • 반환: 프로젝트 세부 정보 생성됨
  5. get_file_contents
    • 파일이나 디렉토리의 내용을 가져옵니다
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • file_path (문자열): 파일/디렉토리 경로
      • ref (선택적 문자열): 콘텐츠를 가져올 브랜치/태그/커밋
    • 반환: 파일/디렉토리 내용
  6. create_issue
    • 새로운 이슈를 생성하세요
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • title (문자열): 이슈 제목
      • description (선택 문자열): 문제 설명
      • assignee_ids (선택 사항 number[]): 할당할 사용자 ID
      • labels (선택적 문자열[]): 추가할 레이블
      • milestone_id (선택적 숫자): 마일스톤 ID
    • 반환: 문제 세부 정보 생성됨
  7. create_merge_request
    • 새로운 병합 요청 만들기
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • title (문자열): MR 제목
      • description (선택 문자열): MR 설명
      • source_branch (문자열): 변경 사항을 포함하는 브랜치
      • target_branch (문자열): 병합할 브랜치
      • draft (선택적 부울): 초안 MR로 생성
      • allow_collaboration (선택적 부울): 업스트림 멤버의 커밋 허용
    • 반환: 병합 요청 세부 정보가 생성되었습니다.
  8. fork_repository
    • 프로젝트 포크하기
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • namespace (선택적 문자열): 포크할 네임스페이스
    • 반환: 포크된 프로젝트 세부 정보
  9. create_branch
    • 새로운 지점을 만드세요
    • 입력:
      • project_id (문자열): 프로젝트 ID 또는 URL로 인코딩된 경로
      • branch (문자열): 새 브랜치의 이름
      • ref (선택적 문자열): 새 브랜치에 대한 소스 브랜치/커밋
    • 반환: 생성된 브랜치 참조

설정

개인 액세스 토큰

적절한 권한을 가진 GitLab 개인 액세스 토큰을 생성하세요 .

  • GitLab에서 사용자 설정 > 액세스 토큰으로 이동하세요.
  • 필요한 범위를 선택하세요:
    • 전체 API 액세스를 위한 api
    • 읽기 전용 액세스를 위한 read_api
    • 저장소 작업을 위한 read_repositorywrite_repository
  • 토큰을 생성하고 안전하게 저장하세요

Claude Desktop과 함께 사용

claude_desktop_config.json 에 다음을 추가하세요.

도커

지엑스피1

엔피엑스
{ "mcpServers": { "gitlab": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-gitlab" ], "env": { "GITLAB_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>", "GITLAB_API_URL": "https://gitlab.com/api/v4" // Optional, for self-hosted instances } } } }

VS Code를 사용한 사용

빠른 설치를 위해 아래의 원클릭 설치 버튼 중 하나를 사용하세요...

수동 설치의 경우, VS Code의 사용자 설정(JSON) 파일에 다음 JSON 블록을 추가하세요. Ctrl + Shift + P 를 누르고 Preferences: Open User Settings (JSON) 입력하면 됩니다.

원하는 경우, 작업 공간의 .vscode/mcp.json 파일에 추가할 수 있습니다. 이렇게 하면 다른 사용자와 구성을 공유할 수 있습니다.

.vscode/mcp.json 파일에는 mcp 키가 필요하지 않습니다.

도커
{ "mcp": { "inputs": [ { "type": "promptString", "id": "gitlab_token", "description": "GitLab Personal Access Token", "password": true }, { "type": "promptString", "id": "gitlab_url", "description": "GitLab API URL (optional)", "default": "https://gitlab.com/api/v4" } ], "servers": { "gitlab": { "command": "docker", "args": [ "run", "--rm", "-i", "mcp/gitlab" ], "env": { "GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab_token}", "GITLAB_API_URL": "${input:gitlab_url}" } } } } }
엔피엑스
{ "mcp": { "inputs": [ { "type": "promptString", "id": "gitlab_token", "description": "GitLab Personal Access Token", "password": true }, { "type": "promptString", "id": "gitlab_url", "description": "GitLab API URL (optional)", "default": "https://gitlab.com/api/v4" } ], "servers": { "gitlab": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-gitlab" ], "env": { "GITLAB_PERSONAL_ACCESS_TOKEN": "${input:gitlab_token}", "GITLAB_API_URL": "${input:gitlab_url}" } } } } }

짓다

Docker 빌드:

docker build -t vonwig/gitlab:mcp -f src/gitlab/Dockerfile .

환경 변수

  • GITLAB_PERSONAL_ACCESS_TOKEN : GitLab 개인 액세스 토큰(필수)
  • GITLAB_API_URL : GitLab API의 기본 URL(선택 사항, 기본값은 https://gitlab.com/api/v4 )

특허

이 MCP 서버는 MIT 라이선스에 따라 라이선스가 부여됩니다. 즉, MIT 라이선스의 조건에 따라 소프트웨어를 자유롭게 사용, 수정 및 배포할 수 있습니다. 자세한 내용은 프로젝트 저장소의 LICENSE 파일을 참조하세요.

Deploy Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

GitLab API를 위한 MCP 서버로, 프로젝트 관리, 파일 작업 등을 지원합니다.

  1. 특징
    1. 도구
      1. 설정
        1. 개인 액세스 토큰
        2. Claude Desktop과 함께 사용
        3. VS Code를 사용한 사용
      2. 짓다
        1. 환경 변수
          1. 특허

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              MCP Server for the GitHub API, enabling file operations, repository management, search functionality, and more.
              Last updated -
              22,573
              68,255
              MIT License
            • A
              security
              F
              license
              A
              quality
              MCP Server for the GitHub API, providing features for file operations, repository management, and advanced search, with automatic branch creation and comprehensive error handling.
              Last updated -
              18
              0
              4
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              GitLab MCP Server (with activity tracking and group projects listing features) This server is based on the original GitLab MCP server with Group Projects Listing and Activity Tracking enhancements
              Last updated -
              28
              86
              27
              MIT License
            • -
              security
              A
              license
              -
              quality
              An MCP server that enables communication with GitLab repositories, allowing interaction with GitLab's API to manage projects, issues, and repositories through natural language.
              Last updated -
              7,512
              1
              MIT License

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/modelcontextprotocol/gitlab'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server