[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-zereight--gitlab-mcp":3,"tool-zereight--gitlab-mcp":61},[4,18,26,36,44,52],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",141543,2,"2026-04-06T11:32:54",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":10,"last_commit_at":50,"category_tags":51,"status":17},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[35,15,13,14],{"id":53,"name":54,"github_repo":55,"description_zh":56,"stars":57,"difficulty_score":10,"last_commit_at":58,"category_tags":59,"status":17},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[14,15,13,60],"视频",{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":77,"owner_location":78,"owner_email":74,"owner_twitter":74,"owner_website":74,"owner_url":79,"languages":80,"stars":97,"forks":98,"last_commit_at":99,"license":100,"difficulty_score":32,"env_os":101,"env_gpu":102,"env_ram":102,"env_deps":103,"category_tags":108,"github_topics":74,"view_count":32,"oss_zip_url":74,"oss_zip_packed_at":74,"status":17,"created_at":110,"updated_at":111,"faqs":112,"releases":143},4462,"zereight\u002Fgitlab-mcp","gitlab-mcp","First gitlab mcp for you","gitlab-mcp 是一款专为 GitLab 打造的模型上下文协议（MCP）服务器，旨在让各类 AI 编程助手（如 Claude Code、Cursor、Copilot 等）能够直接理解并操作你的 GitLab 项目。它有效解决了大语言模型无法直接访问私有代码仓库、难以自动化执行代码审查或流水线管理等痛点，将 AI 的能力延伸至完整的 DevOps 工作流中。\n\n这款工具特别适合需要提升研发效率的开发者、技术团队及 DevOps 工程师使用。无论是日常代码管理、Issue 追踪，还是复杂的 CI\u002FCD 流水线控制，用户都能通过自然语言指令让 AI 代为完成。相比早期版本，gitlab-mcp 不仅修复了已知缺陷，还引入了多项实用特性：支持动态配置 GitLab API 地址以适应不同部署环境，具备连接池优化以提升响应速度，并提供多种灵活的身份验证方式。其中，基于浏览器的 OAuth2 认证流程兼顾了安全性与便捷性，而针对远程多用户场景的代理授权模式则满足了企业级部署需求。此外，它还允许通过环境变量或命令行参数精细控制对 Wiki、里程碑及流水线等特定功能的访问权限，确保集成过程既强大","gitlab-mcp 是一款专为 GitLab 打造的模型上下文协议（MCP）服务器，旨在让各类 AI 编程助手（如 Claude Code、Cursor、Copilot 等）能够直接理解并操作你的 GitLab 项目。它有效解决了大语言模型无法直接访问私有代码仓库、难以自动化执行代码审查或流水线管理等痛点，将 AI 的能力延伸至完整的 DevOps 工作流中。\n\n这款工具特别适合需要提升研发效率的开发者、技术团队及 DevOps 工程师使用。无论是日常代码管理、Issue 追踪，还是复杂的 CI\u002FCD 流水线控制，用户都能通过自然语言指令让 AI 代为完成。相比早期版本，gitlab-mcp 不仅修复了已知缺陷，还引入了多项实用特性：支持动态配置 GitLab API 地址以适应不同部署环境，具备连接池优化以提升响应速度，并提供多种灵活的身份验证方式。其中，基于浏览器的 OAuth2 认证流程兼顾了安全性与便捷性，而针对远程多用户场景的代理授权模式则满足了企业级部署需求。此外，它还允许通过环境变量或命令行参数精细控制对 Wiki、里程碑及流水线等特定功能的访问权限，确保集成过程既强大又安全可控。","# GitLab MCP Server\n\n> **New Feature**: Dynamic GitLab API URL support with connection pooling! See [Dynamic API URL Documentation](docs\u002Fdynamic-api-url.md) for details.\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzereight_gitlab-mcp_readme_9ba460b6ff1e.png)](https:\u002F\u002Fwww.star-history.com\u002F#zereight\u002Fgitlab-mcp&Date)\n\n## @zereight\u002Fmcp-gitlab\n\nGitLab MCP(Model Context Protocol) Server. **Includes bug fixes and improvements over the original GitLab MCP server.**\n\n## Usage\n\n### Using with Claude Code, Codex, Antigravity, OpenCode, Copilot, Cline, Roo Code, Cursor, Kilo Code, Amp Code\n\nWhen using with the Claude App, you need to set up your API key and URLs directly.\n\n#### Authentication Methods\n\nThe server supports four authentication methods:\n\n**For local\u002Fdesktop use** (most common):\n\n1. **Personal Access Token** (`GITLAB_PERSONAL_ACCESS_TOKEN`) — simplest setup\n2. **OAuth2 — Local Browser** (`GITLAB_USE_OAUTH`) — recommended for better security\n\n**For server\u002Fremote deployments**:\n\n3. **OAuth2 — MCP Proxy** (`GITLAB_MCP_OAUTH`) — for remote MCP clients such as Claude.ai\n4. **Remote Authorization** (`REMOTE_AUTHORIZATION`) — multi-user deployments where each caller provides their own token\n\n#### Using OAuth2 Authentication\n\nOAuth2 provides a more secure authentication flow using browser-based authentication. When enabled, the server will:\n\n1. Open your browser to GitLab's authorization page\n2. Wait for you to approve the access\n3. Store the token securely for future use\n4. Automatically refresh the token when it expires\n\nFor detailed OAuth2 setup instructions, see [OAuth Setup Guide](.\u002Fdocs\u002Foauth-setup.md).\n\nQuick setup - first create a GitLab OAuth application:\n\n1. Go to your GitLab instance: `Admin area` → `Applications`\n2. Create a new application with:\n   - **Name**: `GitLab MCP Server` (or any name you prefer)\n   - **Redirect URI**: `http:\u002F\u002F127.0.0.1:8888\u002Fcallback`\n   - **Scopes**: Select `api` (provides complete read\u002Fwrite access to the API)\n3. Copy the **Application ID** (this is your Client ID)\n\nThen configure the MCP server with OAuth:\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_CLIENT_SECRET\": \"your_oauth_client_secret\", \u002F\u002F Required for Confidential apps only\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"your_gitlab_api_url\",\n        \"GITLAB_PROJECT_ID\": \"your_project_id\", \u002F\u002F Optional: default project\n        \"GITLAB_ALLOWED_PROJECT_IDS\": \"\", \u002F\u002F Optional: comma-separated list of allowed project IDs\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\", \u002F\u002F use wiki api?\n        \"USE_MILESTONE\": \"false\", \u002F\u002F use milestone api?\n        \"USE_PIPELINE\": \"false\" \u002F\u002F use pipeline api?\n      }\n    }\n  }\n}\n```\n\n#### Using Personal Access Token (traditional)\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your_gitlab_token\",\n        \"GITLAB_API_URL\": \"your_gitlab_api_url\",\n        \"GITLAB_PROJECT_ID\": \"your_project_id\", \u002F\u002F Optional: default project\n        \"GITLAB_ALLOWED_PROJECT_IDS\": \"\", \u002F\u002F Optional: comma-separated list of allowed project IDs\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\", \u002F\u002F use wiki api?\n        \"USE_MILESTONE\": \"false\", \u002F\u002F use milestone api?\n        \"USE_PIPELINE\": \"false\" \u002F\u002F use pipeline api?\n      }\n    }\n  }\n}\n```\n\n#### Using CLI Arguments (for clients with env var issues)\n\nSome MCP clients (like GitHub Copilot CLI) have issues with environment variables. Use CLI arguments instead:\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@zereight\u002Fmcp-gitlab\",\n        \"--token=YOUR_GITLAB_TOKEN\",\n        \"--api-url=https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\"\n      ],\n      \"tools\": [\"*\"]\n    }\n  }\n}\n```\n\n**Available CLI arguments:**\n\n- `--token` - GitLab Personal Access Token (replaces `GITLAB_PERSONAL_ACCESS_TOKEN`)\n- `--api-url` - GitLab API URL (replaces `GITLAB_API_URL`)\n- `--read-only=true` - Enable read-only mode (replaces `GITLAB_READ_ONLY_MODE`)\n- `--use-wiki=true` - Enable wiki API (replaces `USE_GITLAB_WIKI`)\n- `--use-milestone=true` - Enable milestone API (replaces `USE_MILESTONE`)\n- `--use-pipeline=true` - Enable pipeline API (replaces `USE_PIPELINE`)\n\nCLI arguments take precedence over environment variables.\n\n#### vscode .vscode\u002Fmcp.json\n\n**Using OAuth2 (Non-Confidential - Recommended):**\n\n```json\n{\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\",\n        \"USE_MILESTONE\": \"false\",\n        \"USE_PIPELINE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n**Using OAuth2 (Confidential):**\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"gitlab-oauth-secret\",\n      \"description\": \"GitLab OAuth Client Secret\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_CLIENT_SECRET\": \"${input:gitlab-oauth-secret}\",\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n**Using Personal Access Token:**\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"gitlab-token\",\n      \"description\": \"GitLab Personal Access Token\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"${input:gitlab-token}\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\",\n        \"USE_MILESTONE\": \"false\",\n        \"USE_PIPELINE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n#### Strands Agents SDK (MCP Tools)\n\n```python\nenv_vars = {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": gitlab_access_token,\n        \"GITLAB_API_URL\": gitlab_api_url,\n        \"USE_GITLAB_WIKI\": use_gitlab_wiki\n        # ......the rest of the optional parameters\n}\n\nstdio_gitlab_mcp_client = MCPClient(\n        lambda: stdio_client(\n            StdioServerParameters(\n                command=\"npx\",\n                args=[\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n                env=env_vars,\n            )\n        )\n    )\n```\n\n#### Docker\n\n> **Note**: For Docker deployments, **Personal Access Token is recommended**. OAuth requires browser-based authentication and a local callback server, which does not work properly in containerized environments.\n\n**Using Personal Access Token (stdio) - Recommended:**\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\",\n        \"-e\",\n        \"GITLAB_API_URL\",\n        \"-e\",\n        \"GITLAB_READ_ONLY_MODE\",\n        \"-e\",\n        \"USE_GITLAB_WIKI\",\n        \"-e\",\n        \"USE_MILESTONE\",\n        \"-e\",\n        \"USE_PIPELINE\",\n        \"zereight050\u002Fgitlab-mcp\"\n      ],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your_gitlab_token\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"true\",\n        \"USE_MILESTONE\": \"true\",\n        \"USE_PIPELINE\": \"true\"\n      }\n    }\n  }\n}\n```\n\n- sse\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e USE_GITLAB_WIKI=true \\\n  -e USE_MILESTONE=true \\\n  -e USE_PIPELINE=true \\\n  -e SSE=true \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"sse\",\n      \"url\": \"http:\u002F\u002Flocalhost:3333\u002Fsse\"\n    }\n  }\n}\n```\n\n- streamable-http\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e USE_GITLAB_WIKI=true \\\n  -e USE_MILESTONE=true \\\n  -e USE_PIPELINE=true \\\n  -e STREAMABLE_HTTP=true \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http:\u002F\u002Flocalhost:3333\u002Fmcp\"\n    }\n  }\n}\n```\n\n#### Using MCP OAuth Proxy (`GITLAB_MCP_OAUTH`)\n\n> **For server\u002Fremote deployments only.** This mode requires the MCP server to be deployed with a publicly accessible HTTPS URL. For local\u002Fdesktop use, see `GITLAB_USE_OAUTH` above.\n\nFor remote MCP clients that support the MCP OAuth specification (e.g. Claude.ai).\nThe server acts as a full OAuth 2.0 authorization server — unauthenticated requests\nreceive a `401 + WWW-Authenticate` response, which triggers the OAuth browser flow\nautomatically on the client side.\n\n**How it works**: You deploy this MCP server somewhere with a public HTTPS URL. MCP\nclients connect to `{MCP_SERVER_URL}\u002Fmcp`. The server handles the OAuth 2.0 flow,\nexchanging credentials with GitLab on behalf of the client.\n\n**Prerequisites**:\n\n1. A publicly accessible HTTPS server URL (`MCP_SERVER_URL`) — use [ngrok](https:\u002F\u002Fngrok.com) for local testing\n2. A pre-registered GitLab OAuth application with `api` (or `read_api`) scopes\n   — Go to `Admin area` → `Applications`, set Redirect URI to `{MCP_SERVER_URL}\u002Fcallback`\n\n| Environment Variable  | Required | Description                                                |\n| --------------------- | -------- | ---------------------------------------------------------- |\n| `GITLAB_MCP_OAUTH`    | ✅       | Set to `true` to enable                                    |\n| `GITLAB_API_URL`      | ✅       | GitLab API base URL                                        |\n| `GITLAB_OAUTH_APP_ID` | ✅       | GitLab OAuth Application ID                                |\n| `MCP_SERVER_URL`      | ✅       | Public HTTPS URL of this MCP server                        |\n| `STREAMABLE_HTTP`     | ✅       | Must be `true`                                             |\n| `GITLAB_OAUTH_SCOPES` | optional | Comma-separated scopes (default: `api,read_api,read_user`) |\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_MCP_OAUTH=true \\\n  -e STREAMABLE_HTTP=true \\\n  -e MCP_SERVER_URL=https:\u002F\u002Fyour-server.example.com \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_OAUTH_APP_ID=your_app_id \\\n  -p 3000:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\nMCP client configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"http\",\n      \"url\": \"https:\u002F\u002Fyour-server.example.com\u002Fmcp\"\n    }\n  }\n}\n```\n\n#### Using Remote Authorization (`REMOTE_AUTHORIZATION`)\n\n> **For server\u002Fremote deployments only.** Each HTTP caller provides their own GitLab token directly in request headers — no OAuth flow involved.\n\nFor multi-user or multi-tenant deployments where each caller provides their own\nGitLab token in the HTTP request header. No OAuth flow — the MCP server forwards\nthe token to GitLab on behalf of the caller.\n\n**Header priority**: `Private-Token` > `JOB-TOKEN` > `Authorization: Bearer`\n\n| Environment Variable     | Required | Description                                                |\n| ------------------------ | -------- | ---------------------------------------------------------- |\n| `REMOTE_AUTHORIZATION`   | ✅       | Set to `true` to enable                                    |\n| `STREAMABLE_HTTP`        | ✅       | Must be `true`                                             |\n| `ENABLE_DYNAMIC_API_URL` | optional | Allow per-request GitLab URL via `X-GitLab-API-URL` header |\n\n**Example request headers**:\n\n```http\nPrivate-Token: glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\nor using a Bearer token:\n\n```http\nAuthorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\n> ⚠️ `REMOTE_AUTHORIZATION` is **not compatible** with SSE transport. `STREAMABLE_HTTP=true` is required.\n\n### Environment Variables\n\n#### Authentication Configuration\n\n- `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token. **Required in standard mode**; not used when `REMOTE_AUTHORIZATION=true` or when using OAuth.\n- `GITLAB_USE_OAUTH`: Set to `true` to enable OAuth2 authentication instead of personal access token.\n- `GITLAB_OAUTH_CLIENT_ID`: The Client ID from your GitLab OAuth application. Required when using OAuth.\n- `GITLAB_OAUTH_CLIENT_SECRET`: The Client Secret from your GitLab OAuth application. Required only for Confidential applications.\n- `GITLAB_OAUTH_REDIRECT_URI`: The OAuth callback URL. Default: `http:\u002F\u002F127.0.0.1:8888\u002Fcallback`\n- `GITLAB_OAUTH_TOKEN_PATH`: Custom path to store the OAuth token. Default: `~\u002F.gitlab-mcp-token.json`\n- `REMOTE_AUTHORIZATION`: When set to 'true', enables remote per-session authorization via HTTP headers. In this mode:\n  - The server accepts GitLab PAT tokens from HTTP headers (`Authorization: Bearer \u003Ctoken>`, `Private-Token: \u003Ctoken>` or `Job-Token: \u003Ctoken>`) on a per-session basis\n  - `GITLAB_PERSONAL_ACCESS_TOKEN` environment variable is **not required** and ignored\n  - Only works with **Streamable HTTP transport** (`STREAMABLE_HTTP=true`) because session management was already handled by the transport layer\n  - **SSE transport is disabled** - attempting to use SSE with remote authorization will cause the server to exit with an error\n  - Each client session can use a different token, enabling multi-user support with secure session isolation\n  - Tokens are stored per session and automatically cleaned up when sessions close or timeout\n- `GITLAB_MCP_OAUTH`: Set to `true` to enable the server-side MCP OAuth proxy mode. See [MCP OAuth Setup](#mcp-oauth-setup-claudeai-native-oauth) for details.\n- `GITLAB_OAUTH_APP_ID`: Client ID of the pre-registered GitLab OAuth application. Required when `GITLAB_MCP_OAUTH=true`.\n- `GITLAB_OAUTH_SCOPES`: Comma-separated list of GitLab scopes to request during the MCP OAuth flow (e.g. `api,read_user`). Defaults to `api` (or `read_api` when `GITLAB_READ_ONLY_MODE=true`). Only used when `GITLAB_MCP_OAUTH=true`. The pre-registered application must be configured with at least these scopes.\n- `SESSION_TIMEOUT_SECONDS`: Session auth token timeout in seconds. Default: `3600` (1 hour). Valid range: 1-86400 seconds (recommended: 60+). After this period of inactivity, the auth token is removed but the transport session remains active. The client must provide auth headers again on the next request. Only applies when `REMOTE_AUTHORIZATION=true`.\n\n#### General Configuration\n\n- `GITLAB_API_URL`: Your GitLab API URL. (Default: `https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4`)\n- `GITLAB_PROJECT_ID`: Default project ID. If set, Overwrite this value when making an API request.\n- `GITLAB_ALLOWED_PROJECT_IDS`: Optional comma-separated list of allowed project IDs. When set with a single value, acts as a default project (like the old \"lock\" mode). When set with multiple values, restricts access to only those projects. Examples:\n  - Single value `123`: MCP server can only access project 123 and uses it as default\n  - Multiple values `123,456,789`: MCP server can access projects 123, 456, and 789 but requires explicit project ID in requests\n- `GITLAB_READ_ONLY_MODE`: When set to 'true', restricts the server to only expose read-only operations. Useful for enhanced security or when write access is not needed. Also useful for using with Cursor and it's 40 tool limit.\n- `GITLAB_DENIED_TOOLS_REGEX`: When set as a regular expression, it excludes the matching tools.\n- `USE_GITLAB_WIKI`: Legacy flag. Wiki features are now enabled by default. When set to 'true', ensures wiki-related tools are included even if the `wiki` toolset is not explicitly listed in `GITLAB_TOOLSETS`.\n- `USE_MILESTONE`: Legacy flag. Milestone features are now enabled by default. When set to 'true', ensures milestone-related tools are included even if the `milestones` toolset is not explicitly listed in `GITLAB_TOOLSETS`.\n- `USE_PIPELINE`: Legacy flag. Pipeline features are now enabled by default. When set to 'true', ensures pipeline-related tools are included even if the `pipelines` toolset is not explicitly listed in `GITLAB_TOOLSETS`.\n- `GITLAB_TOOLSETS`: Comma-separated list of toolset IDs to enable. When empty or unset, default toolsets are used. Set to `\"all\"` to enable every toolset. Available toolsets (default toolsets marked with `*`):\n\n  - `merge_requests`\\* — MR operations, notes, discussions, draft notes, threads, versions, file diffs, conflicts (34 tools)\n  - `issues`\\* — Issue CRUD, notes, links, discussions (14 tools)\n  - `repositories`\\* — Search, create, file contents, push, fork, tree (7 tools)\n  - `branches`\\* — Branch creation, commits, diffs (4 tools)\n  - `projects`\\* — Project\u002Fnamespace info, group projects, iterations (8 tools)\n  - `labels`\\* — Label CRUD (5 tools)\n  - `pipelines`\\* — Pipeline, job, deployment, environment, and artifact operations (19 tools)\n  - `milestones`\\* — Milestone CRUD, issues, MRs, burndown (9 tools)\n  - `wiki`\\* — Wiki page CRUD for projects and groups (10 tools)\n  - `releases`\\* — Release CRUD, evidence, asset download (7 tools)\n  - `users`\\* — User info, events, markdown upload, attachments (5 tools)\n  - `workitems` — Work item CRUD via GraphQL, type conversion, statuses, custom fields, notes, timeline events (12 tools, opt-in)\n  - `webhooks` — Webhook listing and event inspection (3 tools, opt-in)\n  - `search` — Code search across projects, groups, or globally (3 tools, requires advanced search or exact code search enabled)\n\n  Note: `execute_graphql` is not in any toolset and must be added individually via `GITLAB_TOOLS` if needed.\n  Exposing arbitrary GraphQL would allow bypassing toolset boundaries (e.g. querying data that the user intentionally disabled via toolsets like wiki or pipelines), which is a security and permission-containment concern. Keeping `execute_graphql` out of all toolsets and requiring explicit opt-in via `GITLAB_TOOLS=execute_graphql` is intentional, to align with that principle rather than for backward compatibility.\n  CLI arg: `--toolsets`\n\n- `GITLAB_TOOLS`: Comma-separated list of individual tool names to add on top of the enabled toolsets (additive). Useful for cherry-picking specific tools without enabling an entire toolset. Example: `GITLAB_TOOLS=\"list_pipelines,execute_graphql\"`. CLI arg: `--tools`\n\n  Combined logic: `final tools = (tools from enabled toolsets) ∪ (GITLAB_TOOLS) ∪ (legacy flag overrides)`\n\n  Examples:\n\n  ```bash\n  # Default behavior (unchanged)\n  GITLAB_PERSONAL_ACCESS_TOKEN=xxx npx @zereight\u002Fmcp-gitlab\n\n  # Only issues and repositories\n  GITLAB_TOOLSETS=\"issues,repositories\" npx @zereight\u002Fmcp-gitlab\n\n  # All toolsets\n  GITLAB_TOOLSETS=\"all\" npx @zereight\u002Fmcp-gitlab\n\n  # Default toolsets + one extra pipeline tool\n  GITLAB_TOOLS=\"list_pipelines\" npx @zereight\u002Fmcp-gitlab\n\n  # Specific toolsets + individual tools\n  GITLAB_TOOLSETS=\"issues,merge_requests\" GITLAB_TOOLS=\"list_pipelines,get_pipeline\" npx @zereight\u002Fmcp-gitlab\n\n  # Legacy flags still work (backward compatible)\n  USE_PIPELINE=true npx @zereight\u002Fmcp-gitlab\n  ```\n\n- `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.\n- `SSE`: When set to 'true', enables the Server-Sent Events transport.\n- `STREAMABLE_HTTP`: When set to 'true', enables the Streamable HTTP transport. If both **SSE** and **STREAMABLE_HTTP** are set to 'true', the server will prioritize Streamable HTTP over SSE transport.\n- `GITLAB_COMMIT_FILES_PER_PAGE`: The number of files per page that GitLab returns for commit diffs. This value should match the server-side GitLab setting. Adjust this if your GitLab instance uses a custom per-page value for commit diffs.\n- `GITLAB_REPO_FILE_ENCODING`: Encoding for repository file create\u002Fupdate and related commit payloads sent to the GitLab API. Use `text` (default) or `base64`. Equivalent CLI: `--repo-file-encoding=text|base64`.\n\n#### Performance & Security Configuration\n\n- `HOST`: Server host address. Default: `127.0.0.1` (localhost only). Set to `0.0.0.0` to allow external connections (required for Docker with port forwarding).\n- `MAX_SESSIONS`: Maximum number of concurrent sessions allowed. Default: `1000`. Valid range: 1-10000. When limit is reached, new connections are rejected with HTTP 503.\n- `MAX_REQUESTS_PER_MINUTE`: Rate limit per session in requests per minute. Default: `60`. Valid range: 1-1000. Exceeded requests return HTTP 429.\n- `PORT`: Server port. Default: `3002`. Valid range: 1-65535.\n- `HTTP_PROXY`: HTTP proxy server URL for outgoing requests. Example: `http:\u002F\u002Fproxy.example.com:8080`. Supports HTTP\u002FHTTPS and SOCKS proxies (URLs starting with `socks:\u002F\u002F` or `socks5:\u002F\u002F`). CLI arg: `--http-proxy`\n- `HTTPS_PROXY`: HTTPS proxy server URL for outgoing requests. Example: `https:\u002F\u002Fproxy.example.com:8080`. Supports HTTP\u002FHTTPS and SOCKS proxies. CLI arg: `--https-proxy`\n- `NO_PROXY`: Comma-separated list of hosts that should bypass the proxy. Supports:\n  - Exact hostname matches (e.g., `localhost`, `gitlab.internal.com`)\n  - Domain suffix matches (e.g., `.internal.com` matches any subdomain)\n  - IP addresses (e.g., `127.0.0.1`, `192.168.1.1`)\n  - Port-specific matches (e.g., `example.com:443`)\n  - Wildcard `*` to bypass proxy for all hosts\n  - Example: `NO_PROXY=localhost,127.0.0.1,.internal.com`\n  - CLI arg: `--no-proxy`\n\n#### Monitoring Endpoints\n\nWhen using Streamable HTTP transport, the following endpoints are available:\n\n- `\u002Fhealth`: Health check endpoint returning server status, active sessions count, and uptime.\n- `\u002Fmetrics`: Detailed metrics including:\n  - Active and total session counts\n  - Authentication metrics (failures, expirations)\n  - Rate limiting statistics\n  - Resource usage (memory, uptime)\n  - Configuration summary\n\n### Remote Authorization Setup (Multi-User Support)\n\nWhen using `REMOTE_AUTHORIZATION=true`, the MCP server can support multiple users, each with their own GitLab token passed via HTTP headers. This is useful for:\n\n- Shared MCP server instances where each user needs their own GitLab access\n- IDE integrations that can inject user-specific tokens into MCP requests\n\n**Setup Example:**\n\n```bash\n# Start server with remote authorization\ndocker run -d \\\n  -e HOST=0.0.0.0 \\\n  -e STREAMABLE_HTTP=true \\\n  -e REMOTE_AUTHORIZATION=true \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e SESSION_TIMEOUT_SECONDS=3600 \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n**Client Configuration:**\n\nYour IDE or MCP client must send one of these headers with each request:\n\n```\nAuthorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\nor\n\n```\nPrivate-Token: glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\nThe token is stored per session (identified by `mcp-session-id` header) and reused for subsequent requests in the same session.\n\n#### Remote Authorization Client Configuration Example with Cursor\n\n```json\n{\n  \"mcpServers\": {\n    \"GitLab\": {\n      \"url\": \"http(s):\u002F\u002F\u003Cyour_mcp_gitlab_server>\u002Fmcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer glpat-...\"\n      }\n    }\n  }\n}\n```\n\n**Important Notes:**\n\n- Remote authorization **only works with Streamable HTTP transport**\n- Each session is isolated - tokens from one session cannot access another session's data\n  Tokens are automatically cleaned up when sessions close\n- **Session timeout:** Auth tokens expire after `SESSION_TIMEOUT_SECONDS` (default 1 hour) of inactivity. After timeout, the client must send auth headers again. The transport session remains active.\n- Each request resets the timeout timer for that session\n- **Rate limiting:** Each session is limited to `MAX_REQUESTS_PER_MINUTE` requests per minute (default 60)\n- **Capacity limit:** Server accepts up to `MAX_SESSIONS` concurrent sessions (default 1000)\n\n### MCP OAuth Setup (Claude.ai Native OAuth)\n\nWhen using `GITLAB_MCP_OAUTH=true`, the server acts as an OAuth proxy to your GitLab\ninstance. Claude.ai (and any MCP-spec-compliant client) handles the entire browser\nauthentication flow automatically — no manual Personal Access Token management needed.\n\n**Prerequisites:**\n\nA **pre-registered GitLab OAuth application** is required. GitLab restricts dynamically\nregistered (unverified) applications to the `mcp` scope, which is insufficient for API\ncalls (need `api` or `read_api`).\n\n1. Go to your GitLab instance → **Admin Area > Applications** (instance-wide) or **User Settings > Applications** (personal)\n2. Create a new application with:\n   - **Confidential**: unchecked\n   - **Scopes**: `api`, `read_api`, `read_user` (or whichever scopes you intend to request via `GITLAB_OAUTH_SCOPES`)\n3. Save and copy the **Application ID** — this is your `GITLAB_OAUTH_APP_ID`\n\n**How it works:**\n\n1. User adds your MCP server URL in Claude.ai\n2. Claude.ai discovers OAuth endpoints via `\u002F.well-known\u002Foauth-authorization-server`\n3. Claude.ai registers itself via Dynamic Client Registration (`POST \u002Fregister`) — handled locally by the MCP server (each client gets a virtual client ID)\n4. Claude.ai redirects the user's browser to GitLab's login page using the pre-registered OAuth application\n5. User authenticates; GitLab redirects back to `https:\u002F\u002Fclaude.ai\u002Fapi\u002Fmcp\u002Fauth_callback`\n6. Claude.ai sends `Authorization: Bearer \u003Ctoken>` on every MCP request\n7. Server validates the token with GitLab and stores it per session\n\n**Server setup:**\n\n```bash\ndocker run -d \\\n  -e STREAMABLE_HTTP=true \\\n  -e GITLAB_MCP_OAUTH=true \\\n  -e GITLAB_OAUTH_APP_ID=\"your-gitlab-oauth-app-client-id\" \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.example.com\u002Fapi\u002Fv4\" \\\n  -e MCP_SERVER_URL=\"https:\u002F\u002Fyour-mcp-server.example.com\" \\\n  -p 3002:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\nFor local development (HTTP allowed):\n\n```bash\nMCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL=true \\\nSTREAMABLE_HTTP=true \\\nGITLAB_MCP_OAUTH=true \\\nGITLAB_OAUTH_APP_ID=your-gitlab-oauth-app-client-id \\\nMCP_SERVER_URL=http:\u002F\u002Flocalhost:3002 \\\nGITLAB_API_URL=https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4 \\\nnode build\u002Findex.js\n```\n\n**Claude.ai configuration:**\n\n```json\n{\n  \"mcpServers\": {\n    \"GitLab\": {\n      \"url\": \"https:\u002F\u002Fyour-mcp-server.example.com\u002Fmcp\"\n    }\n  }\n}\n```\n\nNo `headers` field is needed — Claude.ai obtains the token via OAuth automatically.\n\n**Environment variables:**\n\n| Variable                                    | Required | Description                                                                                                                                                                                                         |\n| ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `GITLAB_MCP_OAUTH`                          | Yes      | Set to `true` to enable                                                                                                                                                                                             |\n| `GITLAB_OAUTH_APP_ID`                       | Yes      | Client ID of the pre-registered GitLab OAuth application                                                                                                                                                            |\n| `MCP_SERVER_URL`                            | Yes      | Public HTTPS URL of your MCP server                                                                                                                                                                                 |\n| `GITLAB_API_URL`                            | Yes      | Your GitLab instance API URL (e.g. `https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4`)                                                                                                                                                     |\n| `STREAMABLE_HTTP`                           | Yes      | Must be `true` (SSE is not supported)                                                                                                                                                                               |\n| `GITLAB_OAUTH_SCOPES`                       | No       | Comma-separated GitLab scopes to request (e.g. `api,read_user`). Defaults to `api` (or `read_api` when `GITLAB_READ_ONLY_MODE=true`). The pre-registered application must be configured with at least these scopes. |\n| `MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL` | No       | Set `true` for local HTTP dev only                                                                                                                                                                                  |\n\n**Important Notes:**\n\n- MCP OAuth **only works with Streamable HTTP transport** (`SSE=true` is incompatible)\n- Each user session stores its own OAuth token — sessions are fully isolated\n- Session timeout, rate limiting, and capacity limits apply identically to the\n  `REMOTE_AUTHORIZATION` mode (`SESSION_TIMEOUT_SECONDS`, `MAX_REQUESTS_PER_MINUTE`,\n  `MAX_SESSIONS`)\n- **Header auth fallback:** when `Private-Token` or `JOB-TOKEN` request headers are\n  present, OAuth validation is skipped and the raw token is used directly for that\n  session. This allows PATs and CI job tokens to be used alongside the OAuth flow on\n  the same server instance. `Authorization: Bearer` is always treated as an OAuth\n  token — use `Private-Token` for PAT-based header auth.\n\n## Tools 🛠️\n\n\u003Cdetails>\n\u003Csummary>Click to expand\u003C\u002Fsummary>\n\n\u003C!-- TOOLS-START -->\n\n1. `merge_merge_request` - Merge a merge request in a GitLab project\n2. `create_or_update_file` - Create or update a single file in a GitLab project\n3. `search_repositories` - Search for GitLab projects\n4. `create_repository` - Create a new GitLab project\n5. `get_file_contents` - Get the contents of a file or directory from a GitLab project\n6. `push_files` - Push multiple files to a GitLab project in a single commit\n7. `create_issue` - Create a new issue in a GitLab project\n8. `create_merge_request` - Create a new merge request in a GitLab project\n9. `fork_repository` - Fork a GitLab project to your account or specified namespace\n10. `create_branch` - Create a new branch in a GitLab project\n11. `get_merge_request` - Get details of a merge request with compact deployment summary, behind-count, commit addition summary, and approval summary (Either mergeRequestIid or branchName must be provided)\n12. `get_merge_request_diffs` - Get the changes\u002Fdiffs of a merge request (Either mergeRequestIid or branchName must be provided)\n13. `list_merge_request_diffs` - List merge request diffs with pagination support (Either mergeRequestIid or branchName must be provided)\n14. `get_merge_request_conflicts` - Get the conflicts of a merge request in a GitLab project\n15. `list_merge_request_changed_files` - STEP 1 of code review workflow. Returns ONLY the list of changed file paths in a merge request — WITHOUT diff content. Call this first to get file paths, then call get_merge_request_file_diff with multiple files in a single batched call (recommended 3-5 files per call). Supports excluded_file_patterns filtering using regex. (Either mergeRequestIid or branchName must be provided)\n16. `get_merge_request_file_diff` - STEP 2 of code review workflow. Get diffs for one or more files from a merge request. Call list_merge_request_changed_files first, then pass them as an array to fetch diffs efficiently. Batching multiple files (recommended 3-5) is supported. (Either mergeRequestIid or branchName must be provided)\n17. `list_merge_request_versions` - List all versions of a merge request\n18. `get_merge_request_version` - Get a specific version of a merge request\n19. `get_branch_diffs` - Get the changes\u002Fdiffs between two branches or commits in a GitLab project\n20. `update_merge_request` - Update a merge request (Either mergeRequestIid or branchName must be provided)\n21. `create_note` - Create a new note (comment) to an issue or merge request\n22. `create_merge_request_thread` - Create a new thread on a merge request\n23. `mr_discussions` - List discussion items for a merge request\n24. `resolve_merge_request_thread` - Resolve a thread on a merge request\n25. `update_merge_request_note` - Modify an existing merge request thread note\n26. `create_merge_request_note` - Add a new note to an existing merge request thread\n27. `delete_merge_request_discussion_note` - Delete a discussion note on a merge request\n28. `update_merge_request_discussion_note` - Update a discussion note on a merge request\n29. `create_merge_request_discussion_note` - Add a new discussion note to an existing merge request thread\n30. `delete_merge_request_note` - Delete an existing merge request note\n31. `get_merge_request_note` - Get a specific note for a merge request\n32. `get_merge_request_notes` - List notes for a merge request\n33. `get_draft_note` - Get a single draft note from a merge request\n34. `list_draft_notes` - List draft notes for a merge request\n35. `create_draft_note` - Create a draft note for a merge request\n36. `update_draft_note` - Update an existing draft note\n37. `delete_draft_note` - Delete a draft note\n38. `publish_draft_note` - Publish a single draft note\n39. `bulk_publish_draft_notes` - Publish all draft notes for a merge request\n40. `list_merge_requests` - List merge requests globally or in a specific GitLab project with filtering options (project_id is now optional)\n41. `approve_merge_request` - Approve a merge request (requires appropriate permissions)\n42. `unapprove_merge_request` - Unapprove a previously approved merge request\n43. `get_merge_request_approval_state` - Get merge request approval details including approvers (uses `approval_state` when available, otherwise falls back to `approvals`)\n44. `update_issue_note` - Modify an existing issue thread note\n45. `create_issue_note` - Add a new note to an existing issue thread\n46. `list_issues` - List issues (default: created by current user only; use scope='all' for all accessible issues)\n47. `my_issues` - List issues assigned to the authenticated user (defaults to open issues)\n48. `get_issue` - Get details of a specific issue in a GitLab project\n49. `update_issue` - Update an issue in a GitLab project\n50. `delete_issue` - Delete an issue from a GitLab project\n51. `list_issue_links` - List all issue links for a specific issue\n52. `list_issue_discussions` - List discussions for an issue in a GitLab project\n53. `get_issue_link` - Get a specific issue link\n54. `create_issue_link` - Create an issue link between two issues\n55. `delete_issue_link` - Delete an issue link\n56. `list_namespaces` - List all namespaces available to the current user\n57. `get_namespace` - Get details of a namespace by ID or path\n58. `verify_namespace` - Verify if a namespace path exists\n59. `get_project` - Get details of a specific project\n60. `list_projects` - List projects accessible by the current user\n61. `list_project_members` - List members of a GitLab project\n62. `list_group_projects` - List projects in a GitLab group with filtering options\n63. `list_group_iterations` - List group iterations with filtering options\n64. `list_labels` - List labels for a project\n65. `get_label` - Get a single label from a project\n66. `create_label` - Create a new label in a project\n67. `update_label` - Update an existing label in a project\n68. `delete_label` - Delete a label from a project\n69. `list_pipelines` - List pipelines in a GitLab project with filtering options\n70. `get_pipeline` - Get details of a specific pipeline in a GitLab project\n71. `list_pipeline_jobs` - List all jobs in a specific pipeline\n72. `list_pipeline_trigger_jobs` - List all trigger jobs (bridges) in a specific pipeline that trigger downstream pipelines\n73. `get_pipeline_job` - Get details of a GitLab pipeline job number\n74. `get_pipeline_job_output` - Get the output\u002Ftrace of a GitLab pipeline job with optional pagination to limit context window usage\n75. `create_pipeline` - Create a new pipeline for a branch or tag\n76. `retry_pipeline` - Retry a failed or canceled pipeline\n77. `cancel_pipeline` - Cancel a running pipeline\n78. `play_pipeline_job` - Run a manual pipeline job\n79. `retry_pipeline_job` - Retry a failed or canceled pipeline job\n80. `cancel_pipeline_job` - Cancel a running pipeline job\n81. `list_deployments` - List deployments in a GitLab project with filtering options\n82. `get_deployment` - Get details of a specific deployment in a GitLab project\n83. `list_environments` - List environments in a GitLab project\n84. `get_environment` - Get details of a specific environment in a GitLab project\n85. `list_job_artifacts` - List artifact files in a job's artifacts archive. Returns file names, paths, types, and sizes\n86. `download_job_artifacts` - Download the entire artifact archive (zip) for a job to a local path. Returns the saved file path\n87. `get_job_artifact_file` - Get the content of a single file from a job's artifacts by its path within the archive\n88. `list_milestones` - List milestones in a GitLab project with filtering options\n89. `get_milestone` - Get details of a specific milestone\n90. `create_milestone` - Create a new milestone in a GitLab project\n91. `edit_milestone` - Edit an existing milestone in a GitLab project\n92. `delete_milestone` - Delete a milestone from a GitLab project\n93. `get_milestone_issue` - Get issues associated with a specific milestone\n94. `get_milestone_merge_requests` - Get merge requests associated with a specific milestone\n95. `promote_milestone` - Promote a milestone to the next stage\n96. `get_milestone_burndown_events` - Get burndown events for a specific milestone\n97. `list_wiki_pages` - List wiki pages in a GitLab project\n98. `get_wiki_page` - Get details of a specific wiki page\n99. `create_wiki_page` - Create a new wiki page in a GitLab project\n100. `update_wiki_page` - Update an existing wiki page in a GitLab project\n101. `delete_wiki_page` - Delete a wiki page from a GitLab project\n102. `list_group_wiki_pages` - List wiki pages in a GitLab group\n103. `get_group_wiki_page` - Get details of a specific group wiki page\n104. `create_group_wiki_page` - Create a new wiki page in a GitLab group\n105. `update_group_wiki_page` - Update an existing wiki page in a GitLab group\n106. `delete_group_wiki_page` - Delete a wiki page from a GitLab group\n107. `get_repository_tree` - Get the repository tree for a GitLab project (list files and directories)\n108. `list_commits` - List repository commits with filtering options\n109. `get_commit` - Get details of a specific commit\n110. `get_commit_diff` - Get changes\u002Fdiffs of a specific commit\n111. `list_releases` - List all releases for a project\n112. `get_release` - Get a release by tag name\n113. `create_release` - Create a new release in a GitLab project\n114. `update_release` - Update an existing release in a GitLab project\n115. `delete_release` - Delete a release from a GitLab project (does not delete the associated tag)\n116. `create_release_evidence` - Create release evidence for an existing release (GitLab Premium\u002FUltimate only)\n117. `download_release_asset` - Download a release asset file by direct asset path\n118. `get_users` - Get GitLab user details by usernames\n119. `list_events` - List all events for the currently authenticated user\n120. `get_project_events` - List all visible events for a specified project\n121. `upload_markdown` - Upload a file to a GitLab project for use in markdown content\n122. `download_attachment` - Download an uploaded file from a GitLab project by secret and filename\n123. `get_work_item` - Get a single work item with full details including status, hierarchy (parent\u002Fchildren), type, labels, assignees, and all widgets\n124. `list_work_items` - List work items in a project with filters (type, state, search, assignees, labels). Returns items with status and hierarchy info\n125. `create_work_item` - Create a new work item (issue, task, incident, test_case, epic, key_result, objective, requirement, ticket). Supports setting title, description, labels, assignees, weight, parent, health status, start\u002Fdue dates, milestone, and confidentiality\n126. `update_work_item` - Update a work item. Can modify title, description, labels, assignees, weight, state, status, parent hierarchy, children, health status, start\u002Fdue dates, milestone, confidentiality, linked items, and custom fields\n127. `convert_work_item_type` - Convert a work item to a different type (e.g. issue to task, task to incident)\n128. `list_work_item_statuses` - List available statuses for a work item type in a project. Requires GitLab Premium\u002FUltimate with configurable statuses\n129. `list_custom_field_definitions` - List available custom field definitions for a work item type in a project. Returns field names, types, and IDs needed for setting custom fields via update_work_item\n130. `move_work_item` - Move a work item (issue, task, etc.) to a different project. Uses GitLab GraphQL issueMove mutation\n131. `list_work_item_notes` - List notes and discussions on a work item. Returns threaded discussions with author, body, timestamps, and system\u002Finternal flags\n132. `create_work_item_note` - Add a note\u002Fcomment to a work item. Supports Markdown, internal notes, and threaded replies\n133. `get_timeline_events` - List timeline events for an incident. Returns chronological events with notes, timestamps, and tags\n134. `create_timeline_event` - Create a timeline event on an incident. Supports tags: 'Start time', 'End time', 'Impact detected', 'Response initiated', 'Impact mitigated', 'Cause identified'\n135. `list_webhooks` - List all configured webhooks for a GitLab project or group. Provide either project_id or group_id\n136. `list_webhook_events` - List recent webhook events (past 7 days) for a project or group webhook. Use summary mode for overview, then get_webhook_event for full details\n137. `get_webhook_event` - Get full details of a specific webhook event by ID, including request\u002Fresponse payloads\n138. `search_code` - Search for code across all projects on the GitLab instance (requires advanced search or exact code search to be enabled)\n139. `search_project_code` - Search for code within a specific GitLab project (requires advanced search or exact code search to be enabled)\n140. `search_group_code` - Search for code within a specific GitLab group (requires advanced search or exact code search to be enabled)\n141. `execute_graphql` - Execute a GitLab GraphQL query\n\u003C!-- TOOLS-END -->\n\n\u003C\u002Fdetails>\n\n## Testing 🧪\n\nThe project includes comprehensive test coverage including remote authorization:\n\n```bash\n# Run all tests (API validation + remote auth)\nnpm test\n\n# Run only remote authorization tests\nnpm run test:remote-auth\n\n# Run all tests including readonly MCP tests\nnpm run test:all\n\n# Run only API validation\nnpm run test:integration\n```\n\nAll remote authorization tests use a mock GitLab server and do not require actual GitLab credentials.\n","# GitLab MCP 服务器\n\n> **新功能**：支持动态 GitLab API URL 并提供连接池！详情请参阅 [动态 API URL 文档](docs\u002Fdynamic-api-url.md)。\n\n[![Star History Chart](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzereight_gitlab-mcp_readme_9ba460b6ff1e.png)](https:\u002F\u002Fwww.star-history.com\u002F#zereight\u002Fgitlab-mcp&Date)\n\n## @zereight\u002Fmcp-gitlab\n\nGitLab MCP（模型上下文协议）服务器。**包含对原始 GitLab MCP 服务器的错误修复和改进。**\n\n## 使用方法\n\n### 与 Claude Code、Codex、Antigravity、OpenCode、Copilot、Cline、Roo Code、Cursor、Kilo Code、Amp Code 配合使用\n\n当与 Claude 应用程序一起使用时，您需要直接设置您的 API 密钥和 URLs。\n\n#### 认证方式\n\n该服务器支持四种认证方式：\n\n**适用于本地\u002F桌面使用**（最常见）：\n\n1. **个人访问令牌** (`GITLAB_PERSONAL_ACCESS_TOKEN`) — 最简单的设置\n2. **OAuth2 — 本地浏览器** (`GITLAB_USE_OAUTH`) — 推荐用于更高的安全性\n\n**适用于服务器\u002F远程部署**：\n\n3. **OAuth2 — MCP 代理** (`GITLAB_MCP_OAUTH`) — 用于远程 MCP 客户端，例如 Claude.ai\n4. **远程授权** (`REMOTE_AUTHORIZATION`) — 多用户部署，每个调用者提供自己的令牌\n\n#### 使用 OAuth2 认证\n\nOAuth2 提供了一种更安全的基于浏览器的身份验证流程。启用后，服务器将：\n\n1. 打开您的浏览器到 GitLab 的授权页面\n2. 等待您批准访问权限\n3. 安全地存储令牌以供将来使用\n4. 在令牌过期时自动刷新令牌\n\n有关详细的 OAuth2 设置说明，请参阅 [OAuth 设置指南](.\u002Fdocs\u002Foauth-setup.md)。\n\n快速设置 - 首先创建一个 GitLab OAuth 应用程序：\n\n1. 前往您的 GitLab 实例：`管理区域` → `应用程序`\n2. 创建一个新应用程序，设置如下：\n   - **名称**：`GitLab MCP 服务器`（或您喜欢的任何名称）\n   - **重定向 URI**：`http:\u002F\u002F127.0.0.1:8888\u002Fcallback`\n   - **作用域**：选择 `api`（提供对 API 的完整读写访问权限）\n3. 复制 **应用程序 ID**（即您的客户端 ID）\n\n然后使用 OAuth 配置 MCP 服务器：\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_CLIENT_SECRET\": \"your_oauth_client_secret\", \u002F\u002F 仅限机密应用\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"your_gitlab_api_url\",\n        \"GITLAB_PROJECT_ID\": \"your_project_id\", \u002F\u002F 可选：默认项目\n        \"GITLAB_ALLOWED_PROJECT_IDS\": \"\", \u002F\u002F 可选：允许的项目 ID 列表，用逗号分隔\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\", \u002F\u002F 是否使用 wiki API？\n        \"USE_MILESTONE\": \"false\", \u002F\u002F 是否使用里程碑 API？\n        \"USE_PIPELINE\": \"false\" \u002F\u002F 是否使用流水线 API？\n      }\n    }\n  }\n}\n```\n\n#### 使用个人访问令牌（传统方式）\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your_gitlab_token\",\n        \"GITLAB_API_URL\": \"your_gitlab_api_url\",\n        \"GITLAB_PROJECT_ID\": \"your_project_id\", \u002F\u002F 可选：默认项目\n        \"GITLAB_ALLOWED_PROJECT_IDS\": \"\", \u002F\u002F 可选：允许的项目 ID 列表，用逗号分隔\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\", \u002F\u002F 是否使用 wiki API？\n        \"USE_MILESTONE\": \"false\", \u002F\u002F 是否使用里程碑 API？\n        \"USE_PIPELINE\": \"false\" \u002F\u002F 是否使用流水线 API？\n      }\n    }\n  }\n}\n```\n\n#### 使用 CLI 参数（适用于环境变量有问题的客户端）\n\n一些 MCP 客户端（如 GitHub Copilot CLI）在处理环境变量时存在问题。您可以改用 CLI 参数：\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@zereight\u002Fmcp-gitlab\",\n        \"--token=YOUR_GITLAB_TOKEN\",\n        \"--api-url=https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\"\n      ],\n      \"tools\": [\"*\"]\n    }\n  }\n}\n```\n\n**可用的 CLI 参数：**\n\n- `--token` - GitLab 个人访问令牌（替代 `GITLAB_PERSONAL_ACCESS_TOKEN`）\n- `--api-url` - GitLab API URL（替代 `GITLAB_API_URL`）\n- `--read-only=true` - 启用只读模式（替代 `GITLAB_READ_ONLY_MODE`）\n- `--use-wiki=true` - 启用 wiki API（替代 `USE_GITLAB_WIKI`）\n- `--use-milestone=true` - 启用里程碑 API（替代 `USE_MILESTONE`）\n- `--use-pipeline=true` - 启用流水线 API（替代 `USE_PIPELINE`）\n\nCLI 参数优先于环境变量。\n\n#### vscode .vscode\u002Fmcp.json\n\n**使用 OAuth2（非机密 - 推荐）：**\n\n```json\n{\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\",\n        \"USE_MILESTONE\": \"false\",\n        \"USE_PIPELINE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n**使用 OAuth2（机密）：**\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"gitlab-oauth-secret\",\n      \"description\": \"GitLab OAuth 客户端秘密\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_oauth_client_id\",\n        \"GITLAB_OAUTH_CLIENT_SECRET\": \"${input:gitlab-oauth-secret}\",\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n**使用个人访问令牌：**\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"gitlab-token\",\n      \"description\": \"GitLab 个人访问令牌\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"${input:gitlab-token}\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\",\n        \"USE_MILESTONE\": \"false\",\n        \"USE_PIPELINE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n#### Strands Agents SDK（MCP 工具）\n\n```python\nenv_vars = {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": gitlab_access_token,\n        \"GITLAB_API_URL\": gitlab_api_url,\n        \"USE_GITLAB_WIKI\": use_gitlab_wiki\n        # ......其余可选参数\n}\n\nstdio_gitlab_mcp_client = MCPClient(\n        lambda: stdio_client(\n            StdioServerParameters(\n                command=\"npx\",\n                args=[\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n                env=env_vars,\n            )\n        )\n    )\n```\n\n#### Docker\n\n> **注意**: 对于 Docker 部署，**推荐使用个人访问令牌**。OAuth 需要基于浏览器的身份验证以及本地回调服务器，这在容器化环境中无法正常工作。\n\n**使用个人访问令牌（stdio） - 推荐：**\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\",\n        \"-e\",\n        \"GITLAB_API_URL\",\n        \"-e\",\n        \"GITLAB_READ_ONLY_MODE\",\n        \"-e\",\n        \"USE_GITLAB_WIKI\",\n        \"-e\",\n        \"USE_MILESTONE\",\n        \"-e\",\n        \"USE_PIPELINE\",\n        \"zereight050\u002Fgitlab-mcp\"\n      ],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your_gitlab_token\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"true\",\n        \"USE_MILESTONE\": \"true\",\n        \"USE_PIPELINE\": \"true\"\n      }\n    }\n  }\n}\n```\n\n- sse\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e USE_GITLAB_WIKI=true \\\n  -e USE_MILESTONE=true \\\n  -e USE_PIPELINE=true \\\n  -e SSE=true \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"sse\",\n      \"url\": \"http:\u002F\u002Flocalhost:3333\u002Fsse\"\n    }\n  }\n}\n```\n\n- streamable-http\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e USE_GITLAB_WIKI=true \\\n  -e USE_MILESTONE=true \\\n  -e USE_PIPELINE=true \\\n  -e STREAMABLE_HTTP=true \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http:\u002F\u002Flocalhost:3333\u002Fmcp\"\n    }\n  }\n}\n```\n\n#### 使用 MCP OAuth 代理 (`GITLAB_MCP_OAUTH`)\n\n> **仅适用于服务器\u002F远程部署**。此模式要求 MCP 服务器部署在一个可公开访问的 HTTPS URL 上。对于本地\u002F桌面使用，请参阅上面的 `GITLAB_USE_OAUTH`。\n\n适用于支持 MCP OAuth 规范的远程 MCP 客户端（例如 Claude.ai）。\n该服务器充当完整的 OAuth 2.0 授权服务器——未经身份验证的请求会收到 `401 + WWW-Authenticate` 响应，从而在客户端自动触发 OAuth 浏览器流程。\n\n**工作原理**: 您将此 MCP 服务器部署在具有公共 HTTPS URL 的位置。MCP 客户端连接到 `{MCP_SERVER_URL}\u002Fmcp`。服务器会处理 OAuth 2.0 流程，并代表客户端与 GitLab 进行凭据交换。\n\n**先决条件**:\n\n1. 一个可公开访问的 HTTPS 服务器 URL (`MCP_SERVER_URL`) — 可使用 [ngrok](https:\u002F\u002Fngrok.com) 进行本地测试\n2. 已预先注册的 GitLab OAuth 应用程序，具有 `api`（或 `read_api`）范围\n   — 转到 `Admin area` → `Applications`，将重定向 URI 设置为 `{MCP_SERVER_URL}\u002Fcallback`\n\n| 环境变量          | 必需 | 描述                                                |\n| ------------------- | ---- | -------------------------------------------------- |\n| `GITLAB_MCP_OAUTH`  | ✅   | 设置为 `true` 以启用                                |\n| `GITLAB_API_URL`    | ✅   | GitLab API 基础 URL                                 |\n| `GITLAB_OAUTH_APP_ID` | ✅   | GitLab OAuth 应用程序 ID                            |\n| `MCP_SERVER_URL`    | ✅   | 此 MCP 服务器的公共 HTTPS URL                      |\n| `STREAMABLE_HTTP`   | ✅   | 必须为 `true`                                       |\n| `GITLAB_OAUTH_SCOPES` | 可选 | 逗号分隔的范围（默认：`api,read_api,read_user`）     |\n\n```shell\ndocker run -i --rm \\\n  -e HOST=0.0.0.0 \\\n  -e GITLAB_MCP_OAUTH=true \\\n  -e STREAMABLE_HTTP=true \\\n  -e MCP_SERVER_URL=https:\u002F\u002Fyour-server.example.com \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_OAUTH_APP_ID=your_app_id \\\n  -p 3000:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\nMCP 客户端配置：\n\n```json\n{\n  \"mcpServers\": {\n    \"gitlab\": {\n      \"type\": \"http\",\n      \"url\": \"https:\u002F\u002Fyour-server.example.com\u002Fmcp\"\n    }\n  }\n}\n```\n\n#### 使用远程授权 (`REMOTE_AUTHORIZATION`)\n\n> **仅适用于服务器\u002F远程部署**。每个 HTTP 调用者直接在请求头中提供自己的 GitLab 令牌——不涉及 OAuth 流程。\n\n适用于多用户或多租户部署，其中每个调用者都在 HTTP 请求头中提供自己的 GitLab 令牌。无需 OAuth 流程——MCP 服务器会代表调用者将令牌转发给 GitLab。\n\n**头优先级**: `Private-Token` > `JOB-TOKEN` > `Authorization: Bearer`\n\n| 环境变量         | 必需 | 描述                                                |\n| ------------------ | ---- | -------------------------------------------------- |\n| `REMOTE_AUTHORIZATION` | ✅   | 设置为 `true` 以启用                                |\n| `STREAMABLE_HTTP`  | ✅   | 必须为 `true`                                       |\n| `ENABLE_DYNAMIC_API_URL` | 可选 | 允许通过 `X-GitLab-API-URL` 头部指定每请求的 GitLab URL |\n\n**示例请求头**:\n\n```http\nPrivate-Token: glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\n或者使用 Bearer 令牌：\n\n```http\nAuthorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\n> ⚠️ `REMOTE_AUTHORIZATION` **不兼容** SSE 传输。必须设置 `STREAMABLE_HTTP=true`。\n\n\n\n### 环境变量\n\n#### 认证配置\n\n- `GITLAB_PERSONAL_ACCESS_TOKEN`: 您的 GitLab 个人访问令牌。**在标准模式下必填**；当 `REMOTE_AUTHORIZATION=true` 或使用 OAuth 时，则不需此参数。\n- `GITLAB_USE_OAUTH`: 设置为 `true` 以启用 OAuth2 身份验证，而非个人访问令牌。\n- `GITLAB_OAUTH_CLIENT_ID`: 来自您的 GitLab OAuth 应用程序的客户端 ID。使用 OAuth 时必填。\n- `GITLAB_OAUTH_CLIENT_SECRET`: 来自您的 GitLab OAuth 应用程序的客户端密钥。仅对机密应用必需。\n- `GITLAB_OAUTH_REDIRECT_URI`: OAuth 回调 URL。默认值：`http:\u002F\u002F127.0.0.1:8888\u002Fcallback`\n- `GITLAB_OAUTH_TOKEN_PATH`: 自定义存储 OAuth 令牌的路径。默认值：`~\u002F.gitlab-mcp-token.json`\n- `REMOTE_AUTHORIZATION`: 当设置为 `true` 时，通过 HTTP 头部启用远程会话级授权。在此模式下：\n  - 服务器会按会话接受来自 HTTP 头部的 GitLab PAT 令牌（`Authorization: Bearer \u003Ctoken>`、`Private-Token: \u003Ctoken>` 或 `Job-Token: \u003Ctoken>`）\n  - `GITLAB_PERSONAL_ACCESS_TOKEN` 环境变量 **无需设置**，且会被忽略\n  - 仅适用于 **可流式传输的 HTTP 传输**（`STREAMABLE_HTTP=true`），因为会话管理已由传输层处理\n  - **禁用 SSE 传输** — 如果尝试在启用远程授权的情况下使用 SSE，服务器将报错并退出\n  - 每个客户端会话可以使用不同的令牌，从而实现多用户支持，并确保会话的安全隔离\n  - 令牌按会话存储，并在会话结束或超时时自动清除\n- `GITLAB_MCP_OAUTH`: 设置为 `true` 以启用服务器端 MCP OAuth 代理模式。详情请参见 [MCP OAuth 设置](#mcp-oauth-setup-claudeai-native-oauth)。\n- `GITLAB_OAUTH_APP_ID`: 预注册 GitLab OAuth 应用程序的客户端 ID。当 `GITLAB_MCP_OAUTH=true` 时必填。\n- `GITLAB_OAUTH_SCOPES`: 在 MCP OAuth 流程中请求的 GitLab 作用域列表，以逗号分隔（例如 `api,read_user`）。默认值为 `api`（或当 `GITLAB_READ_ONLY_MODE=true` 时为 `read_api`）。仅在 `GITLAB_MCP_OAUTH=true` 时使用。预注册的应用程序必须至少配置这些作用域。\n- `SESSION_TIMEOUT_SECONDS`: 会话认证令牌的超时时间，单位为秒。默认值：`3600`（1 小时）。有效范围：1–86400 秒（建议 60 秒以上）。在此期间无活动后，认证令牌将被移除，但传输会话仍保持活动状态。客户端在下次请求时需重新提供认证头信息。仅适用于 `REMOTE_AUTHORIZATION=true`。\n\n#### 通用配置\n\n- `GITLAB_API_URL`: 您的 GitLab API URL。（默认值：`https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4`）\n- `GITLAB_PROJECT_ID`: 默认项目 ID。如果设置，则在进行 API 请求时覆盖该值。\n- `GITLAB_ALLOWED_PROJECT_IDS`: 可选的允许项目 ID 列表，以逗号分隔。当仅设置一个值时，该值将作为默认项目（类似于旧版“锁定”模式）。当设置多个值时，则仅允许访问这些项目。示例：\n  - 单一值 `123`：MCP 服务器只能访问项目 123，并将其用作默认项目。\n  - 多个值 `123,456,789`：MCP 服务器可以访问项目 123、456 和 789，但每次请求都必须明确指定项目 ID。\n- `GITLAB_READ_ONLY_MODE`: 当设置为 `true` 时，服务器仅暴露只读操作。这有助于增强安全性，或在不需要写入权限时使用。也适用于与 Cursor 及其 40 个工具限制一起使用。\n- `GITLAB_DENIED_TOOLS_REGEX`: 当设置为正则表达式时，将排除匹配的工具。\n- `USE_GITLAB_WIKI`: 遗留标志。Wiki 功能现已默认启用。当设置为 `true` 时，即使 `wiki` 工具集未在 `GITLAB_TOOLSETS` 中显式列出，也会确保包含 Wiki 相关工具。\n- `USE_MILESTONE`: 遗留标志。里程碑功能现已默认启用。当设置为 `true` 时，即使 `milestones` 工具集未在 `GITLAB_TOOLSETS` 中显式列出，也会确保包含里程碑相关工具。\n- `USE_PIPELINE`: 遗留标志。流水线功能现已默认启用。当设置为 `true` 时，即使 `pipelines` 工具集未在 `GITLAB_TOOLSETS` 中显式列出，也会确保包含流水线相关工具。\n- `GITLAB_TOOLSETS`: 以逗号分隔的要启用的工具集 ID 列表。如果为空或未设置，则使用默认工具集。设置为 `\"all\"` 可启用所有工具集。可用工具集如下（默认工具集以 `*` 标记）：\n\n  - `merge_requests`\\* — MR 操作、评论、讨论、草稿评论、线程、版本、文件差异、冲突（34 个工具）\n  - `issues`\\* — 问题的 CRUD 操作、评论、链接、讨论（14 个工具）\n  - `repositories`\\* — 搜索、创建、文件内容、推送、分支、树结构（7 个工具）\n  - `branches`\\* — 分支创建、提交、差异比较（4 个工具）\n  - `projects`\\* — 项目\u002F命名空间信息、组内项目、迭代（8 个工具）\n  - `labels`\\* — 标签的 CRUD 操作（5 个工具）\n  - `pipelines`\\* — 流水线、作业、部署、环境及制品相关操作（19 个工具）\n  - `milestones`\\* — 里程碑的 CRUD 操作、关联的问题和 MR、燃尽图（9 个工具）\n  - `wiki`\\* — 项目和组级别的 Wiki 页面 CRUD 操作（10 个工具）\n  - `releases`\\* — 发布物的 CRUD 操作、证据、资产下载（7 个工具）\n  - `users`\\* — 用户信息、事件、Markdown 上传、附件（5 个工具）\n  - `workitems` — 通过 GraphQL 进行工作项的 CRUD 操作、类型转换、状态、自定义字段、评论、时间线事件（12 个工具，需单独启用）\n  - `webhooks` — Webhook 列表及事件检查（3 个工具，需单独启用）\n  - `search` — 跨项目、跨组或全局代码搜索（3 个工具，需启用高级搜索或精确代码搜索）\n\n  注意：`execute_graphql` 不属于任何工具集，如需使用，必须通过 `GITLAB_TOOLS` 单独添加。公开任意 GraphQL 查询可能会绕过工具集限制（例如查询用户通过工具集有意禁用的数据，如 Wiki 或流水线），这将带来安全和权限隔离方面的风险。因此，将 `execute_graphql` 排除在所有工具集之外，并要求通过 `GITLAB_TOOLS=execute_graphql` 显式启用，正是为了遵循这一原则，而非出于向后兼容性的考虑。命令行参数：`--toolsets`\n\n- `GITLAB_TOOLS`: 以逗号分隔的单个工具名称列表，用于在已启用工具集的基础上进一步添加（累加方式）。可用于仅选择特定工具，而不必启用整个工具集。示例：`GITLAB_TOOLS=\"list_pipelines,execute_graphql\"`。命令行参数：`--tools`\n\n  综合逻辑：`最终工具 = （已启用工具集中的工具） ∪ （GITLAB_TOOLS） ∪ （遗留标志的覆盖）`\n\n  示例：\n\n  ```bash\n  # 默认行为（不变）\n  GITLAB_PERSONAL_ACCESS_TOKEN=xxx npx @zereight\u002Fmcp-gitlab\n\n  # 仅限问题和仓库\n  GITLAB_TOOLSETS=\"issues,repositories\" npx @zereight\u002Fmcp-gitlab\n\n  # 启用所有工具集\n  GITLAB_TOOLSETS=\"all\" npx @zereight\u002Fmcp-gitlab\n\n  # 默认工具集 + 额外一个流水线工具\n  GITLAB_TOOLS=\"list_pipelines\" npx @zereight\u002Fmcp-gitlab\n\n  # 特定工具集 + 单个工具\n  GITLAB_TOOLSETS=\"issues,merge_requests\" GITLAB_TOOLS=\"list_pipelines,get_pipeline\" npx @zereight\u002Fmcp-gitlab\n\n# 旧版标志仍有效（向后兼容）\n  USE_PIPELINE=true npx @zereight\u002Fmcp-gitlab\n  ```\n\n- `GITLAB_AUTH_COOKIE_PATH`: 用于需要基于 Cookie 认证的 GitLab 实例的认证 Cookie 文件路径。提供此参数后，该 Cookie 将被包含在所有 GitLab API 请求中。\n- `SSE`: 设置为 'true' 时，启用服务器发送事件传输。\n- `STREAMABLE_HTTP`: 设置为 'true' 时，启用可流式 HTTP 传输。如果 **SSE** 和 **STREAMABLE_HTTP** 均设置为 'true'，服务器将优先使用可流式 HTTP 而不是 SSE 传输。\n- `GITLAB_COMMIT_FILES_PER_PAGE`: GitLab 返回的提交差异每页文件数量。此值应与服务器端 GitLab 设置一致。如果您的 GitLab 实例对提交差异使用自定义的每页值，请调整此参数。\n- `GITLAB_REPO_FILE_ENCODING`: 发送到 GitLab API 的仓库文件创建\u002F更新及相关提交负载的编码方式。可使用 `text`（默认）或 `base64`。等效 CLI 参数：`--repo-file-encoding=text|base64`。\n\n#### 性能与安全配置\n\n- `HOST`: 服务器主机地址。默认值：`127.0.0.1`（仅限本地访问）。设置为 `0.0.0.0` 可允许外部连接（Docker 使用端口转发时必需）。\n- `MAX_SESSIONS`: 允许的最大并发会话数。默认值：`1000`。有效范围：1–10000。达到限制时，新连接将被拒绝，并返回 HTTP 503 错误。\n- `MAX_REQUESTS_PER_MINUTE`: 每个会话每分钟的请求速率限制。默认值：`60`。有效范围：1–1000。超出限制的请求将返回 HTTP 429 错误。\n- `PORT`: 服务器端口。默认值：`3002`。有效范围：1–65535。\n- `HTTP_PROXY`: 用于出站请求的 HTTP 代理服务器 URL。示例：`http:\u002F\u002Fproxy.example.com:8080`。支持 HTTP\u002FHTTPS 和 SOCKS 代理（以 `socks:\u002F\u002F` 或 `socks5:\u002F\u002F` 开头的 URL）。CLI 参数：`--http-proxy`。\n- `HTTPS_PROXY`: 用于出站请求的 HTTPS 代理服务器 URL。示例：`https:\u002F\u002Fproxy.example.com:8080`。支持 HTTP\u002FHTTPS 和 SOCKS 代理。CLI 参数：`--https-proxy`。\n- `NO_PROXY`: 逗号分隔的应绕过代理的主机列表。支持：\n  - 完整主机名匹配（如 `localhost`、`gitlab.internal.com`）\n  - 域名后缀匹配（如 `.internal.com` 匹配任何子域名）\n  - IP 地址匹配（如 `127.0.0.1`、`192.168.1.1`）\n  - 端口特定匹配（如 `example.com:443`）\n  - 通配符 `*` 表示绕过所有主机的代理\n  - 示例：`NO_PROXY=localhost,127.0.0.1,.internal.com`\n  - CLI 参数：`--no-proxy`。\n\n#### 监控端点\n\n使用可流式 HTTP 传输时，以下端点可用：\n\n- `\u002Fhealth`: 健康检查端点，返回服务器状态、活动会话数和运行时间。\n- `\u002Fmetrics`: 详细指标包括：\n  - 活动和总会话数\n  - 认证指标（失败、过期）\n  - 速率限制统计\n  - 资源使用情况（内存、运行时间）\n  - 配置摘要\n\n\n\n### 远程授权设置（多用户支持）\n\n当使用 `REMOTE_AUTHORIZATION=true` 时，MCP 服务器可以支持多个用户，每个用户通过 HTTP 头传递各自的 GitLab 令牌。这适用于以下场景：\n\n- 共享的 MCP 服务器实例，其中每个用户需要自己的 GitLab 访问权限\n- IDE 集成，可以将用户特定的令牌注入到 MCP 请求中\n\n**设置示例：**\n\n```bash\n# 启动带有远程授权的服务器\ndocker run -d \\\n  -e HOST=0.0.0.0 \\\n  -e STREAMABLE_HTTP=true \\\n  -e REMOTE_AUTHORIZATION=true \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=true \\\n  -e SESSION_TIMEOUT_SECONDS=3600 \\\n  -p 3333:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n**客户端配置：**\n\n您的 IDE 或 MCP 客户端必须在每次请求中发送以下其中一个头信息：\n\n```\nAuthorization: Bearer glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\n或\n\n```\nPrivate-Token: glpat-xxxxxxxxxxxxxxxxxxxx\n```\n\n令牌按会话存储（由 `mcp-session-id` 头标识），并在同一会话中的后续请求中重复使用。\n\n#### 使用 Cursor 的远程授权客户端配置示例\n\n```json\n{\n  \"mcpServers\": {\n    \"GitLab\": {\n      \"url\": \"http(s):\u002F\u002F\u003Cyour_mcp_gitlab_server>\u002Fmcp\",\n      \"headers\": {\n        \"Authorization\": \"Bearer glpat-...\"\n      }\n    }\n  }\n}\n```\n\n**重要提示：**\n\n- 远程授权 **仅适用于可流式 HTTP 传输**\n- 每个会话是隔离的——一个会话中的令牌无法访问另一个会话的数据。会话关闭时，令牌会自动清除。\n- **会话超时：** 认证令牌在不活动 `SESSION_TIMEOUT_SECONDS`（默认 1 小时）后失效。超时后，客户端必须重新发送认证头信息。传输会话仍然保持活跃。\n- 每次请求都会重置该会话的超时计时器。\n- **速率限制：** 每个会话每分钟的请求次数受限于 `MAX_REQUESTS_PER_MINUTE`（默认 60 次）。\n- **容量限制：** 服务器最多接受 `MAX_SESSIONS` 个并发会话（默认 1000 个）。\n\n### MCP OAuth 设置（Claude.ai 原生 OAuth）\n\n当使用 `GITLAB_MCP_OAUTH=true` 时，服务器会充当您 GitLab 实例的 OAuth 代理。Claude.ai（以及任何符合 MCP 规范的客户端）会自动处理整个浏览器认证流程——无需手动管理个人访问令牌。\n\n**先决条件：**\n\n需要一个**预先注册的 GitLab OAuth 应用程序**。GitLab 会将动态注册的（未验证的）应用程序限制在 `mcp` 范围内，而这个范围不足以进行 API 调用（需要 `api` 或 `read_api`）。\n\n1. 前往您的 GitLab 实例 → **管理员区域 > 应用程序**（实例级别）或 **用户设置 > 应用程序**（个人级别）\n2. 创建一个新的应用程序，配置如下：\n   - **保密性**：取消勾选\n   - **作用域**：`api`、`read_api`、`read_user`（或者您打算通过 `GITLAB_OAUTH_SCOPES` 请求的其他作用域）\n3. 保存并复制**应用 ID**——这就是您的 `GITLAB_OAUTH_APP_ID`\n\n**工作原理：**\n\n1. 用户在 Claude.ai 中添加您的 MCP 服务器 URL\n2. Claude.ai 通过 `\u002F.well-known\u002Foauth-authorization-server` 发现 OAuth 端点\n3. Claude.ai 通过动态客户端注册（`POST \u002Fregister`）自行注册——由 MCP 服务器本地处理（每个客户端都会获得一个虚拟客户端 ID）\n4. Claude.ai 使用预先注册的 OAuth 应用程序将用户的浏览器重定向到 GitLab 的登录页面\n5. 用户完成身份验证；GitLab 重定向回 `https:\u002F\u002Fclaude.ai\u002Fapi\u002Fmcp\u002Fauth_callback`\n6. Claude.ai 在每次 MCP 请求中发送 `Authorization: Bearer \u003Ctoken>`\n7. 服务器向 GitLab 验证该令牌，并将其按会话存储\n\n**服务器设置：**\n\n```bash\ndocker run -d \\\n  -e STREAMABLE_HTTP=true \\\n  -e GITLAB_MCP_OAUTH=true \\\n  -e GITLAB_OAUTH_APP_ID=\"your-gitlab-oauth-app-client-id\" \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.example.com\u002Fapi\u002Fv4\" \\\n  -e MCP_SERVER_URL=\"https:\u002F\u002Fyour-mcp-server.example.com\" \\\n  -p 3002:3002 \\\n  zereight050\u002Fgitlab-mcp\n```\n\n对于本地开发（允许 HTTP）：\n\n```bash\nMCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL=true \\\nSTREAMABLE_HTTP=true \\\nGITLAB_MCP_OAUTH=true \\\nGITLAB_OAUTH_APP_ID=your-gitlab-oauth-app-client-id \\\nMCP_SERVER_URL=http:\u002F\u002Flocalhost:3002 \\\nGITLAB_API_URL=https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4 \\\nnode build\u002Findex.js\n```\n\n**Claude.ai 配置：**\n\n```json\n{\n  \"mcpServers\": {\n    \"GitLab\": {\n      \"url\": \"https:\u002F\u002Fyour-mcp-server.example.com\u002Fmcp\"\n    }\n  }\n}\n```\n\n无需 `headers` 字段——Claude.ai 会自动通过 OAuth 获取令牌。\n\n**环境变量：**\n\n| 变量                                    | 必需 | 描述                                                                                                                                                                                                         |\n| ------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `GITLAB_MCP_OAUTH`                          | 是      | 设置为 `true` 以启用                                                                                                                                                                                             |\n| `GITLAB_OAUTH_APP_ID`                       | 是      | 预先注册的 GitLab OAuth 应用程序的客户端 ID                                                                                                                                                            |\n| `MCP_SERVER_URL`                            | 是      | 您的 MCP 服务器的公共 HTTPS URL                                                                                                                                                                                 |\n| `GITLAB_API_URL`                            | 是      | 您的 GitLab 实例的 API URL（例如 `https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4`）                                                                                                                                                     |\n| `STREAMABLE_HTTP`                           | 是      | 必须为 `true`（不支持 SSE）                                                                                                                                                                               |\n| `GITLAB_OAUTH_SCOPES`                       | 否       | 要求的 GitLab 作用域，用逗号分隔（例如 `api,read_user`）。默认为 `api`（或当 `GITLAB_READ_ONLY_MODE=true` 时为 `read_api`）。预先注册的应用程序必须至少配置这些作用域。 |\n| `MCP_DANGEROUSLY_ALLOW_INSECURE_ISSUER_URL` | 否       | 仅用于本地 HTTP 开发时设置为 `true`                                                                                                                                                                                  |\n\n**重要提示：**\n\n- MCP OAuth **仅适用于 Streamable HTTP 传输**（`SSE=true` 不兼容）\n- 每个用户会话都会存储自己的 OAuth 令牌——会话之间完全隔离\n- 会话超时、速率限制和容量限制与 `REMOTE_AUTHORIZATION` 模式相同（`SESSION_TIMEOUT_SECONDS`、`MAX_REQUESTS_PER_MINUTE`、`MAX_SESSIONS`）\n- **头部认证回退：** 当请求头中存在 `Private-Token` 或 `JOB-TOKEN` 时，会跳过 OAuth 验证，直接使用原始令牌作为该会话的授权凭证。这使得 PAT 和 CI 作业令牌可以与 OAuth 流程在同一服务器实例上共存。`Authorization: Bearer` 始终被视为 OAuth 令牌——如果需要基于 PAT 的头部认证，请使用 `Private-Token`。\n\n## 工具 🛠️\n\n\u003Cdetails>\n\u003Csummary>点击展开\u003C\u002Fsummary>\n\n\u003C!-- TOOLS-START -->\n\n1. `merge_merge_request` - 合并 GitLab 项目中的合并请求\n2. `create_or_update_file` - 在 GitLab 项目中创建或更新单个文件\n3. `search_repositories` - 搜索 GitLab 项目\n4. `create_repository` - 创建一个新的 GitLab 项目\n5. `get_file_contents` - 获取 GitLab 项目中文件或目录的内容\n6. `push_files` - 将多个文件一次性提交到 GitLab 项目\n7. `create_issue` - 在 GitLab 项目中创建新问题\n8. `create_merge_request` - 在 GitLab 项目中创建新的合并请求\n9. `fork_repository` - 将 GitLab 项目 fork 到您的账户或指定的命名空间\n10. `create_branch` - 在 GitLab 项目中创建新分支\n11. `get_merge_request` - 获取合并请求的详细信息，包括精简的部署摘要、落后提交数、提交添加摘要和批准摘要（必须提供 mergeRequestIid 或 branchName）\n12. `get_merge_request_diffs` - 获取合并请求的更改\u002F差异（必须提供 mergeRequestIid 或 branchName）\n13. `list_merge_request_diffs` - 分页列出合并请求的差异（必须提供 mergeRequestIid 或 branchName）\n14. `get_merge_request_conflicts` - 获取 GitLab 项目中合并请求的冲突\n15. `list_merge_request_changed_files` - 代码审查流程的第一步。仅返回合并请求中更改的文件路径列表——不包含差异内容。请先调用此接口获取文件路径，再使用 get_merge_request_file_diff 以批量方式获取多个文件的差异（建议每次调用 3-5 个文件）。支持使用正则表达式进行 excluded_file_patterns 过滤。（必须提供 mergeRequestIid 或 branchName）\n16. `get_merge_request_file_diff` - 代码审查流程的第二步。获取合并请求中一个或多个文件的差异。请先调用 list_merge_request_changed_files，然后将文件路径数组传递给该接口，以高效地获取差异。支持批量处理多个文件（建议每次 3-5 个）。（必须提供 mergeRequestIid 或 branchName）\n17. `list_merge_request_versions` - 列出合并请求的所有版本\n18. `get_merge_request_version` - 获取合并请求的特定版本\n19. `get_branch_diffs` - 获取 GitLab 项目中两个分支或提交之间的更改\u002F差异\n20. `update_merge_request` - 更新合并请求（必须提供 mergeRequestIid 或 branchName）\n21. `create_note` - 为问题或合并请求创建新评论\n22. `create_merge_request_thread` - 在合并请求上创建新讨论线程\n23. `mr_discussions` - 列出合并请求的讨论项\n24. `resolve_merge_request_thread` - 解决合并请求上的讨论线程\n25. `update_merge_request_note` - 修改现有的合并请求讨论笔记\n26. `create_merge_request_note` - 向现有合并请求讨论线程添加新笔记\n27. `delete_merge_request_discussion_note` - 删除合并请求上的讨论笔记\n28. `update_merge_request_discussion_note` - 更新合并请求上的讨论笔记\n29. `create_merge_request_discussion_note` - 向现有合并请求讨论线程添加新讨论笔记\n30. `delete_merge_request_note` - 删除现有的合并请求笔记\n31. `get_merge_request_note` - 获取合并请求的特定笔记\n32. `get_merge_request_notes` - 列出合并请求的笔记\n33. `get_draft_note` - 获取合并请求中的单个草稿笔记\n34. `list_draft_notes` - 列出合并请求中的草稿笔记\n35. `create_draft_note` - 为合并请求创建草稿笔记\n36. `update_draft_note` - 更新现有的草稿笔记\n37. `delete_draft_note` - 删除草稿笔记\n38. `publish_draft_note` - 发布单个草稿笔记\n39. `bulk_publish_draft_notes` - 发布合并请求的所有草稿笔记\n40. `list_merge_requests` - 全局或在特定 GitLab 项目中列出合并请求，并提供过滤选项（project_id 现在是可选的）\n41. `approve_merge_request` - 批准合并请求（需要相应权限）\n42. `unapprove_merge_request` - 取消之前批准的合并请求\n43. `get_merge_request_approval_state` - 获取合并请求的批准详情，包括批准人（优先使用 `approval_state`，否则回退到 `approvals`）\n44. `update_issue_note` - 修改现有的问题讨论笔记\n45. `create_issue_note` - 向现有问题讨论线程添加新笔记\n46. `list_issues` - 列出问题（默认仅显示当前用户创建的问题；使用 scope='all' 可查看所有可访问的问题）\n47. `my_issues` - 列出分配给已认证用户的这些问题（默认为未解决的问题）\n48. `get_issue` - 获取 GitLab 项目中特定问题的详细信息\n49. `update_issue` - 更新 GitLab 项目的某个问题\n50. `delete_issue` - 从 GitLab 项目中删除一个问题\n51. `list_issue_links` - 列出特定问题的所有关联问题\n52. `list_issue_discussions` - 列出 GitLab 项目中某个问题的讨论\n53. `get_issue_link` - 获取特定问题链接\n54. `create_issue_link` - 在两个问题之间创建关联\n55. `delete_issue_link` - 删除问题关联\n56. `list_namespaces` - 列出当前用户可用的所有命名空间\n57. `get_namespace` - 根据 ID 或路径获取命名空间的详细信息\n58. `verify_namespace` - 验证命名空间路径是否存在\n59. `get_project` - 获取特定项目的详细信息\n60. `list_projects` - 列出当前用户可访问的所有项目\n61. `list_project_members` - 列出 GitLab 项目的成员\n62. `list_group_projects` - 列出 GitLab 组中的项目，并提供过滤选项\n63. `list_group_iterations` - 列出组迭代，并提供过滤选项\n64. `list_labels` - 列出项目的标签\n65. `get_label` - 获取项目中的单个标签\n66. `create_label` - 在项目中创建新标签\n67. `update_label` - 更新项目中的现有标签\n68. `delete_label` - 从项目中删除标签\n69. `list_pipelines` - 列出 GitLab 项目中的流水线，并提供过滤选项\n70. `get_pipeline` - 获取 GitLab 项目中特定流水线的详细信息\n71. `list_pipeline_jobs` - 列出特定流水线中的所有作业\n72. `list_pipeline_trigger_jobs` - 列出特定流水线中触发下游流水线的所有触发作业（桥接作业）\n73. `get_pipeline_job` - 获取 GitLab 流水线作业的详细信息\n74. `get_pipeline_job_output` - 获取 GitLab 流水线作业的输出\u002F跟踪日志，可选择分页以限制上下文窗口的使用\n75. `create_pipeline` - 为分支或标签创建新流水线\n76. `retry_pipeline` - 重试失败或取消的流水线\n77. `cancel_pipeline` - 取消正在运行的流水线\n78. `play_pipeline_job` - 手动运行流水线作业\n79. `retry_pipeline_job` - 重试失败或取消的流水线作业\n80. `cancel_pipeline_job` - 取消正在运行的流水线作业\n81. `list_deployments` - 列出 GitLab 项目中的部署，并提供过滤选项\n82. `get_deployment` - 获取 GitLab 项目中特定部署的详细信息\n83. `list_environments` - 列出 GitLab 项目中的环境\n84. `get_environment` - 获取 GitLab 项目中特定环境的详细信息\n85. `list_job_artifacts` - 列出作业工件归档中的文件，返回文件名、路径、类型和大小\n86. `download_job_artifacts` - 下载作业的整个工件归档（zip 文件）到本地路径，并返回保存的文件路径\n87. `get_job_artifact_file` - 根据文件在归档中的路径，获取作业工件中的单个文件内容\n88. `list_milestones` - 列出 GitLab 项目中的里程碑，并提供过滤选项\n89. `get_milestone` - 获取特定里程碑的详细信息\n90. `create_milestone` - 在 GitLab 项目中创建新里程碑\n91. `edit_milestone` - 编辑 GitLab 项目中的现有里程碑\n92. `delete_milestone` - 从 GitLab 项目中删除里程碑\n93. `get_milestone_issue` - 获取与特定里程碑相关的问题\n94. `get_milestone_merge_requests` - 获取与特定里程碑相关的合并请求\n95. `promote_milestone` - 将里程碑推进到下一阶段\n96. `get_milestone_burndown_events` - 获取特定里程碑的燃尽事件\n97. `list_wiki_pages` - 列出 GitLab 项目中的维基页面\n98. `get_wiki_page` - 获取特定维基页面的详细信息\n99. `create_wiki_page` - 在 GitLab 项目中创建新维基页面\n100. `update_wiki_page` - 更新 GitLab 项目中的现有维基页面\n101. `delete_wiki_page` - 从 GitLab 项目中删除维基页面\n102. `list_group_wiki_pages` - 列出 GitLab 组中的维基页面\n103. `get_group_wiki_page` - 获取特定组维基页面的详细信息\n104. `create_group_wiki_page` - 在 GitLab 组中创建新维基页面\n105. `update_group_wiki_page` - 更新 GitLab 组中的现有维基页面\n106. `delete_group_wiki_page` - 从 GitLab 组中删除维基页面\n107. `get_repository_tree` - 获取 GitLab 项目的仓库树（列出文件和目录）\n108. `list_commits` - 列出仓库提交，并提供过滤选项\n109. `get_commit` - 获取特定提交的详细信息\n110. `get_commit_diff` - 获取特定提交的更改\u002F差异\n111. `list_releases` - 列出项目的全部发布\n112. `get_release` - 根据标签名称获取发布\n113. `create_release` - 在 GitLab 项目中创建新发布\n114. `update_release` - 更新 GitLab 项目中的现有发布\n115. `delete_release` - 从 GitLab 项目中删除发布（不会删除关联的标签）\n116. `create_release_evidence` - 为现有发布创建发布证据（仅限 GitLab Premium\u002FUltimate 版本）\n117. `download_release_asset` - 根据资产直接路径下载发布资产文件\n118. `get_users` - 根据用户名获取 GitLab 用户的详细信息\n119. `list_events` - 列出当前已认证用户的全部事件\n120. `get_project_events` - 列出指定项目中所有可见的事件\n121. `upload_markdown` - 将文件上传到 GitLab 项目，用于 Markdown 内容\n122. `download_attachment` - 根据密钥和文件名从 GitLab 项目中下载上传的文件\n123. `get_work_item` - 获取单个工作项的完整详细信息，包括状态、层级关系（父级\u002F子级）、类型、标签、负责人以及所有小部件\n124. `list_work_items` - 列出项目中的工作项，并提供筛选条件（类型、状态、搜索、负责人、标签）。返回包含状态和层级信息的工作项\n125. `create_work_item` - 创建新的工作项（问题、任务、事件、测试用例、史诗、关键结果、目标、需求、工单）。支持设置标题、描述、标签、负责人、权重、父级、健康状况、开始\u002F截止日期、里程碑和保密级别\n126. `update_work_item` - 更新工作项。可以修改标题、描述、标签、负责人、权重、状态、健康状况、父级层级、子级、开始\u002F截止日期、里程碑、保密级别、关联项目以及自定义字段\n127. `convert_work_item_type` - 将工作项转换为不同类型（例如，问题转为任务，任务转为事件）\n128. `list_work_item_statuses` - 列出项目中某类工作项的可用状态。需要 GitLab Premium\u002FUltimate 版本，并支持自定义状态\n129. `list_custom_field_definitions` - 列出项目中某类工作项的可用自定义字段定义。返回设置自定义字段所需的字段名称、类型和 ID\n130. `move_work_item` - 将工作项（问题、任务等）移动到不同项目。使用 GitLab GraphQL issueMove 变更\n131. `list_work_item_notes` - 列出工作项上的笔记和讨论。返回带有作者、正文、时间戳以及系统\u002F内部标记的线程式讨论\n132. `create_work_item_note` - 向工作项添加笔记\u002F评论。支持 Markdown、内部笔记和线程式回复\n133. `get_timeline_events` - 列出事件的时间线记录。返回按时间顺序排列的事件，附带笔记、时间戳和标签\n134. `create_timeline_event` - 在事件上创建时间线事件。支持以下标签：“开始时间”、“结束时间”、“检测到影响”、“启动响应”、“影响减轻”、“查明原因”\n135. `list_webhooks` - 列出 GitLab 项目或组中所有已配置的 Webhook。需提供 project_id 或 group_id\n136. `list_webhook_events` - 列出项目或组 Webhook 的近期事件（过去 7 天）。可先使用概览模式查看，再调用 get_webhook_event 获取详细信息\n137. `get_webhook_event` - 根据 ID 获取特定 Webhook 事件的完整详细信息，包括请求和响应负载\n138. `search_code` - 在 GitLab 实例的所有项目中搜索代码（需要启用高级搜索或精确代码搜索功能）\n139. `search_project_code` - 在特定 GitLab 项目中搜索代码（需要启用高级搜索或精确代码搜索功能）\n140. `search_group_code` - 在特定 GitLab 组中搜索代码（需要启用高级搜索或精确代码搜索功能）\n141. `execute_graphql` - 执行 GitLab GraphQL 查询\n\u003C!-- TOOLS-END -->\n\n\u003C\u002Fdetails>\n\n\n\n## 测试 🧪\n\n该项目包含全面的测试覆盖，包括远程授权测试：\n\n```bash\n# 运行所有测试（API 验证 + 远程认证）\nnpm test\n\n# 仅运行远程授权测试\nnpm run test:remote-auth\n\n# 运行所有测试，包括只读 MCP 测试\nnpm run test:all\n\n# 仅运行 API 验证\nnpm run test:integration\n```\n\n所有远程授权测试都使用模拟的 GitLab 服务器，无需真实的 GitLab 凭据。","# GitLab MCP Server 快速上手指南\n\nGitLab MCP (Model Context Protocol) Server 是一个连接 AI 助手（如 Claude Code、Cursor、Cline 等）与 GitLab API 的桥梁。本版本在原版基础上修复了已知问题并增加了动态 API URL 支持。\n\n## 1. 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **Node.js**: 版本 18 或更高（推荐最新 LTS 版本）。\n    *   检查命令：`node -v`\n*   **npm**: 随 Node.js 自动安装。\n    *   国内加速建议：配置淘宝镜像源以提升安装速度。\n    ```bash\n    npm config set registry https:\u002F\u002Fregistry.npmmirror.com\n    ```\n*   **GitLab 账号权限**:\n    *   您需要一个有效的 GitLab 实例地址。\n    *   **个人访问令牌 (Personal Access Token)**: 具有 `api` 权限（用于读写操作）或 `read_api` 权限（仅只读）。\n    *   或者配置好 **OAuth2 应用**（推荐用于更高安全性）。\n\n## 2. 安装步骤\n\n该工具无需全局安装，通常通过 `npx` 直接运行，或在 MCP 客户端配置中指定命令。\n\n### 方式 A：直接在终端测试运行\n您可以使用以下命令快速验证工具是否可用（需替换令牌和 URL）：\n\n```bash\nnpx -y @zereight\u002Fmcp-gitlab --token=YOUR_GITLAB_TOKEN --api-url=https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\n```\n\n### 方式 B：集成到 AI 编辑器 (以 VS Code \u002F Cursor 为例)\n\n大多数现代 AI 代码编辑器支持通过 `mcp.json` 配置文件加载服务。\n\n1.  在项目根目录创建 `.vscode\u002Fmcp.json` 文件（或在全局配置中添加）。\n2.  填入以下配置（推荐使用 **Personal Access Token** 模式，最简单快捷）：\n\n```json\n{\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your_gitlab_token_here\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\",\n        \"GITLAB_READ_ONLY_MODE\": \"false\",\n        \"USE_GITLAB_WIKI\": \"false\",\n        \"USE_MILESTONE\": \"false\",\n        \"USE_PIPELINE\": \"false\"\n      }\n    }\n  }\n}\n```\n\n> **注意**: 请将 `your_gitlab_token_here` 替换为您真实的 GitLab Personal Access Token。如果是私有化部署的 GitLab，请修改 `GITLAB_API_URL`。\n\n### 方式 C：Docker 部署 (适合服务器端)\n\n如果您希望在容器环境中运行，可以使用官方镜像：\n\n```bash\ndocker run -i --rm \\\n  -e GITLAB_PERSONAL_ACCESS_TOKEN=your_gitlab_token \\\n  -e GITLAB_API_URL=\"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\" \\\n  -e GITLAB_READ_ONLY_MODE=false \\\n  zereight050\u002Fgitlab-mcp\n```\n\n## 3. 基本使用\n\n配置完成后，重启您的 AI 助手（如 Cursor、Claude Desktop 或 VS Code Copilot），即可在对话中调用 GitLab 功能。\n\n### 最简单的使用示例\n\n假设您已正确配置了 Token 和 API URL，您可以在聊天窗口中直接输入自然语言指令：\n\n**场景 1：查询项目信息**\n> \"列出当前项目中最近的 5 个 Merge Request。\"\n\n**场景 2：代码审查辅助**\n> \"读取 src\u002Fmain.py 文件的内容，并检查是否有未处理的 TODO 标记。\"\n\n**场景 3：流水线管理**\n> \"触发当前分支的 CI 流水线，并告诉我构建状态。\"\n*(注：需在配置中将 `USE_PIPELINE` 设为 `true`)*\n\n### 高级认证：OAuth2 (可选)\n\n为了更安全地管理凭证（避免硬编码 Token），您可以配置 OAuth2。\n\n1.  **在 GitLab 创建应用**:\n    *   进入 `Admin area` → `Applications`。\n    *   Name: `GitLab MCP Server`\n    *   Redirect URI: `http:\u002F\u002F127.0.0.1:8888\u002Fcallback`\n    *   Scopes: 勾选 `api`。\n    *   保存并复制 **Application ID**。\n\n2.  **更新配置文件**:\n\n```json\n{\n  \"servers\": {\n    \"GitLab-MCP\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@zereight\u002Fmcp-gitlab\"],\n      \"env\": {\n        \"GITLAB_USE_OAUTH\": \"true\",\n        \"GITLAB_OAUTH_CLIENT_ID\": \"your_application_id\",\n        \"GITLAB_OAUTH_REDIRECT_URI\": \"http:\u002F\u002F127.0.0.1:8888\u002Fcallback\",\n        \"GITLAB_API_URL\": \"https:\u002F\u002Fgitlab.com\u002Fapi\u002Fv4\"\n      }\n    }\n  }\n}\n```\n\n启动后，系统会自动打开浏览器引导您完成授权，令牌将安全存储在本地。","某后端开发团队在每日站会前，需要快速汇总 GitLab 上多个微服务项目的代码合并请求（MR）状态、流水线执行结果及最新里程碑进度，以便同步给产品经理。\n\n### 没有 gitlab-mcp 时\n- 开发者需手动切换浏览器标签页，逐个登录不同项目页面查看 MR 列表，耗时且容易遗漏关键评论。\n- 获取流水线失败原因时，必须点击进具体作业日志逐行排查，无法直接在对话上下文中关联错误代码。\n- 统计里程碑完成度依赖人工复制粘贴数据到 Excel 或文档，不仅效率低下，还常因版本不同步导致数据失真。\n- 若使用个人访问令牌配置本地脚本，面临密钥硬编码的安全风险，且难以适配多用户协作场景。\n- 遇到 GitLab 实例地址变更或动态路由时，传统静态配置工具往往失效，需反复修改配置文件重启服务。\n\n### 使用 gitlab-mcp 后\n- 开发者直接在 IDE 或 AI 助手对话框中指令“列出所有未合并的 MR\"，gitlab-mcp 即时聚合多项目数据并高亮阻塞点。\n- 询问“为什么构建失败”时，gitlab-mcp 自动拉取对应流水线日志并定位错误行，结合代码上下文给出修复建议。\n- 输入“生成本周里程碑报告”，gitlab-mcp 实时调用 API 提取进度数据，自动生成结构化摘要供团队直接复用。\n- 团队利用 OAuth2 浏览器认证模式，无需管理敏感 Token，既保障了本地开发安全，又支持远程成员无缝接入。\n- 借助动态 API URL 连接池特性，即使后端 GitLab 地址频繁变动，gitlab-mcp 也能自适应连接，确保持续集成不中断。\n\ngitlab-mcp 将分散的 DevOps 操作转化为自然语言交互，让研发团队从繁琐的界面点击中解放，专注于核心逻辑交付。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fzereight_gitlab-mcp_86722785.png","zereight",null,"https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fzereight_313d774e.png",":)","@kakaobank @ex-woowabros","Seoul","https:\u002F\u002Fgithub.com\u002Fzereight",[81,85,89,93],{"name":82,"color":83,"percentage":84},"TypeScript","#3178c6",55.6,{"name":86,"color":87,"percentage":88},"JavaScript","#f1e05a",43.4,{"name":90,"color":91,"percentage":92},"Shell","#89e051",0.9,{"name":94,"color":95,"percentage":96},"Dockerfile","#384d54",0.1,1312,254,"2026-04-06T05:55:28","MIT","Linux, macOS, Windows","未说明",{"notes":104,"python":102,"dependencies":105},"该工具是基于 Node.js 的 GitLab MCP 服务器，通过 npx 直接运行，无需安装 Python 或 GPU。支持多种认证方式（个人访问令牌、OAuth2）。在 Docker 部署时推荐使用个人访问令牌，因为 OAuth2 需要浏览器交互。若客户端不支持环境变量，可使用 CLI 参数传递配置。远程部署需公开 HTTPS 地址以支持特定 OAuth 模式。",[106,107],"Node.js (运行 npx 命令)","Docker (可选)",[13,109],"插件","2026-03-27T02:49:30.150509","2026-04-06T22:51:56.423469",[113,118,123,128,133,138],{"id":114,"question_zh":115,"answer_zh":116,"source_url":117},20286,"如何在 Gemini CLI 中解决 'fieldValue.toUpperCase is not a function' 错误？","该问题已在版本 0.1.13 中修复。如果您使用的是 0.1.12 或更早版本，可能会遇到此错误。解决方法是升级到最新版本。如果暂时无法升级，可以将环境变量 READ_ONLY 设置为 true 作为临时变通方案。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F139",{"id":119,"question_zh":120,"answer_zh":121,"source_url":122},20287,"使用 Agno 框架连接 Gemini 时出现 'Invalid value at tools...type' 错误怎么办？","这是一个已知的兼容性问题，维护者已发布修复版本。请尝试更新到最新的 gitlab-mcp 版本。此外，在启动 MCP 服务器时，设置环境变量 DEFAULT_NULL=true 可能有助于解决该问题。如果问题依旧，请检查您的 Python 脚本加载 MCP 工具时的具体报错信息。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F166",{"id":124,"question_zh":125,"answer_zh":126,"source_url":127},20288,"为什么通过标签（label）过滤 Issue 列表时不起作用或返回错误的结果？","这是一个已修复的 Bug。之前版本中存在 LLM 发送数组但工具将其转换为字符串导致过滤失败的问题。维护者已发布修复版本，请升级到最新版本即可解决。如果升级后仍有问题，请重新打开 Issue 并提供详细日志。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F74",{"id":129,"question_zh":130,"answer_zh":131,"source_url":132},20289,"如何配置 GitLab MCP 以支持 OAuth 认证而不是直接使用 Personal Access Token (PAT)？","项目计划并已开始实施支持 OAuth 资源服务器模式。根据最新的 MCP 规范，推荐使用 OAuth 流程而非令牌透传（token passthrough），因为后者不够安全。您可以关注相关 Pull Request（如 #130 或 #181 相关的提交），未来的版本将允许用户连接到远程 MCP 服务器时通过 GitLab 应用进行授权，而无需预先生成 PAT。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F121",{"id":134,"question_zh":135,"answer_zh":136,"source_url":137},20290,"create_merge_request 接口中的 remove_source_branch 参数为什么不生效？","该问题已被修复。如果在创建合并请求时设置 remove_source_branch 为 \"true\" 但未生效，请确保您使用的是最新版本的 gitlab-mcp。维护者确认修复后该功能已正常工作。如果问题依然存在，请检查 API 响应中的 should_remove_source_branch 字段是否为 null，并尝试重新安装或更新服务。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F142",{"id":139,"question_zh":140,"answer_zh":141,"source_url":142},20291,"无法获取私有仓库的 Issue 是怎么回事？","如果您确认提供的 Personal Access Token (PAT) 正确且具有相应权限，但仍无法获取私有仓库 Issue，可能是文档描述有误或配置遗漏。有用户反馈在仔细检查配置后问题解决。请确保您的 PAT 拥有读取私有项目的权限（api 或 read_api scope），并检查 MCP 服务器的连接配置是否正确指向了私有项目 ID。","https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F157",[144,149,154,159,164,169,174,179,184,189,194,199,204,209,214,219,224,229,234,239],{"id":145,"version":146,"summary_zh":147,"released_at":148},118310,"v2.0.36","## v2.0.36 的变更日志\r\n\r\n### ✨ 新特性\r\n  - 新增：添加 MCP OAuth 模式 [#359](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F359)\r\n  - 新增：通过 GraphQL API 添加工作项工具集 [#362](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F362)\r\n  - 新增：针对代码评审中高负载 AI 工作量的优化 [#385](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F385)\r\n  - 新增：支持群组级别的维基 [#389](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F389)\r\n  - 新增（OAuth）：允许将 PAT 作为请求头传递，并优先使用 PAT 而非作业令牌 [#400](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F400)\r\n\r\n### 🐛 修复缺陷\r\n  - 修复：getEffectiveProjectId 方法现优先使用传入的 projectId，而非 GITLAB_PROJECT_ID [#320](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F320)\r\n  - 修复：使用代理函数支持自托管 GitLab 中 HTTP\u002FHTTPS 协议切换 [#372](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F372)\r\n  - 修复：允许在 GITLAB_DENIED_TOOLS_REGEX 中使用前瞻\u002F后瞻模式 [#387](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F387)\r\n  - 修复：防止 list_merge_requests 中互斥参数导致的 400 错误 [#388](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F388)\r\n  - 修复：修正应用安装说明 [#394](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F394)\r\n  - 修复（OAuth）：允许自定义 OAuth 作用域 [#399](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F399)\r\n  - 修复（问题）：使 create_issue_note 中的 discussion_id 变为可选 [#404](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F404)\r\n\r\n### 🔨 杂项\r\n  - 杂项（开发依赖）：将 npm_and_yarn 组中的 handlebars 从 4.7.8 升级至 4.7.9，涉及 1 个目录 [#395](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F395)\r\n  - 杂项（依赖）：更新 npm_and_yarn 组，涉及 1 个目录，共 2 处升级 [#397](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F397)","2026-04-05T15:09:05",{"id":150,"version":151,"summary_zh":152,"released_at":153},118311,"v2.0.35","## v2.0.35 版本更新内容\r\n\r\n### ✨ 新特性\r\n  - 新增：支持 MCP OAuth 模式 [#359](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F359)\r\n  - 新增：通过 GraphQL API 添加工作项工具集 [#362](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F362)\r\n  - 新增：可配置 GitLab 仓库文件负载编码（text\u002Fbase64）[#382](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F382)\r\n  - 新增：针对代码评审中高负载 AI 工作流的优化 [#385](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F385)\r\n  - 新增：支持群组级别的 Wiki [#389](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F389)\r\n\r\n### 🐛 问题修复\r\n  - 修复：getEffectiveProjectId 方法现优先使用传入的 projectId，而非 GITLAB_PROJECT_ID [#320](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F320)\r\n  - 修复：使用代理函数支持自托管 GitLab 中 HTTP\u002FHTTPS 协议切换 [#372](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F372)\r\n  - 修复：在启用 GITLAB_READ_ONLY_MODE 时请求 read_api OAuth 范围 [#381](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F381)\r\n  - 修复：加强 OAuth 安全性（CSRF、XSS、标准输出日志泄漏）[#384](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F384)\r\n  - 修复：允许在 GITLAB_DENIED_TOOLS_REGEX 中使用前瞻\u002F后瞻模式 [#387](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F387)\r\n  - 修复：防止 list_merge_requests 中互斥参数导致的 400 错误 [#388](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F388)\r\n  - 修复：修正应用安装说明 [#394](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F394)","2026-03-31T08:13:15",{"id":155,"version":156,"summary_zh":157,"released_at":158},118312,"v2.0.34","## v2.0.34 的变更日志\r\n\r\n### ✨ 功能\r\n  - 新增：支持使用作业令牌进行远程授权 [#377](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F377)\r\n  - 新增：可配置 GitLab 仓库文件负载的编码方式（text\u002Fbase64）[#382](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F382)\r\n\r\n### 🐛 修复\r\n  - 修复：getEffectiveProjectId 方法现优先使用传入的 projectId，而非 GITLAB_PROJECT_ID [#320](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F320)\r\n  - 修复：使用代理函数支持自托管 GitLab 中 HTTP\u002FHTTPS 协议切换 [#372](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F372)\r\n  - 修复（认证）：仅允许指定作业令牌 [#375](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F375)\r\n  - 修复：修正缺少默认配置的 fetch 调用，并修复“markdown 上传”工具返回 406 错误的问题 [#378](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F378)\r\n  - 修复：在启用 GITLAB_READ_ONLY_MODE 模式时请求 read_api OAuth 范围 [#381](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F381)\r\n  - 修复：加强 OAuth 安全性（CSRF、XSS、标准输出日志泄露）[#384](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F384)\r\n\r\n### 🔨 杂项\r\n  - 更新依赖：将 npm_and_yarn 组中的包在同一目录下统一升级 5 个版本 [#374](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F374)\r\n  - 更新开发依赖：将 npm_and_yarn 组中的 flatted 从 3.3.3 升级至 3.4.2 [#386](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F386)\r\n\r\n### 其他变更\r\n  - 增加对 NO_PROXY 的支持，以适应企业防火墙环境 [#350](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F350)\r\n  - 日常维护：在关闭时正确释放 MCP 资源 [#357](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F357)\r\n  - 新增 get_merge_request_conflicts 工具 [#366](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F366)","2026-03-22T13:34:59",{"id":160,"version":161,"summary_zh":162,"released_at":163},118313,"v2.0.33","## v2.0.33 的更新内容\n\n### ✨ 新特性\n- 功能：为项目和群组添加 Webhook 工具 [#361](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F361)\n- 功能：支持使用作业令牌进行身份验证 [#369](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F369)\n\n### 🐛 修复缺陷\n- 修复：使用正确的 Schema 解析批准\u002F取消批准的响应 [#368](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F368)","2026-03-17T18:37:45",{"id":165,"version":166,"summary_zh":167,"released_at":168},118314,"v2.0.32","## v2.0.32 的变更日志\r\n\r\n### ✨ 新特性\r\n- feat: 为流水线和合并请求添加工件及部署可见性 [#353]\r\n- feat: 为 GitLab CI\u002FCD 的 create_pipeline 方法添加输入参数支持 [#355]\r\n\r\n### 🐛 问题修复\r\n- fix: 修复 Trae 中 get_file_contents 失败的问题 [#311]\r\n- fix: 在 OAuth Token 到期前自动刷新 Token [#347]\r\n\r\n### 🔨 杂项\r\n- chore(deps): 将 npm_and_yarn 组中 hono 的版本从 4.11.7 升级到 4.12.0，涉及 1 个目录 [#352]\r\n\r\n### 其他变更\r\n- 在 schema 中暴露流水线作业失败的元数据 [#356](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F356)\r\n- feat: 添加代码搜索工具（search_code、search_project_code、search_group_code）[#358]","2026-03-15T16:06:33",{"id":170,"version":171,"summary_zh":172,"released_at":173},118315,"v2.0.30","## v2.0.30 的更新内容\r\n\r\n### ✨ 功能\r\n  - feat: 在 create_draft_note 中添加 in_reply_to_discussion_id 参数 [#339](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F339)\r\n  - feat: 从 download_attachment 返回内联 Base64 编码的图片 [#343](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F343)\r\n  - feat: 添加 GitHub 风格的工具集和工具过滤功能（GITLAB_TOOLSETS、GITLAB_TOOLS）[#345](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F345)\r\n\r\n### 🐛 修复\r\n  - fix: 将所有使用 GITLAB_API_URL 的地方改为调用 getConfig，以支持 --api-url CLI 参数 [#349](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F349) \r\n  \r\n### 感谢\r\n  - @alfonsodg \r\n  - @wufei-png \r\n  - @lukeisontheroad ","2026-02-18T14:51:48",{"id":175,"version":176,"summary_zh":177,"released_at":178},118316,"v2.0.28","## v2.0.28 的更新内容\n### 🐛 修复缺陷\n  - 修复：使用基于会话的 Server 实例，以防止跨客户端数据泄露 [#344](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F344)\n  - 修复：Docker Hub 中的名称变更 [#341](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F341)\n  - 修复：对 GITLAB_DENIED_TOOLS_REGEX 进行 sanitization，以防止 ReDoS 攻击\n  - 修复：防止来自 GITLAB_DENIED_TOOLS_REGEX 输入的正则表达式注入\n### 📝 文档\n  - 文档：增强 updateIssueNote 的 JSDoc，添加示例和约束条件\n### 贡献者\n  7  Taeyo\n  1  dependabot[bot]","2026-02-17T03:02:04",{"id":180,"version":181,"summary_zh":182,"released_at":183},118317,"v2.0.25","## 摘要\n- 依赖更新、API 改进以及 ESM 兼容性修复\n\n## 变更\n- chore(deps): 在 npm_and_yarn 组中，跨 1 个目录升级 hono 版本 (#334)\n- 为获取合并请求评论接口添加分页参数（per_page 和 page）(#329)\n- fix: 添加 tldts 作为直接依赖，以实现 ESM 兼容性 (#328)\n","2026-02-08T04:48:09",{"id":185,"version":186,"summary_zh":187,"released_at":188},118318,"v2.0.24","# v2.0.24 发行说明\n\n## 🚀 新特性\n\n### 合并请求审批 (#308)\n- 添加了 `approve_merge_request` 工具，用于批准合并请求\n- 添加了 `unapprove_merge_request` 工具，用于移除合并请求的批准\n- 帮助直接从 MCP 流畅地管理代码审查工作流\n\n### 继承的项目成员 (#316)\n- 为 `list_project_members` 工具添加了 `include_inheritance` 选项\n- 启用后，可通过 `\u002Fmembers\u002Fall` 端点返回从父组继承的成员\n- 包含全面的测试覆盖率\n\n### Cookie 文件重载与会话预热 (#315)\n- Cookie 文件现在会在修改时自动重新加载（基于 mtime 轮询）\n- 新增代理认证的会话预热功能\n- 提升了基于代理认证设置的可靠性\n\n### 差异过滤改进 (#313)\n- 为 `get_merge_request_diffs` 添加了 `excluded_file_patterns` 参数\n- 统一了 `get_branch_diffs` 和 `get_merge_request_diffs` 之间的过滤逻辑\n- **安全**：为用户提供的正则表达式模式增加了 ReDoS 防护\n\n## 🛠️ 改进\n\n### CI\u002FCD\n- 在 PR 验证工作流中添加了 `test:mock`\n- 所有 mock 测试现在都会在拉取请求上自动运行\n\n### 代码质量\n- 提取了 `filterDiffsByPatterns` 工具函数（遵循 DRY 原则）\n- 移除了已废弃的 `readonly-mcp-tests.ts`\n- 更新了文档，以提高与其他应用的兼容性\n\n## 📦 安装\n\n```bash\nnpm install @zereight\u002Fmcp-gitlab@2.0.24\n```\n\n## 📝 完整变更日志\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.23...v2.0.24","2026-01-18T15:20:08",{"id":190,"version":191,"summary_zh":192,"released_at":193},118319,"v2.0.23","## 🐛 错误修复\n\n### 位置参数恢复\n- **修复**: 在 `createDraftNote`、`updateDraftNote` 和 `createMergeRequestThread` 函数中恢复 `position` 参数\n  - 之前位置参数会被解析，但未包含在 API 请求体中\n  - 修复基于差异的评论创建功能 ([#269](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F269) 的后续)\n\n### 合并请求版本 API 修复  \n- **修复**: 在合并请求版本相关函数中使用 `getEffectiveApiUrl()` 和 `getFetchConfig()`\n  - 替代已弃用的 `GITLAB_API_URL` 和 `DEFAULT_FETCH_CONFIG`\n  - 确保对多服务器环境的支持 ([#272](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F272) 的后续)\n- **修复**: 在 `getMergeRequestVersion` 中添加对 `unidiff` 参数的支持\n\n### 包与 Docker 修复\n- **修复**: 恢复原始包名 `@zereight\u002Fmcp-gitlab`\n- **修复**: 在 `docker-compose.yaml` 中将 Docker 镜像名称修正为 `zereight\u002Fgitlab-mcp:latest`\n\n### 位置参数恢复\n- **修复**: 在 `createDraftNote`、`updateDrDME- **修复**: 恢复 `position` pon  - 位置参数会被解析，但未包含在 API 请求体中\n  - 修复基于差异的评论创建功能 ([#269](httpoc  - 修复基于差异的评论创建功能 ([#269](https:\u002F\u002Fad\n### 合并请求版本 API 修复  \n- **修复**: 使用 `getEffec```","2026-01-14T15:26:46",{"id":195,"version":196,"summary_zh":197,"released_at":198},118320,"v2.0.22","## What's Changed\n\n### ✨ Features\n- **Support global merge request listing without project_id** ([#293](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F293)) - @tinywind\n  - Makes `project_id` optional in `list_merge_requests` tool\n  - Without `project_id`, lists MRs assigned to authenticated user by default\n  - Use `scope='all'` to list all accessible MRs globally\n  - Enables cross-project MR discovery\n\n### ♻️ Refactoring\n- **Improve `list_merge_requests` code quality and documentation** ([#301](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F301))\n  - Replace `let` with `const` for immutable variables\n  - Eliminate parameter mutation pattern\n  - Clarify tool description about default scope behavior\n\n### 🔧 CI\u002FCD\n- **Add missing tests to PR workflow** ([#302](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F302))\n  - Include `test:oauth` in integration tests\n  - Include `test:list-merge-requests` in integration tests\n  - Ensures comprehensive test coverage on PRs\n\n### 📦 Dependencies\n- Bump qs from 6.14.0 to 6.14.1 ([#300](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F300))\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.21...v2.0.22","2026-01-04T08:21:10",{"id":200,"version":201,"summary_zh":202,"released_at":203},118321,"v2.0.21","## 🔒 Security\n\n- **Default HOST binding changed from `0.0.0.0` to `127.0.0.1`** ([#289](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F289))\n  - Fixes a security vulnerability where the MCP server was exposed to all network interfaces\n  - In SSE or HTTP mode, anyone on the same network could previously access the server and use your `GITLAB_TOKEN` permissions\n  - **Migration**: Docker users should add `-e HOST=0.0.0.0` if external access is needed (examples updated in README)\n  - Closes [#288](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F288)\n\n## Contributors\n\n- @yamadashy","2025-12-20T15:35:36",{"id":205,"version":206,"summary_zh":207,"released_at":208},118322,"v2.0.20","## What's Changed\n\n### Features\n- **Add 405 response for GET \u002Fmcp endpoint** ([#295](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F295))\n  - Improves MCP spec compliance for streamable-http transport\n  - Returns proper \"Method Not Allowed\" response instead of 404\n  - Includes Allow header with supported methods (POST, DELETE)\n  - Fixes issue [#294](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F294) for Spring AI integration\n\n### Infrastructure\n- **Standardize Node.js to 22.21.1 (LTS)** across all environments\n  - Add `.nvmrc` for local development consistency\n  - Add `.npmrc` for strict engine compatibility\n  - Update GitHub Actions workflows to Node 22.21.1\n  - Update Dockerfile to Node 22.21.1-alpine\n  - Resolves package-lock.json conflicts in PRs\n\n### Contributors\n- @ilya-kstsnvch\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.19...v2.0.20","2025-12-20T13:40:14",{"id":210,"version":211,"summary_zh":212,"released_at":213},118323,"v2.0.19","## What's New in v2.0.19\n\n### Confidential OAuth Application Support\n\nAdded support for Confidential OAuth applications with `client_secret`.\n\n#### New Environment Variable\n- `GITLAB_OAUTH_CLIENT_SECRET`: Required only for Confidential OAuth apps\n\n#### OAuth Types\n| Type | Secret | Recommended For |\n|------|--------|-----------------|\n| Non-Confidential | Not needed | Desktop\u002FCLI apps (per [RFC 8252](https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8252)) |\n| Confidential | Required | Server environments |\n\n### Documentation Updates\n- Enhanced VS Code `.vscode\u002Fmcp.json` examples (OAuth + PAT)\n- Updated Docker section (PAT recommended for containers)\n- Added Confidential vs Non-Confidential comparison\n- RFC 8252 reference for security best practices\n\n### Files Changed\n- `oauth.ts`: `clientSecret` support in token exchange\u002Frefresh\n- `.env.example`: OAuth configuration section\n- `README.md`: Updated examples\n- `docs\u002Foauth-setup.md`: Enhanced setup guide","2025-12-20T05:43:35",{"id":215,"version":216,"summary_zh":217,"released_at":218},118324,"v2.0.18","## What's Changed\r\n- Fix npm OIDC publish issue by upgrading npm CLI to latest version\r\n- npm 11.5.1+ required for OIDC","2025-12-20T00:00:00",{"id":220,"version":221,"summary_zh":222,"released_at":223},118325,"v2.0.17","## What's Changed\r\n- ci: update npm-publish to use OIDC trusted publishing","2025-12-19T23:50:59",{"id":225,"version":226,"summary_zh":227,"released_at":228},118326,"v2.0.14","## What's Changed\r\n* Add support for dynamic GitLab API URLs and connection pooling by @avishaybe in https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F290\r\n\r\n## New Contributors\r\n* @avishaybe made their first contribution in https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F290\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.13...v2.0.14","2025-12-19T23:11:08",{"id":230,"version":231,"summary_zh":232,"released_at":233},118327,"v2.0.13","fix ci in v2.0.12","2025-11-24T01:37:09",{"id":235,"version":236,"summary_zh":237,"released_at":238},118328,"v2.0.12","#### [v2.0.12](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.11...v2.0.12)\r\n\r\n> 23 November 2025\r\n\r\n- fix: pin zod-to-json-schema to 3.24.5 to prevent breakage from v3.25.0 [`#285`](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F285)\r\n","2025-11-23T14:25:58",{"id":240,"version":241,"summary_zh":242,"released_at":243},118329,"v2.0.11","#### [v2.0.11](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fcompare\u002Fv2.0.10...v2.0.11)\r\n\r\n- Fix #266 [`#273`](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F273)\r\n- Support Oauth client authentication with Gitlab [`#261`](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fpull\u002F261)\r\n- Fix #266 (#273) [`#266`](https:\u002F\u002Fgithub.com\u002Fzereight\u002Fgitlab-mcp\u002Fissues\u002F266)","2025-11-06T21:22:40"]