본문으로 건너뛰기
Skillpedia
● 무료 오픈소스💻 로컬🔑 API 키 필요프로그래밍

GitLab MCP Server

AI 에이전트가 GitLab 프로젝트, 병합 요청, 이슈, 파이프라인, 위키, 릴리스를 다룰 수 있게 해 줍니다.

2.1k GitHub 스타제작 zereight라이선스 MIT업데이트 18일 전

설치 방법

이 MCP는 로컬 방식이에요. 내 컴퓨터에서 실행돼요.

PC에 설치한 앱(Claude Desktop, Claude Code, Cursor, VS Code 등)에서 쓸 수 있어요. 앱을 고르세요:

터미널에 붙여 넣기:

claude mcp add gitlab -- npx -y @zereight/mcp-gitlab

채워야 할 것

이름설명필수
GITLAB_PERSONAL_ACCESS_TOKENGitLab personal access token for local stdio use. A non-empty value overrides GITLAB_PERSONAL_ACCESS_TOKEN_FILE. One of this token, GITLAB_PERSONAL_ACCESS_TOKEN_FILE, GITLAB_JOB_TOKEN, GITLAB_AUTH_COOKIE_PATH, or GITLAB_USE_OAUTH=true must be set. Create a token with the GitLab scopes the tools need, such as api or read_api.아니요
GITLAB_PERSONAL_ACCESS_TOKEN_FILEPath to a file that contains the personal access token. Read once at startup and trimmed. Ignored when GITLAB_PERSONAL_ACCESS_TOKEN or --token is non-empty. A missing, unreadable, or empty file stops startup. Does not replace job token, OAuth, cookie, or remote authorization.아니요
GITLAB_JOB_TOKENOptional GitLab CI job token to use instead of a personal access token when running inside GitLab CI.아니요
GITLAB_AUTH_COOKIE_PATHOptional path to a GitLab authentication cookie file for cookie-based authentication.아니요
GITLAB_USE_OAUTHSet to true to start with GitLab OAuth instead of a personal access token, job token, or cookie file.아니요
GITLAB_OAUTH_CLIENT_IDGitLab OAuth application ID. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_TOKEN_SCRIPT.아니요
GITLAB_OAUTH_TOKEN_SCRIPTCommand that prints an OAuth access token. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_CLIENT_ID.아니요
GITLAB_API_URLGitLab API base URL. Use https://gitlab.com/api/v4 for GitLab.com or your self-managed GitLab API URL.아니요
GITLAB_ALLOWED_PROJECT_IDSOptional comma-separated list of GitLab project IDs that this server is allowed to access.아니요
GITLAB_PERMISSION_MODETool exposure. Allowed values are readonly, modify, and full. Unset uses full. readonly keeps read-only tools. modify blocks delete and teardown tools.아니요
GITLAB_TOOLSETSOptional comma-separated toolset ids (projects, issues, merge_requests, …). Unset keeps the lean core default plus discover_tools. Do not set all unless you accept loading ~all schemas (~73k tokens).아니요
GITLAB_TOOLSOptional comma-separated list of individual tool names to add on top of enabled toolsets.아니요
GITLAB_DENIED_TOOLS_REGEXOptional regular expression used to hide matching tools from the server.아니요
GITLAB_TOOL_POLICY_APPROVEOptional comma-separated list of tool names that require explicit approval before execution.아니요
GITLAB_TOOL_POLICY_HIDDENOptional comma-separated list of tool names to hide from tools/list.아니요
NODE_TLS_REJECT_UNAUTHORIZEDSet to 0 only when you intentionally need to connect to a GitLab instance with invalid or self-signed TLS certificates.아니요
GITLAB_CA_CERT_PATHOptional path to a custom CA certificate file for self-managed GitLab instances.아니요
GITLAB_MASKING_ENABLEDSet to true to mask text tool results and returned errors using built-in or configured rules.아니요
GITLAB_MASKING_CONFIGOptional path to a response-masking JSON configuration file.아니요
GITLAB_MASKING_POLICY_FILEOptional protected server-owned JSON file containing managed masking policies.아니요
GITLAB_MASKING_WORKSPACE_DIRDirectory used to resolve response-masking configuration paths.아니요

