@zereight/mcp-gitlab 2.1.44 → 2.1.45
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 +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/build/index.js +18 -1
- package/package.json +1 -1
package/README.ko.md
CHANGED
|
@@ -80,7 +80,7 @@ npm install -g @zereight/mcp-gitlab
|
|
|
80
80
|
|
|
81
81
|
예시는 기존 `mcp-gitlab`보다 충돌 가능성이 낮은 `zereight-mcp-gitlab` 별칭을 사용합니다. MCP 클라이언트가 찾지 못하면 `which zereight-mcp-gitlab`의 절대 경로를 사용하세요.
|
|
82
82
|
|
|
83
|
-
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.
|
|
83
|
+
전역 설치를 쓰지 않으려면 `npx -y @zereight/mcp-gitlab@2.1.44`처럼 직전 안정 버전(문서가 권장하는 버전)으로 고정하세요. 항상 최신 버전을 원하면 `npx -y @zereight/mcp-gitlab@latest`를 사용하세요. 새 버전이 나오면 서버가 시작 시 stderr로 알려줍니다(`GITLAB_DISABLE_VERSION_CHECK=true`로 비활성화 가능).
|
|
84
84
|
|
|
85
85
|
#### CLI 인자 사용하기(환경 변수 문제가 있는 클라이언트용)
|
|
86
86
|
|
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ npm install -g @zereight/mcp-gitlab
|
|
|
82
82
|
|
|
83
83
|
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`.
|
|
84
84
|
|
|
85
|
-
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.
|
|
85
|
+
No global install? Pin `npx` to the previous stable release (the version these docs recommend), for example `npx -y @zereight/mcp-gitlab@2.1.44`. 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`).
|
|
86
86
|
|
|
87
87
|
#### Using CLI Arguments (for clients with env var issues)
|
|
88
88
|
|
package/README.zh-CN.md
CHANGED
|
@@ -80,7 +80,7 @@ npm install -g @zereight/mcp-gitlab
|
|
|
80
80
|
|
|
81
81
|
示例使用 `zereight-mcp-gitlab`,这是比旧的 `mcp-gitlab` 更不容易冲突的别名。如果 MCP 客户端找不到它,请使用 `which zereight-mcp-gitlab` 输出的绝对路径。
|
|
82
82
|
|
|
83
|
-
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.
|
|
83
|
+
如果不想全局安装,请将 `npx` 固定到上一个稳定版本(即文档推荐的版本),例如 `npx -y @zereight/mcp-gitlab@2.1.44`。如果始终想使用最新版本,请改用 `npx -y @zereight/mcp-gitlab@latest`。有新版本发布时,服务器会在启动时通过 stderr 提示(可用 `GITLAB_DISABLE_VERSION_CHECK=true` 关闭)。
|
|
84
84
|
|
|
85
85
|
#### 使用 CLI 参数(适用于环境变量有问题的客户端)
|
|
86
86
|
|
package/build/index.js
CHANGED
|
@@ -538,6 +538,14 @@ function validateConfiguration() {
|
|
|
538
538
|
errors.push(`MAX_REQUESTS_PER_MINUTE must be between 1 and 1000, got: ${maxReqStr}`);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
+
// Validate OAUTH_REGISTER_RATE_LIMIT_PER_HOUR
|
|
542
|
+
const registerRateLimitStr = process.env.OAUTH_REGISTER_RATE_LIMIT_PER_HOUR;
|
|
543
|
+
if (registerRateLimitStr) {
|
|
544
|
+
const limit = Number(registerRateLimitStr);
|
|
545
|
+
if (!Number.isInteger(limit) || limit < 1 || limit > 1000) {
|
|
546
|
+
errors.push(`OAUTH_REGISTER_RATE_LIMIT_PER_HOUR must be an integer between 1 and 1000, got: ${registerRateLimitStr}`);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
541
549
|
// Validate PORT
|
|
542
550
|
const portStr = getConfig("port", "PORT");
|
|
543
551
|
if (portStr) {
|
|
@@ -10166,6 +10174,15 @@ async function startStreamableHTTPServer() {
|
|
|
10166
10174
|
// ERR_ERL_INVALID_IP_ADDRESS. Strip the port first, then delegate to
|
|
10167
10175
|
// ipKeyGenerator for correct IPv6 subnet handling.
|
|
10168
10176
|
const rateLimitOptions = { keyGenerator: mcpRateLimitKeyGenerator };
|
|
10177
|
+
const parsedRegisterLimit = Number(process.env.OAUTH_REGISTER_RATE_LIMIT_PER_HOUR);
|
|
10178
|
+
const OAUTH_REGISTER_RATE_LIMIT_PER_HOUR = Number.isInteger(parsedRegisterLimit) && parsedRegisterLimit >= 1
|
|
10179
|
+
? parsedRegisterLimit
|
|
10180
|
+
: 20;
|
|
10181
|
+
const clientRegistrationRateLimitOptions = {
|
|
10182
|
+
...rateLimitOptions,
|
|
10183
|
+
windowMs: 60 * 60 * 1000, // 1 hour
|
|
10184
|
+
max: OAUTH_REGISTER_RATE_LIMIT_PER_HOUR,
|
|
10185
|
+
};
|
|
10169
10186
|
app.use(mcpAuthRouter({
|
|
10170
10187
|
provider: oauthProvider,
|
|
10171
10188
|
issuerUrl,
|
|
@@ -10175,7 +10192,7 @@ async function startStreamableHTTPServer() {
|
|
|
10175
10192
|
authorizationOptions: { rateLimit: rateLimitOptions },
|
|
10176
10193
|
tokenOptions: { rateLimit: rateLimitOptions },
|
|
10177
10194
|
revocationOptions: { rateLimit: rateLimitOptions },
|
|
10178
|
-
clientRegistrationOptions: { rateLimit:
|
|
10195
|
+
clientRegistrationOptions: { rateLimit: clientRegistrationRateLimitOptions },
|
|
10179
10196
|
}));
|
|
10180
10197
|
// Expose provider so the /mcp route middleware can reference it
|
|
10181
10198
|
app._mcpOAuthProvider = oauthProvider;
|
package/package.json
CHANGED