gitlab-mcp-agent-server 0.2.5 → 0.2.6
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.
|
@@ -28,6 +28,7 @@ function createMcpServer() {
|
|
|
28
28
|
scopes: config.gitlab.oauth.scopes,
|
|
29
29
|
bootstrapAccessToken: config.gitlab.accessToken,
|
|
30
30
|
tokenStorePath: config.gitlab.oauth.tokenStorePath,
|
|
31
|
+
callbackTimeoutMs: config.gitlab.oauth.callbackTimeoutMs,
|
|
31
32
|
autoLogin: config.gitlab.oauth.autoLogin,
|
|
32
33
|
openBrowser: config.gitlab.oauth.openBrowser
|
|
33
34
|
})
|
|
@@ -15,6 +15,7 @@ const EnvSchema = zod_1.z.object({
|
|
|
15
15
|
GITLAB_OAUTH_REDIRECT_URI: zod_1.z.string().optional(),
|
|
16
16
|
GITLAB_OAUTH_SCOPES: zod_1.z.string().default('api'),
|
|
17
17
|
GITLAB_OAUTH_TOKEN_STORE_PATH: zod_1.z.string().optional(),
|
|
18
|
+
GITLAB_OAUTH_CALLBACK_TIMEOUT_MS: zod_1.z.coerce.number().int().positive().optional(),
|
|
18
19
|
GITLAB_OAUTH_AUTO_LOGIN: zod_1.z
|
|
19
20
|
.enum(['true', 'false'])
|
|
20
21
|
.optional()
|
|
@@ -68,6 +69,7 @@ function loadConfig() {
|
|
|
68
69
|
redirectUri: env.GITLAB_OAUTH_REDIRECT_URI,
|
|
69
70
|
scopes: splitCsv(env.GITLAB_OAUTH_SCOPES),
|
|
70
71
|
tokenStorePath: defaultTokenStorePath,
|
|
72
|
+
callbackTimeoutMs: env.GITLAB_OAUTH_CALLBACK_TIMEOUT_MS ?? 180_000,
|
|
71
73
|
autoLogin: env.GITLAB_OAUTH_AUTO_LOGIN,
|
|
72
74
|
openBrowser: env.GITLAB_OAUTH_OPEN_BROWSER
|
|
73
75
|
},
|
package/docs/USER_GUIDE.md
CHANGED
|
@@ -60,6 +60,7 @@ export GITLAB_AUTH_MODE="oauth";
|
|
|
60
60
|
export GITLAB_OAUTH_CLIENT_ID="<GITLAB_COM_APP_ID>";
|
|
61
61
|
export GITLAB_OAUTH_CLIENT_SECRET="<GITLAB_COM_APP_SECRET>";
|
|
62
62
|
export GITLAB_OAUTH_REDIRECT_URI="http://127.0.0.1:8787/oauth/callback";
|
|
63
|
+
export GITLAB_OAUTH_CALLBACK_TIMEOUT_MS="180000";
|
|
63
64
|
export GITLAB_OAUTH_AUTO_LOGIN="true";
|
|
64
65
|
export GITLAB_OAUTH_OPEN_BROWSER="true";
|
|
65
66
|
|
|
@@ -77,6 +78,7 @@ export GITLAB_AUTH_MODE="oauth";
|
|
|
77
78
|
export GITLAB_OAUTH_CLIENT_ID="<WORK_APP_ID>";
|
|
78
79
|
export GITLAB_OAUTH_CLIENT_SECRET="<WORK_APP_SECRET>";
|
|
79
80
|
export GITLAB_OAUTH_REDIRECT_URI="http://127.0.0.1:8788/oauth/callback";
|
|
81
|
+
export GITLAB_OAUTH_CALLBACK_TIMEOUT_MS="180000";
|
|
80
82
|
export GITLAB_OAUTH_AUTO_LOGIN="true";
|
|
81
83
|
export GITLAB_OAUTH_OPEN_BROWSER="true";
|
|
82
84
|
|
|
@@ -121,6 +123,8 @@ npx -y gitlab-mcp-agent-server
|
|
|
121
123
|
2. Ограничь права файла:
|
|
122
124
|
- `chmod 600 /home/<user>/.config/gitlab-mcp/gitlab.com/token.json`
|
|
123
125
|
3. Для headless окружений ставь `GITLAB_OAUTH_OPEN_BROWSER=false`.
|
|
126
|
+
4. При медленном интерактивном flow увеличь окно ожидания callback:
|
|
127
|
+
- `GITLAB_OAUTH_CALLBACK_TIMEOUT_MS=180000` (или выше).
|
|
124
128
|
|
|
125
129
|
## 7. Сценарий пользовательского запроса
|
|
126
130
|
|