준비 끝! 이제 테스트해 보세요

앱을 다시 시작하고 아래 요청 중 하나를 채팅에 붙여 넣으세요:

group/project의 병합 요청 123번에서 변경된 파일을 나열해 주세요.
실패한 파이프라인 작업의 출력을 보여 주세요.

무엇인가요

이 서버는 REST와 GraphQL API로 에이전트를 GitLab에 연결합니다. 40개 도구로 시작하며, 카테고리별로 더 켜서 총 288개까지 늘릴 수 있습니다. gitlab.com과 자체 호스팅 인스턴스를 모두 지원하며, 읽기 전용 모드도 있습니다.

할 수 있는 일

  • list_merge_request_changed_files와 get_merge_request_file_diff: 병합 요청을 두 단계로 검토합니다
  • get_pipeline_job_output: 페이지 단위로 작업 로그를 읽습니다
  • discover_tools: 도구 카테고리를 더 활성화합니다
  • help
  • execute_graphql
  • 프로젝트, 이슈, 위키, 릴리스, 태그, 마일스톤
  • jmespath 옵션: 큰 결과를 줄입니다

언제 쓰나요

  • ›에이전트가 병합 요청의 파일을 하나씩 검토하게 하고 싶을 때
  • ›파이프라인이 실패했을 때 GitLab을 열지 않고 작업 로그를 보고 싶을 때
  • ›채팅에서 이슈와 마일스톤을 관리하고 싶을 때

필요한 것

GitLab 개인 액세스 토큰(또는 OAuth)과 Node.js 20 이상이 필요합니다. npm install -g @zereight/mcp-gitlab으로 설치한 뒤 zereight-mcp-gitlab 실행 파일을 사용하세요.

함께 쓰면 좋은 스킬

⭐ Skillpedia MCP · 무료에이전트가 알아서 알맞은 스킬을 찾아요우리 MCP를 설치하면 필요할 때 에이전트가 15,000+개의 스킬 중에서 찾아요.무료로 설치 →

자주 묻는 질문

기본으로 도구가 몇 개 보이나요?

기본은 40개입니다(핵심 38개와 discover_tools, help). 전체는 288개입니다.

모든 도구를 불러와야 하나요?

아니요. README는 GITLAB_TOOLSETS=all을 쓰지 말라고 합니다. 약 73k 스키마 토큰이 들기 때문입니다. 대신 discover_tools를 사용하세요.

어떻게 로그인하나요?

GITLAB_PERSONAL_ACCESS_TOKEN, 로컬 OAuth, Claude.ai용 MCP OAuth, 요청별 원격 인증 중에서 선택할 수 있습니다.

자체 호스팅 GitLab과 함께 쓸 수 있나요?

네. GITLAB_API_URL을 자신의 인스턴스 주소로 설정하세요.

MCP 없이도 쓸 수 있나요?

네. Skill과 CLI 방식으로 터미널에서 zereight-mcp-gitlab을 사용해 같은 작업을 할 수 있습니다.

api 도구 모음은 안전한가요?

README는 이 도구 모음이 허용 목록과 안전 검사를 우회할 수 있고, 프롬프트 인젝션으로 조작될 수 있다고 경고합니다. 꼭 필요할 때만 켜세요.

작동하지 않을 때

  • ›토큰이 설정되어 있는지, GITLAB_API_URL이 맞는지 확인하세요. 예: https://gitlab.com/api/v4
  • ›Node.js 버전이 20 이상인지 확인하세요.
  • ›project_id에는 group%2Fproject처럼 URL 인코딩된 프로젝트 경로를 사용하세요.

매주 새 스킬 5개. 읽는 데 1분.