मुख्य सामग्री पर जाएँ
Skillpedia
● मुफ़्त और ओपन सोर्स💻 लोकल🔑 API कुंजी चाहिएप्रोग्रामिंग

GitLab MCP Server

आपका AI एजेंट GitLab projects, merge requests, issues, pipelines, wikis और releases के साथ काम कर सकता है।

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 की merge request 123 में बदली हुई फ़ाइलों की सूची दिखाओ।
फ़ेल हुए pipeline job का आउटपुट दिखाओ।

यह क्या है

यह server एजेंट को REST और GraphQL API के ज़रिए GitLab से जोड़ता है। यह 40 tools के साथ शुरू होता है और category के हिसाब से 288 तक tools चालू कर सकता है। यह gitlab.com और self-hosted दोनों तरह के instances को सपोर्ट करता है, और इसमें read-only mode भी है।

यह क्या कर सकता है

  • list_merge_request_changed_files और get_merge_request_file_diff: दो चरणों में merge request की समीक्षा
  • get_pipeline_job_output: pagination के साथ job logs पढ़ें
  • discover_tools: और tool categories चालू करें
  • help
  • execute_graphql
  • Projects, issues, wiki, releases, tags और milestones
  • बड़े नतीजों को छोटा करने के लिए jmespath विकल्प

कब इस्तेमाल करें

  • ›जब आप चाहते हैं कि एजेंट merge request की समीक्षा फ़ाइल-दर-फ़ाइल करे।
  • ›जब pipeline फ़ेल हो और आप GitLab खोले बिना job log देखना चाहें।
  • ›जब आप चैट से issues और milestones मैनेज करना चाहें।

आपको क्या चाहिए

GitLab personal access token (या OAuth) और Node.js 20 या नया। npm install -g @zereight/mcp-gitlab से इंस्टॉल करें, फिर zereight-mcp-gitlab binary इस्तेमाल करें।

साथ में जमने वाली skills

⭐ Skillpedia MCP · मुफ़्तआपका एजेंट सही skill अपने आप ढूँढ लेता हैहमारा MCP इंस्टॉल करें और ज़रूरत पड़ने पर आपका एजेंट 15,000+ skills में खोजेगा।मुफ़्त इंस्टॉल करें →

अक्सर पूछे जाने वाले सवाल

यह कितने tools दिखाता है?

डिफ़ॉल्ट रूप से 40 (38 core और discover_tools तथा help)। कुल 288 मौजूद हैं।

क्या मुझे सारे tools लोड करने चाहिए?

नहीं। README कहता है कि GITLAB_TOOLSETS=all न सेट करें, इससे लगभग 73k schema tokens खर्च होते हैं। इसके बजाय discover_tools इस्तेमाल करें।

साइन इन कैसे करें?

GITLAB_PERSONAL_ACCESS_TOKEN से, local OAuth से, Claude.ai के लिए MCP OAuth से, या हर request पर remote authorization से।

क्या यह self-hosted GitLab के साथ काम करता है?

हां, GITLAB_API_URL को अपने instance पर सेट करें।

क्या मैं इसे MCP के बिना इस्तेमाल कर सकता हूं?

हां। एक Skill और CLI रास्ता है, जो terminal में zereight-mcp-gitlab से वही काम करता है।

क्या api toolset सुरक्षित है?

README चेतावनी देता है कि यह allowlists और safety checks को बायपास करता है और prompt injection से चलाया जा सकता है। इसे सिर्फ़ जानबूझकर चालू करें।

अगर काम न करे

  • ›जांचें कि token सेट है और GITLAB_API_URL सही है, जैसे https://gitlab.com/api/v4।
  • ›जांचें कि Node.js का version 20 या नया है।
  • ›project_id के लिए URL-encoded project path इस्तेमाल करें, जैसे group%2Fproject।

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।