@zereight/mcp-gitlab 2.3.12-next.163 → 2.3.13-next.166

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
@@ -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.10`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. `main`에 머지된 수정을 다음 안정 버전 전에 확인하려면 프리릴리스 빌드인 `npx -y @zereight/mcp-gitlab@next`를 사용하세요(운영 환경용이 아닙니다). 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
255
+ 전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.3.11`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `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.10`. 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`).
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.11`. 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.10`. 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`).
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.11`. 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.10`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。如需在下一个稳定版本发布前试用已合并到 `main` 的修复,请使用 `npx -y @zereight/mcp-gitlab@next`(预发布版本,不适用于生产环境)。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
255
+ 如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.3.11`。如果始终想使用最新版本,请改用 `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
 
@@ -73,6 +73,25 @@ const GROUP_MEMBERSHIP_CACHE_MAX_SIZE = 1000;
73
73
  const GROUP_MEMBERSHIP_CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes
74
74
  const GROUP_ACCESS_DENIED_MESSAGE = "Access denied: user is not a member of an allowed group";
75
75
  const REFRESH_TOKEN_DISABLED_MESSAGE = "Refresh tokens are disabled on this server (OAUTH_DISABLE_REFRESH_TOKEN); start a new authorization";
76
+ /**
77
+ * Maps a non-OK GitLab /oauth/token response. A rotated, revoked or expired
78
+ * refresh token or authorization code is a 400 invalid_grant, which clients
79
+ * must see as invalid_grant to restart authorization; anything else stays a
80
+ * ServerError.
81
+ */
82
+ function tokenEndpointError(operation, status, body) {
83
+ let gitlabError;
84
+ try {
85
+ gitlabError = JSON.parse(body)?.error;
86
+ }
87
+ catch {
88
+ gitlabError = undefined;
89
+ }
90
+ if (status === 400 && gitlabError === "invalid_grant") {
91
+ return new InvalidGrantError(`${operation} rejected by GitLab; start a new authorization`);
92
+ }
93
+ return new ServerError(`${operation} failed: ${status}`);
94
+ }
76
95
  function singleQueryParam(value) {
77
96
  return typeof value === "string" ? value : undefined;
78
97
  }
@@ -515,7 +534,7 @@ class GitLabOAuthServerProvider {
515
534
  if (!response.ok) {
516
535
  const body = await response.text();
517
536
  logger.error(`Token exchange failed (${response.status}): ${body}`);
518
- throw new ServerError(`Token exchange failed: ${response.status}`);
537
+ throw tokenEndpointError("Token exchange", response.status, body);
519
538
  }
520
539
  const data = await response.json();
521
540
  tokens = OAuthTokensSchema.parse(data);
@@ -629,7 +648,7 @@ class GitLabOAuthServerProvider {
629
648
  if (!response.ok) {
630
649
  const body = await response.text();
631
650
  logger.error(`Token refresh failed (${response.status}): ${body}`);
632
- throw new ServerError(`Token refresh failed: ${response.status}`);
651
+ throw tokenEndpointError("Token refresh", response.status, body);
633
652
  }
634
653
  const data = await response.json();
635
654
  const tokens = OAuthTokensSchema.parse(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "2.3.12-next.163",
3
+ "version": "2.3.13-next.166",
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": [