@zereight/mcp-gitlab 2.3.20 → 2.3.21
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 +3 -3
- package/README.md +1 -1
- package/README.pt-BR.md +1 -1
- package/README.zh-CN.md +1 -1
- package/build/index.js +29 -10
- package/build/schemas.js +7 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -77,8 +77,8 @@ MCP 없는 동등 경로: npx skills add zereight/gitlab-mcp --skill gitlab-mcp-
|
|
|
77
77
|
}
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
- 호스팅 / Claude.ai: 서버에서 `GITLAB_MCP_OAUTH=true` ([MCP OAuth](#mcp-oauth
|
|
81
|
-
- 사용자별 PAT 헤더: `REMOTE_AUTHORIZATION=true` ([원격 인증](
|
|
80
|
+
- 호스팅 / Claude.ai: 서버에서 `GITLAB_MCP_OAUTH=true` ([MCP OAuth](#mcp-oauth-프록시-사용하기gitlab_mcp_oauth) 참고)
|
|
81
|
+
- 사용자별 PAT 헤더: `REMOTE_AUTHORIZATION=true` ([원격 인증](#원격-인증-사용하기remote_authorization) 참고)
|
|
82
82
|
- 로컬 Docker 예시는 [사용법](#사용법)에 있습니다
|
|
83
83
|
|
|
84
84
|
### Skill + CLI (MCP 불필요)
|
|
@@ -252,7 +252,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
|
|
|
252
252
|
|
|
253
253
|
예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
|
|
254
254
|
|
|
255
|
-
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.3.
|
|
255
|
+
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.3.20`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. `main`에 머지된 수정을 다음 안정 버전 전에 확인하려면 프리릴리스 빌드인 `npx -y @zereight/mcp-gitlab@next`를 사용하세요(운영 환경용이 아닙니다). 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
|
|
256
256
|
|
|
257
257
|
#### Claude Desktop 원클릭 설치(MCP Bundle)
|
|
258
258
|
|
package/README.md
CHANGED
|
@@ -258,7 +258,7 @@ The store path is pinned by your lock file; update it with `nix flake update git
|
|
|
258
258
|
|
|
259
259
|
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`.
|
|
260
260
|
|
|
261
|
-
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.3.
|
|
261
|
+
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.3.20`. If you always want the newest release, use `npx -y @zereight/mcp-gitlab@latest` instead. To try a fix merged to `main` before the next stable release, use `npx -y @zereight/mcp-gitlab@next`, a pre-release build that is not meant for production. The server prints a notice to stderr on startup when a newer version is available (disable with `GITLAB_DISABLE_VERSION_CHECK=true`).
|
|
262
262
|
|
|
263
263
|
#### Claude Desktop one-click install (MCP Bundle)
|
|
264
264
|
|
package/README.pt-BR.md
CHANGED
|
@@ -252,7 +252,7 @@ O caminho no store é fixado pelo seu lock file; atualize-o com `nix flake updat
|
|
|
252
252
|
|
|
253
253
|
Os exemplos usam `zereight-mcp-gitlab`, um alias com menor chance de conflito que o binário legado `mcp-gitlab`. Se o seu cliente MCP não o encontrar, use o caminho absoluto retornado por `which zereight-mcp-gitlab`.
|
|
254
254
|
|
|
255
|
-
Não quer instalar globalmente? Fixe o `npx` na versão estável anterior (a versão recomendada por esta documentação), por exemplo `npx -y @zereight/mcp-gitlab@2.3.
|
|
255
|
+
Não quer instalar globalmente? Fixe o `npx` na versão estável anterior (a versão recomendada por esta documentação), por exemplo `npx -y @zereight/mcp-gitlab@2.3.20`. Se quiser sempre a versão mais recente, use `npx -y @zereight/mcp-gitlab@latest`. Para testar uma correção já mesclada na `main` antes da próxima versão estável, use `npx -y @zereight/mcp-gitlab@next`, um build de pré-lançamento que não é indicado para produção. O servidor exibe um aviso no stderr durante a inicialização quando existe uma versão mais nova disponível (desative com `GITLAB_DISABLE_VERSION_CHECK=true`).
|
|
256
256
|
|
|
257
257
|
#### Instalação com um clique no Claude Desktop (MCP Bundle)
|
|
258
258
|
|
package/README.zh-CN.md
CHANGED
|
@@ -252,7 +252,7 @@ command = lib.getExe inputs.gitlab-mcp.packages.${system}.default;
|
|
|
252
252
|
|
|
253
253
|
示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
|
|
254
254
|
|
|
255
|
-
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.3.
|
|
255
|
+
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.3.20`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。如需在下一个稳定版本发布前试用已合并到 `main` 的修复,请使用 `npx -y @zereight/mcp-gitlab@next`(预发布版本,不适用于生产环境)。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
|
|
256
256
|
|
|
257
257
|
#### Claude Desktop 一键安装(MCP Bundle)
|
|
258
258
|
|
package/build/index.js
CHANGED
|
@@ -6224,7 +6224,7 @@ async function cancelPipelineJob(projectId, jobId, force) {
|
|
|
6224
6224
|
/**
|
|
6225
6225
|
* Get the repository tree for a project
|
|
6226
6226
|
* @param {GetRepositoryTreeOptions} options - Options for the tree
|
|
6227
|
-
* @returns Parsed tree items plus optional keyset pagination metadata.
|
|
6227
|
+
* @returns Parsed tree items plus optional keyset and offset pagination metadata.
|
|
6228
6228
|
*/
|
|
6229
6229
|
async function getRepositoryTree(options) {
|
|
6230
6230
|
options.project_id = decodeURIComponent(options.project_id); // Decode project_id within options
|
|
@@ -6237,6 +6237,8 @@ async function getRepositoryTree(options) {
|
|
|
6237
6237
|
queryParams.append("recursive", "true");
|
|
6238
6238
|
if (options.per_page)
|
|
6239
6239
|
queryParams.append("per_page", options.per_page.toString());
|
|
6240
|
+
if (options.page)
|
|
6241
|
+
queryParams.append("page", options.page.toString());
|
|
6240
6242
|
if (options.page_token)
|
|
6241
6243
|
queryParams.append("page_token", options.page_token);
|
|
6242
6244
|
if (options.pagination)
|
|
@@ -6250,10 +6252,10 @@ async function getRepositoryTree(options) {
|
|
|
6250
6252
|
}
|
|
6251
6253
|
const data = await response.json();
|
|
6252
6254
|
const items = z.array(GitLabTreeItemSchema).parse(data);
|
|
6253
|
-
const next_page_token = response.headers.get("x-next-page-token") ||
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
return { items, next_page_token };
|
|
6255
|
+
const next_page_token = response.headers.get("x-next-page-token") || undefined;
|
|
6256
|
+
// x-next-page is a page number, not a keyset token: never send it as page_token.
|
|
6257
|
+
const next_page = response.headers.get("x-next-page") || undefined;
|
|
6258
|
+
return { items, next_page_token, next_page };
|
|
6257
6259
|
}
|
|
6258
6260
|
/**
|
|
6259
6261
|
* List project milestones in a GitLab project
|
|
@@ -9576,14 +9578,31 @@ async function handleToolCall(params) {
|
|
|
9576
9578
|
return await handleWikiToolCall(params);
|
|
9577
9579
|
case "get_repository_tree": {
|
|
9578
9580
|
const args = GetRepositoryTreeSchema.parse(params.arguments);
|
|
9579
|
-
const { items, next_page_token } = await getRepositoryTree(args);
|
|
9580
|
-
|
|
9581
|
+
const { items, next_page_token, next_page } = await getRepositoryTree(args);
|
|
9582
|
+
let pagination_note;
|
|
9583
|
+
if (next_page_token) {
|
|
9584
|
+
pagination_note =
|
|
9585
|
+
"Pass next_page_token as page_token with pagination=keyset to retrieve the next page.";
|
|
9586
|
+
}
|
|
9587
|
+
else if (next_page) {
|
|
9588
|
+
pagination_note =
|
|
9589
|
+
args.pagination === "keyset"
|
|
9590
|
+
? "GitLab returned offset pagination for this request; pass next_page as page to retrieve the next page."
|
|
9591
|
+
: "Pass next_page as page to retrieve the next page.";
|
|
9592
|
+
}
|
|
9593
|
+
else if (args.pagination === "keyset") {
|
|
9594
|
+
pagination_note = "No next_page_token was returned; this is the final keyset page.";
|
|
9595
|
+
}
|
|
9596
|
+
else {
|
|
9597
|
+
pagination_note = "No next_page was returned; this is the final page.";
|
|
9598
|
+
}
|
|
9599
|
+
// Calls that do not opt in to pagination keep the legacy array response.
|
|
9600
|
+
const result = args.pagination === "keyset" || args.page !== undefined || next_page_token
|
|
9581
9601
|
? {
|
|
9582
9602
|
items,
|
|
9583
9603
|
...(next_page_token ? { next_page_token } : {}),
|
|
9584
|
-
|
|
9585
|
-
|
|
9586
|
-
: "No next_page_token was returned; this is the final keyset page.",
|
|
9604
|
+
...(next_page ? { next_page } : {}),
|
|
9605
|
+
pagination_note,
|
|
9587
9606
|
}
|
|
9588
9607
|
: items;
|
|
9589
9608
|
return {
|
package/build/schemas.js
CHANGED
|
@@ -1296,6 +1296,12 @@ export const GetRepositoryTreeSchema = z.object({
|
|
|
1296
1296
|
.describe("The name of a repository branch or tag. Defaults to the default branch."),
|
|
1297
1297
|
recursive: coerceBooleanString.optional().describe("Boolean value to get a recursive tree"),
|
|
1298
1298
|
per_page: z.coerce.number().optional().describe("Number of results to show per page"),
|
|
1299
|
+
page: z.coerce
|
|
1300
|
+
.number()
|
|
1301
|
+
.int()
|
|
1302
|
+
.positive()
|
|
1303
|
+
.optional()
|
|
1304
|
+
.describe("Page number for offset pagination, starting at 1. Passing it returns a structured response with items and, when more pages are available, next_page."),
|
|
1299
1305
|
page_token: z
|
|
1300
1306
|
.string()
|
|
1301
1307
|
.optional()
|
|
@@ -1303,7 +1309,7 @@ export const GetRepositoryTreeSchema = z.object({
|
|
|
1303
1309
|
pagination: z
|
|
1304
1310
|
.string()
|
|
1305
1311
|
.optional()
|
|
1306
|
-
.describe("Pagination method. Use 'keyset' for keyset-based pagination (required for repositories with many files).
|
|
1312
|
+
.describe("Pagination method. Use 'keyset' for keyset-based pagination (required for repositories with many files). Calls without page or pagination keep the legacy array response for backward compatibility; that legacy response shape is deprecated and may be removed in a future major release. Keyset calls return a structured response with items and next_page_token when more pages are available."),
|
|
1307
1313
|
});
|
|
1308
1314
|
export const GitLabTreeSchema = z.object({
|
|
1309
1315
|
id: z.string(), // Changed from sha to match GitLab API
|
package/package.json
CHANGED