@zereight/mcp-gitlab 2.1.53 → 2.1.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.ko.md CHANGED
@@ -98,7 +98,7 @@ npm install -g @zereight/mcp-gitlab
98
98
 
99
99
  예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
100
100
 
101
- 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.52`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
101
+ 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.53`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
102
102
 
103
103
  #### CLI 인자 사용하기(환경 변수 문제가 있는 클라이언트용)
104
104
 
package/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # GitLab MCP Server
2
2
 
3
+ [![GitHub stars](https://img.shields.io/github/stars/zereight/gitlab-mcp.svg?style=social&label=Star)](https://github.com/zereight/gitlab-mcp)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@zereight/mcp-gitlab.svg)](https://www.npmjs.com/package/@zereight/mcp-gitlab)
3
5
  [![npm](https://img.shields.io/npm/v/@zereight/mcp-gitlab.svg)](https://www.npmjs.com/package/@zereight/mcp-gitlab)
6
+ [![GitHub License](https://img.shields.io/github/license/zereight/gitlab-mcp.svg)](https://github.com/zereight/gitlab-mcp/blob/main/LICENSE)
4
7
  [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_GitLab_MCP-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](vscode:mcp/install?%7B%22name%22%3A%22zereight.gitlab-mcp%22%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40zereight%2Fmcp-gitlab%40latest%22%5D%2C%22env%22%3A%7B%22GITLAB_PERSONAL_ACCESS_TOKEN%22%3A%22%24%7Binput%3Agitlab-token%7D%22%2C%22GITLAB_API_URL%22%3A%22https%3A%2F%2Fgitlab.com%2Fapi%2Fv4%22%2C%22GITLAB_PERMISSION_MODE%22%3A%22full%22%7D%7D)
8
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/zereight/gitlab-mcp)
5
9
  [![MCP Toplist](https://mcptoplist.com/badge/io.github.zereight%2Fgitlab-mcp.svg)](https://mcptoplist.com/server/io.github.zereight%2Fgitlab-mcp) [![mcpindex](https://mcpindex.ai/api/v1/badge/io-github-zereight-gitlab-mcp)](https://mcpindex.ai/server/io-github-zereight-gitlab-mcp)
6
10
 
7
11
  [English](./README.md) | [한국어](./README.ko.md) | [简体中文](./README.zh-CN.md)
@@ -99,7 +103,7 @@ npm install -g @zereight/mcp-gitlab
99
103
 
100
104
  The examples use `zereight-mcp-gitlab`, a less collision-prone alias for the legacy `mcp-gitlab` binary. If your MCP client cannot find it, use the absolute path from `which zereight-mcp-gitlab`.
101
105
 
102
- No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.52`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
106
+ No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.53`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
103
107
 
104
108
  #### Using CLI Arguments (for clients with env var issues)
105
109
 
package/README.zh-CN.md CHANGED
@@ -98,7 +98,7 @@ npm install -g @zereight/mcp-gitlab
98
98
 
99
99
  示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
100
100
 
101
- 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.52`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
101
+ 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.53`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
102
102
 
103
103
  #### 使用 CLI 参数(适用于环境变量有问题的客户端)
104
104
 
package/build/index.js CHANGED
@@ -62,7 +62,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
62
62
  import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
63
63
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
64
64
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
65
- import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
65
+ import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
66
66
  import { AsyncLocalStorage } from "node:async_hooks";
67
67
  import express from "express";
68
68
  import fetchCookie from "fetch-cookie";
@@ -116,6 +116,53 @@ import { randomUUID, timingSafeEqual, } from "node:crypto";
116
116
  import { createLogger } from "./utils/logger.js";
117
117
  const logger = createLogger();
118
118
  const SERVER_NAME = process.env.MCP_SERVER_NAME?.trim() || "zereight-gitlab-mcp-server";
119
+ /**
120
+ * Static MCP prompt catalog. These wrap the multi-step tool workflows documented in
121
+ * skills/gitlab-mcp/ so MCP clients that surface prompts (e.g. slash commands) can
122
+ * trigger them without the agent needing to read the Skill first. Kept inline (not
123
+ * loaded from skills/gitlab-mcp/*.md) since only "build" ships in the npm package.
124
+ */
125
+ const MCP_PROMPTS = [
126
+ {
127
+ name: "review_merge_request",
128
+ description: "Review a merge request's diff in batches and leave threaded comments.",
129
+ arguments: [
130
+ { name: "project_id", description: "Numeric project ID or URL-encoded path", required: true },
131
+ { name: "merge_request_iid", description: "Merge request IID", required: true },
132
+ ],
133
+ render: (args) => `Review merge request !${args.merge_request_iid ?? "<iid>"} in project ${args.project_id ?? "<project_id>"}:\n` +
134
+ `1. Call list_merge_request_changed_files to get the changed file list (use excluded_file_patterns for lockfiles/dist/generated files).\n` +
135
+ `2. Call get_merge_request_file_diff in batches of 3-5 files, prioritizing source over config/tests.\n` +
136
+ `3. Leave findings with create_merge_request_thread (inline, position: new_path/new_line) or create_merge_request_note (general).\n` +
137
+ `4. Summarize the review verdict in a final top-level note.`,
138
+ },
139
+ {
140
+ name: "triage_pipeline_failure",
141
+ description: "Find the failing job in a pipeline and pull its log tail for diagnosis.",
142
+ arguments: [
143
+ { name: "project_id", description: "Numeric project ID or URL-encoded path", required: true },
144
+ { name: "pipeline_id", description: "Pipeline ID", required: true },
145
+ ],
146
+ render: (args) => `Diagnose pipeline ${args.pipeline_id ?? "<pipeline_id>"} in project ${args.project_id ?? "<project_id>"}:\n` +
147
+ `1. Call list_pipeline_jobs to find jobs with status "failed".\n` +
148
+ `2. Call get_pipeline_job_output (or the job trace tool) on each failed job, focusing on the tail of the log.\n` +
149
+ `3. Identify the root cause (compile error, test failure, timeout, runner issue) and quote the relevant log lines.\n` +
150
+ `4. Suggest the fix or the next diagnostic step.`,
151
+ },
152
+ {
153
+ name: "triage_vulnerabilities",
154
+ description: "List a project's open vulnerabilities and propose a remediation priority order.",
155
+ arguments: [
156
+ { name: "project_id", description: "Numeric project ID or URL-encoded path", required: true },
157
+ ],
158
+ render: (args) => `Triage vulnerabilities for project ${args.project_id ?? "<project_id>"}:\n` +
159
+ `1. Call list_project_vulnerabilities once with state=detected and once with state=confirmed ` +
160
+ `(the tool only accepts one state per call). Follow pageInfo.endCursor with the "after" ` +
161
+ `param while pageInfo.hasNextPage is true, and aggregate both states' results.\n` +
162
+ `2. Group the aggregated results by severity (critical > high > medium > low) and by whether a fix is already available.\n` +
163
+ `3. Propose a remediation order, calling out any critical/high items with no available fix.`,
164
+ },
165
+ ];
119
166
  /**
120
167
  * Create a new MCP Server instance with request handlers registered.
121
168
  * Each transport connection gets its own Server instance to prevent
@@ -168,8 +215,35 @@ function createServer() {
168
215
  tools: {
169
216
  listChanged: true,
170
217
  },
218
+ prompts: {},
171
219
  },
172
220
  });
221
+ mcpServer.server.setRequestHandler(ListPromptsRequestSchema, async () => ({
222
+ prompts: MCP_PROMPTS.map(({ name, description, arguments: args }) => ({
223
+ name,
224
+ description,
225
+ arguments: args,
226
+ })),
227
+ }));
228
+ mcpServer.server.setRequestHandler(GetPromptRequestSchema, async (request) => {
229
+ const prompt = MCP_PROMPTS.find(p => p.name === request.params.name);
230
+ if (!prompt) {
231
+ throw new Error(`Unknown prompt: ${request.params.name}`);
232
+ }
233
+ const args = (request.params.arguments ?? {});
234
+ return {
235
+ description: prompt.description,
236
+ messages: [
237
+ {
238
+ role: "user",
239
+ content: {
240
+ type: "text",
241
+ text: prompt.render(args),
242
+ },
243
+ },
244
+ ],
245
+ };
246
+ });
173
247
  mcpServer.server.setRequestHandler(ListToolsRequestSchema, async () => {
174
248
  // Step 6: Gemini $schema cleanup + annotations (only dynamic step per request)
175
249
  // <<< START: Remove $schema for Gemini compatibility >>>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "2.1.53",
3
+ "version": "2.1.54",
4
4
  "mcpName": "io.github.zereight/gitlab-mcp",
5
5
  "description": "GitLab MCP server for projects, merge requests, issues, pipelines, wiki, releases, and more",
6
6
  "keywords": [