WG

wadew/gitlab-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 3 forks 质量 66 趋势 13MIT

An MCP server for the GitLab community server

概览

A production-ready Model Context Protocol (MCP) server that enables AI assistants like Claude Code to interact seamlessly with self-hosted GitLab instances. The GitLab MCP Server provides a complete, type-safe interface for AI assistants to interact with GitLab, supporting: - : Search code, browse files, manage branches and commits - : Create, update, close issues, manage labels and comments - : Complete MR workflows including creation, review, approval, and merging - : Monitor pipeline status, trigger jobs, access artifacts and logs - : Milestones, labels, project settings - : Security scanning results, vulnerability tracking - : Wikis, snippets, releases, user/group management Built with practices, featuring 1257 tests and 84% code coverage.

README

以下为原文 README 节选,完整内容请查看原文。

GitLab MCP Server

A production-ready Model Context Protocol (MCP) server that enables AI assistants like Claude Code to interact seamlessly with self-hosted GitLab instances.

Overview

The GitLab MCP Server provides a complete, type-safe interface for AI assistants to interact with GitLab, supporting:

  • Repository Operations: Search code, browse files, manage branches and commits
  • Issue Management: Create, update, close issues, manage labels and comments
  • Merge Requests: Complete MR workflows including creation, review, approval, and merging
  • CI/CD Pipelines: Monitor pipeline status, trigger jobs, access artifacts and logs
  • Project Management: Milestones, labels, project settings
  • Security & Compliance: Security scanning results, vulnerability tracking
  • Advanced Features: Wikis, snippets, releases, user/group management

Built with strict Test-Driven Development (TDD) practices, featuring 1257 tests and 84% code coverage.

Transport Modes: stdio (default) and Streamable HTTP for remote clients Slim Mode: 3 meta-tools for 95% context reduction in LLM conversations

Features

Complete Tool Suite (87 Tools + 14 Prompts + 13 Resources)

Repository Tools (16)

  • Search repositories, code, and commits
  • Browse files and directory trees
  • Create, update, delete files
  • Manage branches and tags
  • View commit history and diffs
  • Compare branches

Issue Tools (8)

  • Create, read, update, close issues
  • Reopen closed issues
  • Add comments and list comments
  • Search and filter issues

Merge Request Tools (14)

  • Create and manage merge requests
  • Review code and add comments
  • Approve and merge MRs
  • Manage reviewers and assignees
  • Track MR pipelines and changes

CI/CD Pipeline Tools (14)

  • List and monitor pipelines
  • Create, retry, cancel, delete pipelines
  • View job logs and status
  • Download and manage artifacts
  • Retry and cancel jobs
  • Play manual jobs

Project Management Tools (10)

  • Create, search, and manage projects
  • View project statistics
  • Manage milestones
  • Handle project members

Labels, Wikis, Snippets, Releases (19)

  • Label management (4 tools)
  • Wiki page operations (5 tools)
  • Code snippets (5 tools)
  • Release management (5 tools)

Users & Groups (6)

  • User lookup and search
  • Group listing and details
  • Group member management

Meta Tools (3) - Slim Mode

  • discover_tools - List available tools by category
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gitlab": { "command": "python", "args": ["-m", "gitlab_mcp.server"], "env": { "GITLAB_URL": "https://gitlab.example.com", "GITLAB_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxx" } } } }