MG

mehmetakinn/gitlab-mcp-code-review

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

45 stars 16 forks 品質 69 トレンド 12MIT

mehmetakinn/gitlab-mcp-code-review は [https://github.com/mehmetakinn/gitlab-mcp-code-review. からインポートされた MCP サーバーの候補です

概要

mehmetakinn/gitlab-mcp-code-review は [https://github.com/mehmetakinn/gitlab-mcp-code-review. からインポートされた MCP サーバーの候補です

概要(AI 翻訳)

このプロジェクトは、Cayirtepeomer/gerrit-code-review-mcp からフォークされ、GitLab の統合に適応されます。

ClaudeのようなAIアシスタントをGitLabのマージリクエストと統合するためのMCP(モデルコンテキストプロトコル)サーバー。 これにより、AI アシスタントは、GitLab API を介して直接コードの変更をレビューすることができます。

##特徴

  • 完全なマージリクエスト分析: diffs、コミット、コメントを含むマージリクエストに関する完全な詳細を取得します
  • File-Specific Diffs:マージリクエスト内の特定のファイルの変更を分析する
  • バージョン比較: 異なるブランチ、タグ、またはコミットを比較する
  • レビュー管理: コメントの追加、承認、または合併リクエストの承認 -プロジェクト概要: プロジェクト内のすべてのマージリクエストのリストを取得する

インストール

前提条件

  • Python 3.10 +
  • GitLab APIスコープ(read api、api)による個人アクセストークン
  • MCP の統合のための Cursor IDE または Claude デスクトップ アプリ

クイックスタート

  1. このリポジトリをクローンする:

  2. 仮想環境の作成と活性化:

  3. 依存関係を取付けて下さい:

  4. GitLab の設定で [[.env] ファイルを作成します([.env.example]を参照してください)。

設定オプション

以下の環境変数は ` で設定できます.

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

GitLab MCP for Code Review

This project is forked from cayirtepeomer/gerrit-code-review-mcp and adapted for GitLab integration.

An MCP (Model Context Protocol) server for integrating AI assistants like Claude with GitLab’s merge requests. This allows AI assistants to review code changes directly through the GitLab API.

Features

  • Complete Merge Request Analysis: Fetch full details about merge requests including diffs, commits, and comments
  • File-Specific Diffs: Analyze changes to specific files within merge requests
  • Version Comparison: Compare different branches, tags, or commits
  • Review Management: Add comments, approve, or unapprove merge requests
  • Project Overview: Get lists of all merge requests in a project

Installation

Prerequisites

Quick Start

  1. Clone this repository:
git clone https://github.com/mehmetakinn/gitlab-mcp-code-review.git
cd gitlab-mcp-code-review
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create a .env file with your GitLab configuration (see .env.example for all options):
# Required
GITLAB_TOKEN=your_personal_access_token_here

# Optional settings
GITLAB_HOST=gitlab.com
GITLAB_API_VERSION=v4
LOG_LEVEL=INFO

Configuration Options

The following environment variables can be configured in your .env file:

Variable Required Default Description
GITLAB_TOKEN Yes - Your GitLab personal access token
GITLAB_HOST No gitlab.com GitLab instance hostname
GITLAB_API_VERSION No v4 GitLab API version to use
LOG_LEVEL No INFO Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
DEBUG No false Enable debug mode
REQUEST_TIMEOUT No 30 API request timeout in seconds
MAX_RETRIES No 3 Maximum retry attempts for failed requests

Cursor IDE Integration

To use this MCP with Cursor IDE, add this configuration to your ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "gitlab-mcp-code-review": {
      "command": "/path/to/your/gitlab-mcp-code-review/.venv/bin/python",
      "args": [
        "/path/to/your/gitlab-mcp-code-review/server.py",
        "--transport",
        "stdio"
      ],
      "cwd": "/path/to/your/gitlab-mcp-code-review",
      "env": {
GitHub で README 全文を見る

インストール

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

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "gitlab-mcp-code-review": { "command": "/path/to/your/gitlab-mcp-code-review/.venv/bin/python", "args": [ "/path/to/your/gitlab-mcp-code-review/server.py", "--transport", "stdio" ], "cwd": "/path/to/your/gitlab-mcp-code-review", "env": { "PYTHONPATH": "/path/to/your/gitlab-mcp-code-review", "VIRTUAL_ENV": "/path/to/your/gitlab-mcp-code-review/.venv", "PATH": "/path/to/your/gitlab-mcp-code-review/.venv/bin:/usr/local/bin:/usr/bin:/bin" }, "stdio": true } } }