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_TOKEN | GitLab 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_FILE | Path 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_TOKEN | Optional GitLab CI job token to use instead of a personal access token when running inside GitLab CI. | नहीं |
GITLAB_AUTH_COOKIE_PATH | Optional path to a GitLab authentication cookie file for cookie-based authentication. | नहीं |
GITLAB_USE_OAUTH | Set to true to start with GitLab OAuth instead of a personal access token, job token, or cookie file. | नहीं |
GITLAB_OAUTH_CLIENT_ID | GitLab OAuth application ID. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_TOKEN_SCRIPT. | नहीं |
GITLAB_OAUTH_TOKEN_SCRIPT | Command that prints an OAuth access token. When GITLAB_USE_OAUTH=true, set this or GITLAB_OAUTH_CLIENT_ID. | नहीं |
GITLAB_API_URL | GitLab API base URL. Use https://gitlab.com/api/v4 for GitLab.com or your self-managed GitLab API URL. | नहीं |
GITLAB_ALLOWED_PROJECT_IDS | Optional comma-separated list of GitLab project IDs that this server is allowed to access. | नहीं |
GITLAB_PERMISSION_MODE | Tool exposure. Allowed values are readonly, modify, and full. Unset uses full. readonly keeps read-only tools. modify blocks delete and teardown tools. | नहीं |
GITLAB_TOOLSETS | Optional 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_TOOLS | Optional comma-separated list of individual tool names to add on top of enabled toolsets. | नहीं |
GITLAB_DENIED_TOOLS_REGEX | Optional regular expression used to hide matching tools from the server. | नहीं |
GITLAB_TOOL_POLICY_APPROVE | Optional comma-separated list of tool names that require explicit approval before execution. | नहीं |
GITLAB_TOOL_POLICY_HIDDEN | Optional comma-separated list of tool names to hide from tools/list. | नहीं |
NODE_TLS_REJECT_UNAUTHORIZED | Set to 0 only when you intentionally need to connect to a GitLab instance with invalid or self-signed TLS certificates. | नहीं |
GITLAB_CA_CERT_PATH | Optional path to a custom CA certificate file for self-managed GitLab instances. | नहीं |
GITLAB_MASKING_ENABLED | Set to true to mask text tool results and returned errors using built-in or configured rules. | नहीं |
GITLAB_MASKING_CONFIG | Optional path to a response-masking JSON configuration file. | नहीं |
GITLAB_MASKING_POLICY_FILE | Optional protected server-owned JSON file containing managed masking policies. | नहीं |
GITLAB_MASKING_WORKSPACE_DIR | Directory 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 चालू करेंhelpexecute_graphql- Projects, issues, wiki, releases, tags और milestones
- बड़े नतीजों को छोटा करने के लिए
jmespathविकल्प
कब इस्तेमाल करें
- ›जब आप चाहते हैं कि एजेंट merge request की समीक्षा फ़ाइल-दर-फ़ाइल करे।
- ›जब pipeline फ़ेल हो और आप GitLab खोले बिना job log देखना चाहें।
- ›जब आप चैट से issues और milestones मैनेज करना चाहें।
आपको क्या चाहिए
npm install -g @zereight/mcp-gitlab से इंस्टॉल करें, फिर zereight-mcp-gitlab binary इस्तेमाल करें।साथ में जमने वाली skills
MCP या skill?
MCP एजेंट को हाथ देता है। Skill सिखाती है कि उन्हें सही तरह कैसे इस्तेमाल करें। साथ में नतीजा बेहतर आता है और टोकन कम लगते हैं।
gitlab-automationआपके एजेंट को GitLab में प्रोजेक्ट मैनेजमेंट को ऑटोमेट करने देता है। यह issues, merge requests और pipelines को प्रोग्राम के ज़रिए कंट्रोल करने में मदद करता है।building-devsecops-pipeline-with-gitlab-ciआपके एजेंट को development प्रक्रिया में security जोड़ने में मदद करता है। यह release से पहले code और applications में खामियां जांचता है।github-gitlabयह आपके एजेंट को GitHub या GitLab प्रोजेक्ट तक पहुँच देती है, ताकि वह इश्यू, पुल रिक्वेस्ट और इतिहास देख सके और स्वीकृत छोटे बदलाव कर सके।अक्सर पूछे जाने वाले सवाल
यह कितने 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 मिनट में पढ़ें।