@zereight/mcp-gitlab 2.1.23 → 2.1.25

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](./README.md) | [한국어](./README.ko.md) | [简体中文](./README.zh-CN.md)
4
4
 
5
- 📖 **[Read the full documentation →](https://zereight.github.io/gitlab-mcp/)**
5
+ 📖 **[Documentation →](https://zereight.github.io/gitlab-mcp/)** Setup guides, environment variables, and the full tool reference live on the hosted docs site.
6
6
 
7
7
  > **New Feature**: Dynamic GitLab API URL support with connection pooling! See [Dynamic API URL Documentation](docs/configuration/dynamic-api-url.md) for details.
8
8
 
package/build/index.js CHANGED
@@ -5737,8 +5737,18 @@ async function getCurrentUser() {
5737
5737
  async function myIssues(options = {}) {
5738
5738
  // Get current user to find their username
5739
5739
  const currentUser = await getCurrentUser();
5740
- // Use getEffectiveProjectId to handle project ID resolution
5741
- const effectiveProjectId = getEffectiveProjectId(options.project_id || "");
5740
+ let effectiveProjectId;
5741
+ try {
5742
+ effectiveProjectId = getEffectiveProjectId(options.project_id || "");
5743
+ }
5744
+ catch (err) {
5745
+ if (err instanceof Error && err.message.includes("No project ID provided and GITLAB_PROJECT_ID is not set")) {
5746
+ effectiveProjectId = "";
5747
+ }
5748
+ else {
5749
+ throw err;
5750
+ }
5751
+ }
5742
5752
  // Use listIssues with assignee_username filter
5743
5753
  let listIssuesOptions = {
5744
5754
  state: options.state || "opened", // Default to "opened" if not specified
@@ -7000,6 +7010,8 @@ async function handleToolCall(params) {
7000
7010
  case "verify_namespace": {
7001
7011
  const args = VerifyNamespaceSchema.parse(params.arguments);
7002
7012
  const url = new URL(`${GITLAB_API_URL}/namespaces/${encodeURIComponent(args.path)}/exists`);
7013
+ if (args.parent_id !== undefined)
7014
+ url.searchParams.set("parent_id", String(args.parent_id));
7003
7015
  const response = await fetch(url.toString(), {
7004
7016
  ...getFetchConfig(),
7005
7017
  });
package/build/schemas.js CHANGED
@@ -2047,6 +2047,7 @@ export const GetNamespaceSchema = z.object({
2047
2047
  });
2048
2048
  export const VerifyNamespaceSchema = z.object({
2049
2049
  path: z.string().describe("Namespace path to verify"),
2050
+ parent_id: z.preprocess(val => (val === "" ? undefined : val), z.number().int().optional()).describe("Parent namespace ID; required to correctly resolve paths in nested namespaces where the same path may exist under different parents"),
2050
2051
  });
2051
2052
  // Project API operation schemas
2052
2053
  export const GetProjectSchema = z.object({
@@ -2611,7 +2612,7 @@ export const MyIssuesSchema = z.object({
2611
2612
  project_id: z
2612
2613
  .string()
2613
2614
  .optional()
2614
- .describe("Project ID or URL-encoded path (optional when GITLAB_PROJECT_ID is set)"),
2615
+ .describe("Project ID or URL-encoded path (optional to search across all accessible projects)"),
2615
2616
  state: z
2616
2617
  .enum(["opened", "closed", "all"])
2617
2618
  .optional()
@@ -426,7 +426,7 @@ export const allTools = [
426
426
  },
427
427
  {
428
428
  name: "verify_namespace",
429
- description: "Verify if a namespace path exists",
429
+ description: "Verify if a namespace path exists. Use parent_id to scope the check to a specific parent namespace — required for nested namespaces where the same path may exist under different parents.",
430
430
  inputSchema: toJSONSchema(VerifyNamespaceSchema),
431
431
  },
432
432
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "2.1.23",
3
+ "version": "2.1.25",
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": [
@@ -55,12 +55,14 @@
55
55
  "test:stateless": "npm run build && node --import tsx/esm --test test/stateless/codec.test.ts test/stateless/client-id.test.ts test/stateless/callback-proxy.test.ts test/stateless/session-id.test.ts test/stateless/session-id-integration.test.ts test/stateless/config-ttl.test.ts",
56
56
  "test:mcp-oauth": "npm run build && node --import tsx/esm --test test/mcp-oauth-tests.ts",
57
57
  "test:live": "node test/validate-api.js",
58
+ "test:consumer-smoke": "bash scripts/consumer-install-smoke.sh",
58
59
  "test:remote-auth": "npm run build && node --import tsx/esm --test test/remote-auth-simple-test.ts",
59
60
  "test:schema": "tsx test/schema-tests.ts && tsx test/test-json-schema.ts",
60
61
  "test:oauth": "tsx test/oauth-tests.ts",
61
62
  "test:list-merge-requests": "npm run build && tsx test/test-list-merge-requests.ts",
62
63
  "test:approvals": "npm run build && tsx test/test-merge-request-approvals.ts",
63
64
  "lint": "eslint . --ext .ts",
65
+ "check:runtime-deps": "node scripts/check-runtime-deps.mjs",
64
66
  "lint:fix": "eslint . --ext .ts --fix",
65
67
  "release": "bash scripts/release.sh",
66
68
  "release:mcp-registry": "bash scripts/publish_mcp_registry.sh",
@@ -72,6 +74,7 @@
72
74
  "@types/node-fetch": "^2.6.12",
73
75
  "diff": "^9.0.0",
74
76
  "express": "^5.1.0",
77
+ "express-rate-limit": "^8.5.2",
75
78
  "fetch-cookie": "^3.1.0",
76
79
  "form-data": "^4.0.0",
77
80
  "http-proxy-agent": "^7.0.2",