@structured-world/gitlab-mcp 5.7.0 → 5.8.0
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.md +236 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.js +6 -1
- package/dist/config.js.map +1 -1
- package/dist/entities/core/registry.js +53 -20
- package/dist/entities/core/registry.js.map +1 -1
- package/dist/entities/core/schema-readonly.d.ts +172 -442
- package/dist/entities/core/schema.d.ts +65 -173
- package/dist/entities/files/registry.js +42 -19
- package/dist/entities/files/registry.js.map +1 -1
- package/dist/entities/files/schema-readonly.d.ts +24 -124
- package/dist/entities/files/schema.d.ts +17 -82
- package/dist/entities/labels/registry.js +39 -6
- package/dist/entities/labels/registry.js.map +1 -1
- package/dist/entities/labels/schema-readonly.d.ts +6 -24
- package/dist/entities/labels/schema.d.ts +5 -37
- package/dist/entities/milestones/registry.js +44 -11
- package/dist/entities/milestones/registry.js.map +1 -1
- package/dist/entities/milestones/schema-readonly.d.ts +20 -100
- package/dist/entities/milestones/schema.d.ts +11 -48
- package/dist/entities/mrs/registry.js +56 -23
- package/dist/entities/mrs/registry.js.map +1 -1
- package/dist/entities/mrs/schema-readonly.d.ts +68 -243
- package/dist/entities/mrs/schema.d.ts +142 -885
- package/dist/entities/pipelines/registry.js +46 -13
- package/dist/entities/pipelines/registry.js.map +1 -1
- package/dist/entities/pipelines/schema-readonly.d.ts +115 -525
- package/dist/entities/pipelines/schema.d.ts +30 -104
- package/dist/entities/shared.d.ts +110 -787
- package/dist/entities/utils.d.ts +2 -2
- package/dist/entities/variables/registry.js +40 -7
- package/dist/entities/variables/registry.js.map +1 -1
- package/dist/entities/variables/schema-readonly.d.ts +3 -28
- package/dist/entities/variables/schema.d.ts +20 -80
- package/dist/entities/wiki/registry.js +39 -6
- package/dist/entities/wiki/registry.js.map +1 -1
- package/dist/entities/wiki/schema-readonly.d.ts +4 -35
- package/dist/entities/wiki/schema.d.ts +3 -31
- package/dist/entities/workitems/registry.js +40 -7
- package/dist/entities/workitems/registry.js.map +1 -1
- package/dist/entities/workitems/schema-readonly.d.ts +35 -32
- package/dist/entities/workitems/schema-readonly.js +1 -1
- package/dist/entities/workitems/schema-readonly.js.map +1 -1
- package/dist/entities/workitems/schema.d.ts +21 -45
- package/dist/middleware/index.d.ts +1 -0
- package/dist/middleware/index.js +8 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/oauth-auth.d.ts +4 -0
- package/dist/middleware/oauth-auth.js +135 -0
- package/dist/middleware/oauth-auth.js.map +1 -0
- package/dist/oauth/config.d.ts +19 -0
- package/dist/oauth/config.js +70 -0
- package/dist/oauth/config.js.map +1 -0
- package/dist/oauth/endpoints/authorize.d.ts +3 -0
- package/dist/oauth/endpoints/authorize.js +414 -0
- package/dist/oauth/endpoints/authorize.js.map +1 -0
- package/dist/oauth/endpoints/index.d.ts +3 -0
- package/dist/oauth/endpoints/index.js +13 -0
- package/dist/oauth/endpoints/index.js.map +1 -0
- package/dist/oauth/endpoints/metadata.d.ts +4 -0
- package/dist/oauth/endpoints/metadata.js +36 -0
- package/dist/oauth/endpoints/metadata.js.map +1 -0
- package/dist/oauth/endpoints/token.d.ts +2 -0
- package/dist/oauth/endpoints/token.js +159 -0
- package/dist/oauth/endpoints/token.js.map +1 -0
- package/dist/oauth/gitlab-device-flow.d.ts +8 -0
- package/dist/oauth/gitlab-device-flow.js +172 -0
- package/dist/oauth/gitlab-device-flow.js.map +1 -0
- package/dist/oauth/index.d.ts +8 -0
- package/dist/oauth/index.js +48 -0
- package/dist/oauth/index.js.map +1 -0
- package/dist/oauth/session-store.d.ts +37 -0
- package/dist/oauth/session-store.js +182 -0
- package/dist/oauth/session-store.js.map +1 -0
- package/dist/oauth/token-context.d.ts +8 -0
- package/dist/oauth/token-context.js +40 -0
- package/dist/oauth/token-context.js.map +1 -0
- package/dist/oauth/token-utils.d.ts +14 -0
- package/dist/oauth/token-utils.js +148 -0
- package/dist/oauth/token-utils.js.map +1 -0
- package/dist/oauth/types.d.ts +94 -0
- package/dist/oauth/types.js +3 -0
- package/dist/oauth/types.js.map +1 -0
- package/dist/server.js +147 -9
- package/dist/server.js.map +1 -1
- package/dist/structured-world-gitlab-mcp-5.8.0.tgz +0 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/fetch.d.ts +3 -7
- package/dist/utils/fetch.js +82 -54
- package/dist/utils/fetch.js.map +1 -1
- package/package.json +23 -23
- package/dist/structured-world-gitlab-mcp-5.7.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ This fork is actively maintained and enhanced with strict TypeScript standards,
|
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
17
|
-
- **Node.js**: >=
|
|
17
|
+
- **Node.js**: >=24.0.0 (required for native fetch with Undici dispatcher pattern)
|
|
18
18
|
- **GitLab**: Compatible with GitLab.com and self-hosted instances
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -201,6 +201,236 @@ The GitLab MCP Server automatically selects the appropriate transport mode based
|
|
|
201
201
|
- Optimal for command-line tools and direct MCP protocol usage
|
|
202
202
|
- Lower resource usage
|
|
203
203
|
|
|
204
|
+
## TLS/HTTPS Configuration
|
|
205
|
+
|
|
206
|
+
GitLab MCP Server supports secure HTTPS connections via:
|
|
207
|
+
|
|
208
|
+
| Approach | Best For | HTTP/2 | Auto-Renewal |
|
|
209
|
+
|----------|----------|--------|--------------|
|
|
210
|
+
| **Direct TLS** | Development, simple deployments | No | Manual |
|
|
211
|
+
| **Reverse Proxy** | Production (recommended) | Yes | Yes |
|
|
212
|
+
|
|
213
|
+
**Quick Start - Direct TLS:**
|
|
214
|
+
```bash
|
|
215
|
+
docker run -d \
|
|
216
|
+
-e PORT=3000 \
|
|
217
|
+
-e SSL_CERT_PATH=/certs/server.crt \
|
|
218
|
+
-e SSL_KEY_PATH=/certs/server.key \
|
|
219
|
+
-e GITLAB_TOKEN=your_token \
|
|
220
|
+
-v $(pwd)/certs:/certs:ro \
|
|
221
|
+
-p 3000:3000 \
|
|
222
|
+
ghcr.io/structured-world/gitlab-mcp:latest
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
**Quick Start - Reverse Proxy (Caddy):**
|
|
226
|
+
```
|
|
227
|
+
gitlab-mcp.example.com {
|
|
228
|
+
reverse_proxy gitlab-mcp:3002 {
|
|
229
|
+
flush_interval -1
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
For complete setup guides including **nginx**, **Envoy**, **Caddy**, and **Traefik** configurations with HTTP/2 support, see **[SSL.md](SSL.md)**.
|
|
235
|
+
|
|
236
|
+
## OAuth Authentication (Claude Custom Connector)
|
|
237
|
+
|
|
238
|
+
GitLab MCP Server supports OAuth 2.1 authentication for use as a **Claude Custom Connector**. This enables secure per-user authentication without sharing GitLab tokens.
|
|
239
|
+
|
|
240
|
+
### When to Use OAuth Mode
|
|
241
|
+
|
|
242
|
+
| Scenario | Recommended Mode |
|
|
243
|
+
|----------|------------------|
|
|
244
|
+
| Personal/local use | Static Token (`GITLAB_TOKEN`) |
|
|
245
|
+
| Team access via Claude Web/Desktop | **OAuth Mode** |
|
|
246
|
+
| Private LAN GitLab with public MCP server | **OAuth Mode** |
|
|
247
|
+
| CI/CD or automated pipelines | Static Token |
|
|
248
|
+
|
|
249
|
+
### Prerequisites
|
|
250
|
+
|
|
251
|
+
1. **GitLab 17.1+** (Device Authorization Grant support)
|
|
252
|
+
2. **HTTPS endpoint** for gitlab-mcp (required for OAuth)
|
|
253
|
+
3. **GitLab OAuth Application** configured
|
|
254
|
+
|
|
255
|
+
### Setup Guide
|
|
256
|
+
|
|
257
|
+
#### Step 1: Create GitLab OAuth Application
|
|
258
|
+
|
|
259
|
+
1. In GitLab, navigate to **User Settings > Applications** (or **Admin > Applications** for instance-wide)
|
|
260
|
+
2. Create a new application:
|
|
261
|
+
- **Name**: `GitLab MCP Server`
|
|
262
|
+
- **Redirect URI**: `https://your-mcp-server.com/oauth/callback`
|
|
263
|
+
- **Confidential**: `No` (required for device flow)
|
|
264
|
+
- **Scopes**: Select `api` and `read_user`
|
|
265
|
+
3. Save and copy the **Application ID**
|
|
266
|
+
|
|
267
|
+
#### Step 2: Configure gitlab-mcp Server
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
# Required for OAuth mode
|
|
271
|
+
OAUTH_ENABLED=true
|
|
272
|
+
OAUTH_SESSION_SECRET=your-minimum-32-character-secret-key
|
|
273
|
+
GITLAB_OAUTH_CLIENT_ID=your-gitlab-application-id
|
|
274
|
+
GITLAB_API_URL=https://your-gitlab-instance.com
|
|
275
|
+
|
|
276
|
+
# Server configuration
|
|
277
|
+
PORT=3000
|
|
278
|
+
HOST=0.0.0.0
|
|
279
|
+
|
|
280
|
+
# Optional OAuth settings
|
|
281
|
+
GITLAB_OAUTH_CLIENT_SECRET=your-secret # Required only if GitLab app is confidential
|
|
282
|
+
GITLAB_OAUTH_SCOPES=api,read_user # Default scopes
|
|
283
|
+
OAUTH_TOKEN_TTL=3600 # Token lifetime (seconds)
|
|
284
|
+
OAUTH_REFRESH_TOKEN_TTL=604800 # Refresh token lifetime (seconds)
|
|
285
|
+
OAUTH_DEVICE_POLL_INTERVAL=5 # Device flow poll interval (seconds)
|
|
286
|
+
OAUTH_DEVICE_TIMEOUT=300 # Auth timeout (seconds)
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
#### Step 3: Deploy with HTTPS
|
|
290
|
+
|
|
291
|
+
OAuth requires HTTPS. Example with Docker:
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
docker run -d \
|
|
295
|
+
--name gitlab-mcp \
|
|
296
|
+
-e OAUTH_ENABLED=true \
|
|
297
|
+
-e OAUTH_SESSION_SECRET="$(openssl rand -base64 32)" \
|
|
298
|
+
-e GITLAB_OAUTH_CLIENT_ID=your-app-id \
|
|
299
|
+
-e GITLAB_API_URL=https://gitlab.example.com \
|
|
300
|
+
-e PORT=3000 \
|
|
301
|
+
-p 3000:3000 \
|
|
302
|
+
ghcr.io/structured-world/gitlab-mcp:latest
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
Use a reverse proxy (nginx, Caddy, Traefik) to add HTTPS.
|
|
306
|
+
|
|
307
|
+
### Claude Web Setup
|
|
308
|
+
|
|
309
|
+
1. Go to [claude.ai](https://claude.ai) and sign in
|
|
310
|
+
2. Navigate to **Settings > Connectors**
|
|
311
|
+
3. Click **Add custom connector**
|
|
312
|
+
4. Enter your gitlab-mcp server URL: `https://your-mcp-server.com`
|
|
313
|
+
5. Click **Add**
|
|
314
|
+
6. When prompted, complete authentication:
|
|
315
|
+
- You'll see a device code (e.g., `ABCD-1234`)
|
|
316
|
+
- Open your GitLab instance and enter the code
|
|
317
|
+
- Approve the authorization request
|
|
318
|
+
7. The connector is now active
|
|
319
|
+
|
|
320
|
+
### Claude Desktop Setup
|
|
321
|
+
|
|
322
|
+
#### macOS / Linux
|
|
323
|
+
|
|
324
|
+
Edit `~/.config/claude/claude_desktop_config.json`:
|
|
325
|
+
|
|
326
|
+
```json
|
|
327
|
+
{
|
|
328
|
+
"mcpServers": {
|
|
329
|
+
"gitlab": {
|
|
330
|
+
"type": "streamable-http",
|
|
331
|
+
"url": "https://your-mcp-server.com/mcp"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
#### Windows
|
|
338
|
+
|
|
339
|
+
Edit `%APPDATA%\Claude\claude_desktop_config.json`:
|
|
340
|
+
|
|
341
|
+
```json
|
|
342
|
+
{
|
|
343
|
+
"mcpServers": {
|
|
344
|
+
"gitlab": {
|
|
345
|
+
"type": "streamable-http",
|
|
346
|
+
"url": "https://your-mcp-server.com/mcp"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
After adding the server:
|
|
353
|
+
1. Restart Claude Desktop
|
|
354
|
+
2. Claude will prompt you to authenticate
|
|
355
|
+
3. Complete the device flow authorization in GitLab
|
|
356
|
+
4. Start using GitLab tools with your personal identity
|
|
357
|
+
|
|
358
|
+
### Private LAN GitLab Architecture
|
|
359
|
+
|
|
360
|
+
For GitLab instances on private networks (not internet-accessible):
|
|
361
|
+
|
|
362
|
+
```
|
|
363
|
+
+-------------------+ +-------------------+ +-------------------+
|
|
364
|
+
| Claude Cloud | HTTPS | gitlab-mcp | HTTP | GitLab Server |
|
|
365
|
+
| or Desktop |-------->| (Public IP) |-------->| (Private LAN) |
|
|
366
|
+
+-------------------+ +-------------------+ +-------------------+
|
|
367
|
+
|
|
|
368
|
+
| Device code displayed
|
|
369
|
+
v
|
|
370
|
+
+-------------------+
|
|
371
|
+
| User (on VPN) |
|
|
372
|
+
| visits GitLab |
|
|
373
|
+
| enters code |
|
|
374
|
+
+-------------------+
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
**How it works:**
|
|
378
|
+
1. gitlab-mcp server has network access to GitLab (same network or VPN)
|
|
379
|
+
2. User connects to gitlab-mcp via Claude (public internet)
|
|
380
|
+
3. gitlab-mcp initiates device authorization with GitLab
|
|
381
|
+
4. User receives a code and visits GitLab directly (requires VPN/internal access)
|
|
382
|
+
5. User authenticates in GitLab and enters the code
|
|
383
|
+
6. gitlab-mcp receives the token and issues an MCP session token
|
|
384
|
+
7. All subsequent requests use the user's GitLab identity
|
|
385
|
+
|
|
386
|
+
**Requirements:**
|
|
387
|
+
- gitlab-mcp must reach GitLab API (deploy on same network or use VPN)
|
|
388
|
+
- Users must be able to access GitLab web UI (typically via VPN)
|
|
389
|
+
- gitlab-mcp must be accessible from internet (for Claude to connect)
|
|
390
|
+
|
|
391
|
+
### OAuth vs Static Token Comparison
|
|
392
|
+
|
|
393
|
+
| Feature | Static Token | OAuth Mode |
|
|
394
|
+
|---------|--------------|------------|
|
|
395
|
+
| Setup complexity | Simple | Moderate |
|
|
396
|
+
| Per-user identity | No (shared token) | Yes |
|
|
397
|
+
| Token management | Manual | Automatic |
|
|
398
|
+
| Audit trail | Single identity | Per-user actions |
|
|
399
|
+
| Security | Token in config | No tokens in config |
|
|
400
|
+
| Best for | Personal use, CI/CD | Teams, shared access |
|
|
401
|
+
|
|
402
|
+
### OAuth Endpoints
|
|
403
|
+
|
|
404
|
+
When OAuth is enabled, the following endpoints are available:
|
|
405
|
+
|
|
406
|
+
| Endpoint | Method | Description |
|
|
407
|
+
|----------|--------|-------------|
|
|
408
|
+
| `/.well-known/oauth-authorization-server` | GET | OAuth metadata discovery |
|
|
409
|
+
| `/authorize` | GET | Start authorization (device flow) |
|
|
410
|
+
| `/oauth/poll` | GET | Poll for authorization completion |
|
|
411
|
+
| `/token` | POST | Exchange code for tokens |
|
|
412
|
+
| `/health` | GET | Health check endpoint |
|
|
413
|
+
|
|
414
|
+
### Troubleshooting
|
|
415
|
+
|
|
416
|
+
**"OAuth not configured" error**
|
|
417
|
+
- Ensure `OAUTH_ENABLED=true` is set
|
|
418
|
+
- Verify `OAUTH_SESSION_SECRET` is at least 32 characters
|
|
419
|
+
- Check `GITLAB_OAUTH_CLIENT_ID` is correct
|
|
420
|
+
|
|
421
|
+
**Device code not accepted**
|
|
422
|
+
- Verify GitLab version is 17.1 or later
|
|
423
|
+
- Check OAuth application scopes include `api`
|
|
424
|
+
- Ensure the application is not set as "Confidential"
|
|
425
|
+
|
|
426
|
+
**"Failed to refresh token" error**
|
|
427
|
+
- GitLab refresh token may have expired
|
|
428
|
+
- Re-authenticate through Claude connector settings
|
|
429
|
+
|
|
430
|
+
**Cannot reach GitLab for authentication**
|
|
431
|
+
- For private LAN GitLab, connect to VPN first
|
|
432
|
+
- Verify you can access GitLab web UI in your browser
|
|
433
|
+
|
|
204
434
|
### Environment Variables
|
|
205
435
|
|
|
206
436
|
- `GITLAB_TOKEN`: Your GitLab personal access token.
|
|
@@ -221,6 +451,11 @@ The GitLab MCP Server automatically selects the appropriate transport mode based
|
|
|
221
451
|
- `USE_VARIABLES`: When set to 'true', enables the CI/CD variables-related tools (list_variables, get_variable, create_variable, update_variable, delete_variable). Supports both project-level and group-level variables. By default, variables features are enabled.
|
|
222
452
|
- `GITLAB_AUTH_COOKIE_PATH`: Path to an authentication cookie file for GitLab instances that require cookie-based authentication. When provided, the cookie will be included in all GitLab API requests.
|
|
223
453
|
- `SKIP_TLS_VERIFY`: When set to 'true', skips TLS certificate verification for all GitLab API requests (both REST and GraphQL). **WARNING**: This bypasses SSL certificate validation and should only be used for testing with self-signed certificates or trusted internal GitLab instances. Never use this in production environments.
|
|
454
|
+
- `SSL_CERT_PATH`: Path to PEM certificate file for direct HTTPS/TLS termination. Requires `SSL_KEY_PATH` to also be set.
|
|
455
|
+
- `SSL_KEY_PATH`: Path to PEM private key file for direct HTTPS/TLS termination. Requires `SSL_CERT_PATH` to also be set.
|
|
456
|
+
- `SSL_CA_PATH`: Optional path to CA certificate chain for client certificate validation.
|
|
457
|
+
- `SSL_PASSPHRASE`: Optional passphrase for encrypted private keys.
|
|
458
|
+
- `TRUST_PROXY`: Enable Express trust proxy for reverse proxy deployments. Values: `true`, `false`, `loopback`, `linklocal`, `uniquelocal`, hop count, or specific IP addresses.
|
|
224
459
|
|
|
225
460
|
### Dynamic Tool Description Customization
|
|
226
461
|
|
package/dist/config.d.ts
CHANGED
|
@@ -13,6 +13,11 @@ export declare const USE_FILES: boolean;
|
|
|
13
13
|
export declare const USE_VARIABLES: boolean;
|
|
14
14
|
export declare const HOST: string;
|
|
15
15
|
export declare const PORT: string | number;
|
|
16
|
+
export declare const SSL_CERT_PATH: string | undefined;
|
|
17
|
+
export declare const SSL_KEY_PATH: string | undefined;
|
|
18
|
+
export declare const SSL_CA_PATH: string | undefined;
|
|
19
|
+
export declare const SSL_PASSPHRASE: string | undefined;
|
|
20
|
+
export declare const TRUST_PROXY: string | undefined;
|
|
16
21
|
export declare const API_TIMEOUT_MS: number;
|
|
17
22
|
export declare const SKIP_TLS_VERIFY: boolean;
|
|
18
23
|
export declare const HTTP_PROXY: string | undefined;
|
package/dist/config.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.packageVersion = exports.packageName = exports.GITLAB_ALLOWED_PROJECT_IDS = exports.GITLAB_PROJECT_ID = exports.GITLAB_API_URL = exports.GITLAB_BASE_URL = exports.GITLAB_CA_CERT_PATH = exports.NODE_TLS_REJECT_UNAUTHORIZED = exports.HTTPS_PROXY = exports.HTTP_PROXY = exports.SKIP_TLS_VERIFY = exports.API_TIMEOUT_MS = exports.PORT = exports.HOST = exports.USE_VARIABLES = exports.USE_FILES = exports.USE_MRS = exports.USE_LABELS = exports.USE_WORKITEMS = exports.USE_PIPELINE = exports.USE_MILESTONE = exports.USE_GITLAB_WIKI = exports.GITLAB_DENIED_TOOLS_REGEX = exports.GITLAB_READ_ONLY_MODE = exports.IS_OLD = exports.GITLAB_AUTH_COOKIE_PATH = exports.GITLAB_TOKEN = void 0;
|
|
36
|
+
exports.packageVersion = exports.packageName = exports.GITLAB_ALLOWED_PROJECT_IDS = exports.GITLAB_PROJECT_ID = exports.GITLAB_API_URL = exports.GITLAB_BASE_URL = exports.GITLAB_CA_CERT_PATH = exports.NODE_TLS_REJECT_UNAUTHORIZED = exports.HTTPS_PROXY = exports.HTTP_PROXY = exports.SKIP_TLS_VERIFY = exports.API_TIMEOUT_MS = exports.TRUST_PROXY = exports.SSL_PASSPHRASE = exports.SSL_CA_PATH = exports.SSL_KEY_PATH = exports.SSL_CERT_PATH = exports.PORT = exports.HOST = exports.USE_VARIABLES = exports.USE_FILES = exports.USE_MRS = exports.USE_LABELS = exports.USE_WORKITEMS = exports.USE_PIPELINE = exports.USE_MILESTONE = exports.USE_GITLAB_WIKI = exports.GITLAB_DENIED_TOOLS_REGEX = exports.GITLAB_READ_ONLY_MODE = exports.IS_OLD = exports.GITLAB_AUTH_COOKIE_PATH = exports.GITLAB_TOKEN = void 0;
|
|
37
37
|
exports.getEffectiveProjectId = getEffectiveProjectId;
|
|
38
38
|
exports.getToolDescriptionOverrides = getToolDescriptionOverrides;
|
|
39
39
|
const path = __importStar(require("path"));
|
|
@@ -56,6 +56,11 @@ exports.USE_FILES = process.env.USE_FILES !== "false";
|
|
|
56
56
|
exports.USE_VARIABLES = process.env.USE_VARIABLES !== "false";
|
|
57
57
|
exports.HOST = process.env.HOST ?? "0.0.0.0";
|
|
58
58
|
exports.PORT = process.env.PORT ?? 3002;
|
|
59
|
+
exports.SSL_CERT_PATH = process.env.SSL_CERT_PATH;
|
|
60
|
+
exports.SSL_KEY_PATH = process.env.SSL_KEY_PATH;
|
|
61
|
+
exports.SSL_CA_PATH = process.env.SSL_CA_PATH;
|
|
62
|
+
exports.SSL_PASSPHRASE = process.env.SSL_PASSPHRASE;
|
|
63
|
+
exports.TRUST_PROXY = process.env.TRUST_PROXY;
|
|
59
64
|
exports.API_TIMEOUT_MS = parseInt(process.env.GITLAB_API_TIMEOUT_MS ?? "20000", 10);
|
|
60
65
|
exports.SKIP_TLS_VERIFY = process.env.SKIP_TLS_VERIFY === "true";
|
|
61
66
|
exports.HTTP_PROXY = process.env.HTTP_PROXY;
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA,sDAcC;AAwBD,kEAgBC;AAhID,2CAA6B;AAC7B,uCAAyB;AAEzB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC;AAGvD,QAAA,YAAY,GAAG,OAAO,CAAC,GAA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EAAE,CAAC;QACvD,IAAI,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YAGpC,MAAM,QAAQ,GAAG,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;YAE5D,SAAS,CAAC,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,10 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.coreToolRegistry = void 0;
|
|
4
37
|
exports.getCoreReadOnlyToolNames = getCoreReadOnlyToolNames;
|
|
5
38
|
exports.getCoreToolDefinitions = getCoreToolDefinitions;
|
|
6
39
|
exports.getFilteredCoreTools = getFilteredCoreTools;
|
|
7
|
-
const
|
|
40
|
+
const z = __importStar(require("zod"));
|
|
8
41
|
const schema_readonly_1 = require("./schema-readonly");
|
|
9
42
|
const schema_1 = require("./schema");
|
|
10
43
|
const fetch_1 = require("../../utils/fetch");
|
|
@@ -17,7 +50,7 @@ exports.coreToolRegistry = new Map([
|
|
|
17
50
|
{
|
|
18
51
|
name: "search_repositories",
|
|
19
52
|
description: "DISCOVER projects across ALL of GitLab using search criteria. Use when: You DON'T know the project name/path, Looking for ANY project (not just yours), Searching by language/keywords/topics. Use with_programming_language parameter for efficient language filtering. See also: Use list_projects for YOUR accessible projects only.",
|
|
20
|
-
inputSchema:
|
|
53
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.SearchRepositoriesSchema),
|
|
21
54
|
handler: async (args) => {
|
|
22
55
|
const options = schema_readonly_1.SearchRepositoriesSchema.parse(args);
|
|
23
56
|
const { q, with_programming_language, ...otherOptions } = options;
|
|
@@ -83,7 +116,7 @@ exports.coreToolRegistry = new Map([
|
|
|
83
116
|
{
|
|
84
117
|
name: "list_projects",
|
|
85
118
|
description: "List GitLab projects with flexible scoping. DEFAULT (no group_id): Lists YOUR accessible projects across GitLab (owned/member/starred). Use for: browsing your projects, finding your work, managing personal project lists. GROUP SCOPE (with group_id): Lists all projects within a specific group/organization. Use for: exploring team structure, finding organizational projects, auditing group resources. Parameters automatically validate based on scope.",
|
|
86
|
-
inputSchema:
|
|
119
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListProjectsSchema),
|
|
87
120
|
handler: async (args) => {
|
|
88
121
|
const options = schema_readonly_1.ListProjectsSchema.parse(args);
|
|
89
122
|
const { group_id, ...otherOptions } = options;
|
|
@@ -179,7 +212,7 @@ exports.coreToolRegistry = new Map([
|
|
|
179
212
|
{
|
|
180
213
|
name: "list_namespaces",
|
|
181
214
|
description: "BROWSE: List GitLab namespaces (groups and user namespaces) accessible to you. Use when: Discovering available groups for project creation, Browsing organizational structure, Finding where to create/fork projects. Returns both user and group namespaces. See also: get_namespace for specific namespace details.",
|
|
182
|
-
inputSchema:
|
|
215
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListNamespacesSchema),
|
|
183
216
|
handler: async (args) => {
|
|
184
217
|
const options = schema_readonly_1.ListNamespacesSchema.parse(args);
|
|
185
218
|
const queryParams = new URLSearchParams();
|
|
@@ -207,7 +240,7 @@ exports.coreToolRegistry = new Map([
|
|
|
207
240
|
{
|
|
208
241
|
name: "get_users",
|
|
209
242
|
description: 'FIND USERS: Search and retrieve GitLab users with intelligent pattern detection. RECOMMENDED: Use "search" parameter for most queries - automatically detects emails, usernames, or names with automatic transliteration and multi-phase fallback search. ADVANCED: Use "username" or "public_email" for exact matches when you need precise control. Supports filtering by active status, creation date, and user type (human/bot).',
|
|
210
|
-
inputSchema:
|
|
243
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetUsersSchema),
|
|
211
244
|
handler: async (args) => {
|
|
212
245
|
const options = schema_readonly_1.GetUsersSchema.parse(args);
|
|
213
246
|
const { smart_search, search, username, public_email, ...otherParams } = options;
|
|
@@ -252,7 +285,7 @@ exports.coreToolRegistry = new Map([
|
|
|
252
285
|
{
|
|
253
286
|
name: "get_project",
|
|
254
287
|
description: "GET DETAILS: Retrieve comprehensive project information including settings and metadata. Use when: Need complete project details, Checking project configuration, Getting project statistics. Accepts either project_id (numeric ID or URL-encoded path) or namespace (group/project format). See also: list_projects to find projects first.",
|
|
255
|
-
inputSchema:
|
|
288
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetProjectSchema),
|
|
256
289
|
handler: async (args) => {
|
|
257
290
|
const options = schema_readonly_1.GetProjectSchema.parse(args);
|
|
258
291
|
const { project_id, namespace } = options;
|
|
@@ -285,7 +318,7 @@ exports.coreToolRegistry = new Map([
|
|
|
285
318
|
{
|
|
286
319
|
name: "get_namespace",
|
|
287
320
|
description: "GET DETAILS: Retrieve comprehensive namespace information (group or user). Use when: Need complete namespace metadata, Checking namespace settings, Getting storage statistics. Requires namespace ID or URL-encoded path. See also: list_namespaces to browse all namespaces.",
|
|
288
|
-
inputSchema:
|
|
321
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetNamespaceSchema),
|
|
289
322
|
handler: async (args) => {
|
|
290
323
|
const options = schema_readonly_1.GetNamespaceSchema.parse(args);
|
|
291
324
|
const { namespace_id } = options;
|
|
@@ -308,7 +341,7 @@ exports.coreToolRegistry = new Map([
|
|
|
308
341
|
{
|
|
309
342
|
name: "verify_namespace",
|
|
310
343
|
description: "CHECK EXISTS: Verify if a namespace (group or user) exists and is accessible. ONLY works with namespaces - NOT project paths. Use when: Checking group/user namespace availability, Validating group references before creation, Testing namespace access permissions. For projects use get_project instead. Returns exists=true/false with namespace details if found.",
|
|
311
|
-
inputSchema:
|
|
344
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.VerifyNamespaceSchema),
|
|
312
345
|
handler: async (args) => {
|
|
313
346
|
const options = schema_readonly_1.VerifyNamespaceSchema.parse(args);
|
|
314
347
|
const { namespace } = options;
|
|
@@ -332,7 +365,7 @@ exports.coreToolRegistry = new Map([
|
|
|
332
365
|
{
|
|
333
366
|
name: "list_project_members",
|
|
334
367
|
description: "TEAM MEMBERS: List all members of a project with their access levels. Use when: Auditing project access, Finding collaborators, Checking user permissions. Shows access levels: 10=Guest, 20=Reporter, 30=Developer, 40=Maintainer, 50=Owner. Supports username filtering.",
|
|
335
|
-
inputSchema:
|
|
368
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListProjectMembersSchema),
|
|
336
369
|
handler: async (args) => {
|
|
337
370
|
const options = schema_readonly_1.ListProjectMembersSchema.parse(args);
|
|
338
371
|
const { project_id } = options;
|
|
@@ -361,7 +394,7 @@ exports.coreToolRegistry = new Map([
|
|
|
361
394
|
{
|
|
362
395
|
name: "list_commits",
|
|
363
396
|
description: "HISTORY: List repository commit history with filtering. Use when: Analyzing project history, Finding commits by author/date, Tracking file changes. Supports date ranges (since/until), author filter, and specific file paths. See also: get_commit for specific commit details.",
|
|
364
|
-
inputSchema:
|
|
397
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListCommitsSchema),
|
|
365
398
|
handler: async (args) => {
|
|
366
399
|
const options = schema_readonly_1.ListCommitsSchema.parse(args);
|
|
367
400
|
const { project_id } = options;
|
|
@@ -390,7 +423,7 @@ exports.coreToolRegistry = new Map([
|
|
|
390
423
|
{
|
|
391
424
|
name: "get_commit",
|
|
392
425
|
description: "COMMIT DETAILS: Get comprehensive information about a specific commit. Use when: Inspecting commit metadata, Reviewing change statistics, Getting commit message/author. Shows additions/deletions per file with stats=true. See also: get_commit_diff for actual code changes.",
|
|
393
|
-
inputSchema:
|
|
426
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetCommitSchema),
|
|
394
427
|
handler: async (args) => {
|
|
395
428
|
const options = schema_readonly_1.GetCommitSchema.parse(args);
|
|
396
429
|
const { project_id, commit_sha } = options;
|
|
@@ -419,7 +452,7 @@ exports.coreToolRegistry = new Map([
|
|
|
419
452
|
{
|
|
420
453
|
name: "get_commit_diff",
|
|
421
454
|
description: "COMMIT DIFF: Get actual code changes from a commit. Use when: Reviewing code modifications, Generating patches, Analyzing line-by-line changes. Returns unified diff format (git diff style). See also: get_commit for metadata without diff.",
|
|
422
|
-
inputSchema:
|
|
455
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetCommitDiffSchema),
|
|
423
456
|
handler: async (args) => {
|
|
424
457
|
const options = schema_readonly_1.GetCommitDiffSchema.parse(args);
|
|
425
458
|
const { project_id, commit_sha } = options;
|
|
@@ -448,7 +481,7 @@ exports.coreToolRegistry = new Map([
|
|
|
448
481
|
{
|
|
449
482
|
name: "list_group_iterations",
|
|
450
483
|
description: "SPRINTS: List iterations/sprints for agile planning (Premium feature). Use when: Viewing sprint schedules, Tracking iteration progress, Planning releases. Filter by state: current=active sprint, upcoming=future, closed=completed. Requires GitLab Premium or higher.",
|
|
451
|
-
inputSchema:
|
|
484
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListGroupIterationsSchema),
|
|
452
485
|
handler: async (args) => {
|
|
453
486
|
const options = schema_readonly_1.ListGroupIterationsSchema.parse(args);
|
|
454
487
|
const { group_id } = options;
|
|
@@ -477,7 +510,7 @@ exports.coreToolRegistry = new Map([
|
|
|
477
510
|
{
|
|
478
511
|
name: "download_attachment",
|
|
479
512
|
description: "DOWNLOAD: Retrieve uploaded file attachments from issues/MRs/wikis. Use when: Downloading images from issues, Getting attached documents, Retrieving uploaded files. Requires secret token and filename from the attachment URL (/uploads/[secret]/[filename]).",
|
|
480
|
-
inputSchema:
|
|
513
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.DownloadAttachmentSchema),
|
|
481
514
|
handler: async (args) => {
|
|
482
515
|
const options = schema_readonly_1.DownloadAttachmentSchema.parse(args);
|
|
483
516
|
const { project_id, secret, filename } = options;
|
|
@@ -504,7 +537,7 @@ exports.coreToolRegistry = new Map([
|
|
|
504
537
|
{
|
|
505
538
|
name: "list_events",
|
|
506
539
|
description: "USER ACTIVITY: List YOUR activity events across all projects. Use when: Tracking your contributions, Auditing your actions, Reviewing your history. Date format: YYYY-MM-DD only (not timestamps). Filters: action=created/updated/pushed, target_type=issue/merge_request.",
|
|
507
|
-
inputSchema:
|
|
540
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.ListEventsSchema),
|
|
508
541
|
handler: async (args) => {
|
|
509
542
|
const options = schema_readonly_1.ListEventsSchema.parse(args);
|
|
510
543
|
const queryParams = new URLSearchParams();
|
|
@@ -532,7 +565,7 @@ exports.coreToolRegistry = new Map([
|
|
|
532
565
|
{
|
|
533
566
|
name: "get_project_events",
|
|
534
567
|
description: "PROJECT ACTIVITY: List all events within a specific project. Use when: Monitoring project activity, Tracking team contributions, Auditing project changes. Date format: YYYY-MM-DD only (not timestamps). Shows: commits, issues, MRs, member changes.",
|
|
535
|
-
inputSchema:
|
|
568
|
+
inputSchema: z.toJSONSchema(schema_readonly_1.GetProjectEventsSchema),
|
|
536
569
|
handler: async (args) => {
|
|
537
570
|
const options = schema_readonly_1.GetProjectEventsSchema.parse(args);
|
|
538
571
|
const { project_id } = options;
|
|
@@ -561,7 +594,7 @@ exports.coreToolRegistry = new Map([
|
|
|
561
594
|
{
|
|
562
595
|
name: "create_repository",
|
|
563
596
|
description: "CREATE NEW: Initialize a new GitLab project/repository with automatic validation. Features: (1) Automatically checks if project already exists before creation, (2) Resolves namespace paths to IDs automatically, (3) Generates URL-safe project path from name, (4) Returns detailed validation information. Use when: Starting new projects, Setting up repository structure, Automating project creation. Creates in your namespace by default if no namespace specified.",
|
|
564
|
-
inputSchema:
|
|
597
|
+
inputSchema: z.toJSONSchema(schema_1.CreateRepositorySchema),
|
|
565
598
|
handler: async (args) => {
|
|
566
599
|
const options = schema_1.CreateRepositorySchema.parse(args);
|
|
567
600
|
const { namespace, name, ...otherOptions } = options;
|
|
@@ -649,7 +682,7 @@ exports.coreToolRegistry = new Map([
|
|
|
649
682
|
{
|
|
650
683
|
name: "fork_repository",
|
|
651
684
|
description: "FORK: Create your own copy of an existing project. Use when: Contributing to other projects, Creating experimental versions, Maintaining custom forks. Preserves fork relationship for MRs back to parent. Target namespace optional (defaults to your namespace).",
|
|
652
|
-
inputSchema:
|
|
685
|
+
inputSchema: z.toJSONSchema(schema_1.ForkRepositorySchema),
|
|
653
686
|
handler: async (args) => {
|
|
654
687
|
const options = schema_1.ForkRepositorySchema.parse(args);
|
|
655
688
|
const body = new URLSearchParams();
|
|
@@ -680,7 +713,7 @@ exports.coreToolRegistry = new Map([
|
|
|
680
713
|
{
|
|
681
714
|
name: "create_branch",
|
|
682
715
|
description: "NEW BRANCH: Create a Git branch from existing ref. Use when: Starting new features, Preparing bug fixes, Creating release branches. REQUIRED before creating MRs. Ref can be: branch name (main), tag (v1.0), or commit SHA. Branch names cannot contain spaces.",
|
|
683
|
-
inputSchema:
|
|
716
|
+
inputSchema: z.toJSONSchema(schema_1.CreateBranchSchema),
|
|
684
717
|
handler: async (args) => {
|
|
685
718
|
const options = schema_1.CreateBranchSchema.parse(args);
|
|
686
719
|
const body = new URLSearchParams();
|
|
@@ -708,7 +741,7 @@ exports.coreToolRegistry = new Map([
|
|
|
708
741
|
{
|
|
709
742
|
name: "create_group",
|
|
710
743
|
description: "CREATE GROUP: Create a new GitLab group/namespace for organizing projects and teams. Use when: Setting up team spaces, Creating organizational structure, Establishing project hierarchies. Groups can contain projects and subgroups.",
|
|
711
|
-
inputSchema:
|
|
744
|
+
inputSchema: z.toJSONSchema(schema_1.CreateGroupSchema),
|
|
712
745
|
handler: async (args) => {
|
|
713
746
|
const options = schema_1.CreateGroupSchema.parse(args);
|
|
714
747
|
const body = new URLSearchParams();
|