/ الدليل / الملعب / GitLab MCP
● مجتمع zereight 🔑 يتطلب مفتاحك

GitLab MCP

بواسطة zereight · zereight/gitlab-mcp

Treat GitLab like the GitHub MCP treats GitHub — issues, MRs, pipelines, comments — with explicit support for self-hosted instances.

Zereight's GitLab MCP is the de-facto community implementation. It covers REST and a curated GraphQL surface, supports self-hosted GitLab via GITLAB_API_URL, and has fine-grained read/write tool gating.

لماذا تستخدمه

الميزات الأساسية

عرض مباشر

كيف يبدو في الممارسة

جاهز

التثبيت

اختر العميل

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

افتح Claude Desktop → Settings → Developer → Edit Config. أعد التشغيل بعد الحفظ.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

يستخدم Cursor نفس مخطط mcpServers مثل Claude Desktop. إعدادات المشروع أولى من الإعدادات العامة.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

انقر على أيقونة MCP Servers في شريط Cline الجانبي، ثم "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "gitlab-mcp-zereight": {
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ],
      "env": {
        "GITLAB_PERSONAL_ACCESS_TOKEN": "${GITLAB_TOKEN}",
        "GITLAB_API_URL": "https://gitlab.com/api/v4"
      }
    }
  }
}

نفس الصيغة مثل Claude Desktop. أعد تشغيل Windsurf لتطبيق التغييرات.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "gitlab-mcp-zereight",
      "command": "npx",
      "args": [
        "-y",
        "@zereight/mcp-gitlab"
      ]
    }
  ]
}

يستخدم Continue مصفوفة من كائنات الخادم بدلاً من خريطة.

~/.config/zed/settings.json
{
  "context_servers": {
    "gitlab-mcp-zereight": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@zereight/mcp-gitlab"
        ]
      }
    }
  }
}

أضف إلى context_servers. يعيد Zed التحميل تلقائيًا عند الحفظ.

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

أمر من سطر واحد. تحقق باستخدام claude mcp list. احذف باستخدام claude mcp remove.

حالات الاستخدام

استخدامات عملية: GitLab MCP

Review an MR end-to-end from Claude

👤 Developers ⏱ ~15 min intermediate

متى تستخدمه: You want a quick triage pass on a teammate's MR before opening the GitLab UI.

الخطوات
  1. Get MR
    Fetch MR by IID; pull title, description, diffs.✓ تم النسخ
    → Diff loaded
  2. Inspect pipeline
    List pipelines for this MR; report failures.✓ تم النسخ
    → Pipeline status known
  3. Comment
    Post inline comments for the issues you found.✓ تم النسخ
    → Comments visible in UI

النتيجة: MR review done without leaving Claude; comments posted under your account.

Triage failing pipelines across projects

👤 Developers ⏱ ~15 min intermediate

متى تستخدمه: CI is red across several projects and you want a unified view.

الخطوات
  1. List failed
    list_pipelines status=failed across group X.✓ تم النسخ
    → Failed pipelines listed
  2. Pull logs
    For each, fetch the failing job log tail.✓ تم النسخ
    → Top error per pipeline
  3. Cluster
    Group by error signature; identify the shared cause.✓ تم النسخ
    → One root-cause summary

النتيجة: You know whether it's one infra issue or N independent failures.

التركيبات

اجمعها مع خوادم MCP أخرى لتحقيق نتائج x10

gitlab-mcp-zereight + linear

Cross-link Linear issues to GitLab MRs in PR descriptions

Combine gitlab-mcp-zereight with linear: Cross-link Linear issues to GitLab MRs in PR descriptions✓ تم النسخ

الأدوات

ما يوفره هذا الـ MCP

الأداةالمدخلاتمتى تستدعيهاالتكلفة
list_issues (see docs) List issues with filters 1 call
get_merge_request (see docs) Fetch MR details + diffs 1 call
create_merge_request (see docs) Open a new MR 1 call
list_pipelines (see docs) List CI pipelines 1 call
retry_pipeline (see docs) Retry a failed pipeline 1 call
add_comment (see docs) Post issue/MR comment 1 call

التكلفة والحدود

تكلفة التشغيل

حصة API
GitLab API rate limits (varies by instance)
الرموز لكل استدعاء
MR diffs can be huge — paginate
التكلفة المالية
Free; your GitLab plan applies
نصيحة
Use read-only mode for any agent that doesn't need to write

الأمان

الصلاحيات والأسرار ونطاق الأثر

الحد الأدنى من الصلاحيات: api read_repository (scoped PAT)
تخزين بيانات الاعتماد: PAT in env var
نقل البيانات الخارجي: Your GitLab API URL only
لا تمنح أبدًا: use sudo scope unless you know why

استكشاف الأخطاء

الأخطاء الشائعة وحلولها

401 on self-hosted

Set GITLAB_API_URL to the full /api/v4 URL of your instance

Rate limited

Use a project-scoped PAT; lower polling cadence

البدائل

GitLab MCP مقابل البدائل

البديلمتى تستخدمهاالمقايضة
Official GitLab MCPOnce GitLab ships first-partyNot yet GA
github-mcp-serverYou're on GitHubDifferent platform

المزيد

الموارد

📖 اقرأ ملف README الرسمي على GitHub

🐙 تصفح القضايا المفتوحة

🔍 تصفح أكثر من 400 خادم MCP و Skills