@dpesch/mantisbt-mcp-server 1.8.2 → 1.8.3

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/CHANGELOG.md CHANGED
@@ -11,6 +11,16 @@ This project adheres to [Semantic Versioning](https://semver.org/).
11
11
 
12
12
  ---
13
13
 
14
+ ## [1.8.3] – 2026-03-28
15
+
16
+ ### Added
17
+ - New optional env var `MCP_TEST_ENVIRONMENT=true`. When set, `resources/list` skips live API calls and returns only static resources. Intended for automated inspection environments (e.g. Glama Docker builds) that start the server with placeholder credentials and restricted network access.
18
+
19
+ ### Fixed
20
+ - All `MantisClient` fetch calls now use a 30-second timeout via `AbortSignal.timeout()`. Previously, a slow or unreachable MantisBT instance would cause fetch calls to hang indefinitely.
21
+
22
+ ---
23
+
14
24
  ## [1.8.2] – 2026-03-27
15
25
 
16
26
  ### Fixed
package/dist/client.js CHANGED
@@ -96,10 +96,12 @@ export class MantisClient {
96
96
  // ---------------------------------------------------------------------------
97
97
  // Public API methods
98
98
  // ---------------------------------------------------------------------------
99
+ static TIMEOUT_MS = 30_000;
99
100
  async get(path, params) {
100
101
  const response = await fetch(await this.buildUrl(path, params), {
101
102
  method: 'GET',
102
103
  headers: await this.headers(),
104
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
103
105
  });
104
106
  return this.handleResponse(response);
105
107
  }
@@ -108,6 +110,7 @@ export class MantisClient {
108
110
  method: 'POST',
109
111
  headers: await this.headers(),
110
112
  body: JSON.stringify(body),
113
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
111
114
  });
112
115
  return this.handleResponse(response);
113
116
  }
@@ -116,6 +119,7 @@ export class MantisClient {
116
119
  method: 'PATCH',
117
120
  headers: await this.headers(),
118
121
  body: JSON.stringify(body),
122
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
119
123
  });
120
124
  return this.handleResponse(response);
121
125
  }
@@ -123,6 +127,7 @@ export class MantisClient {
123
127
  const response = await fetch(await this.buildUrl(path), {
124
128
  method: 'DELETE',
125
129
  headers: await this.headers(),
130
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
126
131
  });
127
132
  return this.handleResponse(response);
128
133
  }
@@ -137,6 +142,7 @@ export class MantisClient {
137
142
  'Accept': 'application/json',
138
143
  },
139
144
  body: formData,
145
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
140
146
  });
141
147
  return this.handleResponse(response);
142
148
  }
@@ -144,6 +150,7 @@ export class MantisClient {
144
150
  const response = await fetch(await this.buildUrl('users/me'), {
145
151
  method: 'GET',
146
152
  headers: await this.headers(),
153
+ signal: AbortSignal.timeout(MantisClient.TIMEOUT_MS),
147
154
  });
148
155
  if (!response.ok) {
149
156
  throw new MantisApiError(response.status, response.statusText);
package/dist/config.js CHANGED
@@ -54,6 +54,7 @@ function readNonCredentialConfig() {
54
54
  modelName: searchModelName,
55
55
  numThreads: searchNumThreads,
56
56
  },
57
+ testEnvironment: process.env.MCP_TEST_ENVIRONMENT === 'true',
57
58
  };
58
59
  }
59
60
  /**
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ async function createMcpServer() {
63
63
  registerTagTools(server, client);
64
64
  registerVersionTools(server, client, versionHint, version);
65
65
  registerPrompts(server);
66
- registerResources(server, client, cache);
66
+ registerResources(server, client, cache, startupConfig.testEnvironment);
67
67
  // Optional: Semantic search module
68
68
  if (startupConfig.search.enabled) {
69
69
  const { initializeSearchModule } = await import('./search/index.js');
@@ -7,7 +7,7 @@ function jsonResource(uri, data) {
7
7
  contents: [{ uri: uri.href, mimeType: 'application/json', text: JSON.stringify(data) }],
8
8
  };
9
9
  }
10
- export function registerResources(server, client, cache) {
10
+ export function registerResources(server, client, cache, testEnvironment = false) {
11
11
  async function loadProjects() {
12
12
  const cached = await cache.loadIfValid();
13
13
  return cached?.projects
@@ -25,12 +25,19 @@ export function registerResources(server, client, cache) {
25
25
  mimeType: 'application/json',
26
26
  }, async (uri) => jsonResource(uri, await loadProjects()));
27
27
  server.registerResource('project-detail', new ResourceTemplate('mantis://projects/{id}', {
28
- list: async () => ({
29
- resources: (await loadProjects()).map((p) => ({
30
- uri: `mantis://projects/${p.id}`,
31
- name: p.name,
32
- })),
33
- }),
28
+ list: async () => {
29
+ // In test environments (MCP_TEST_ENVIRONMENT=true, e.g. Glama inspection
30
+ // with placeholder credentials) skip the live API call and return an
31
+ // empty list so resources/list responds immediately without timing out.
32
+ if (testEnvironment)
33
+ return { resources: [] };
34
+ return {
35
+ resources: (await loadProjects()).map((p) => ({
36
+ uri: `mantis://projects/${p.id}`,
37
+ name: p.name,
38
+ })),
39
+ };
40
+ },
34
41
  }), {
35
42
  title: 'Project Detail',
36
43
  description: 'Combined project view: fields (status, view_state, access_level, description) plus all associated users, versions, and categories. Served from local cache when fresh; falls back to live API fetch. Refresh via the sync_metadata tool.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpesch/mantisbt-mcp-server",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "mcpName": "io.github.dpesch/mantisbt-mcp-server",
5
5
  "description": "MCP server for MantisBT REST API – read and manage bug tracker issues",
6
6
  "author": "Dominik Pesch",
package/server.json CHANGED
@@ -3,12 +3,12 @@
3
3
  "name": "io.github.dpesch/mantisbt-mcp-server",
4
4
  "title": "MantisBT MCP Server",
5
5
  "description": "MantisBT MCP server – manage issues, notes, files, tags, and relationships. With semantic search.",
6
- "version": "1.8.2",
6
+ "version": "1.8.3",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "@dpesch/mantisbt-mcp-server",
11
- "version": "1.8.2",
11
+ "version": "1.8.3",
12
12
  "runtimeHint": "npx",
13
13
  "transport": {
14
14
  "type": "stdio"