@dpesch/mantisbt-mcp-server 1.10.1 → 1.10.2

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
@@ -7,6 +7,20 @@ This project adheres to [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ---
9
9
 
10
+ ## [Unreleased]
11
+
12
+ ---
13
+
14
+ ## [1.10.2] – 2026-05-03
15
+
16
+ ### Changed
17
+ - Improved descriptions for `create_issue`, `add_monitor`, `add_note`, `delete_note`, `get_project_users`, and `get_project_versions`: response shapes, prerequisites, and cross-references to related tools (e.g. `find_project_member`, `get_issue_enums`) are now spelled out in each tool description — no behavioural change.
18
+
19
+ ### Fixed
20
+ - HTTP transport (`TRANSPORT=http`): concurrent requests (e.g. MCP Inspector sending `resources/list`, `resources/read`, and `tools/list` in parallel) caused `server.close()` to kill the transport of a still-running request, resulting in `ECONNRESET` on the client side. Fixed by serialising requests through a Promise-based queue — each request waits for the previous transport to be fully closed before connecting its own.
21
+
22
+ ---
23
+
10
24
  ## [1.10.1] – 2026-05-02
11
25
 
12
26
  ### Added
package/README.de.md CHANGED
@@ -119,7 +119,7 @@ npm run build
119
119
 
120
120
  | Tool | Beschreibung |
121
121
  |---|---|
122
- | `add_monitor` | Sich selbst als Beobachter eines Issues eintragen |
122
+ | `add_monitor` | Einen Benutzer als Beobachter eines Issues eintragen |
123
123
  | `remove_monitor` | Benutzer als Beobachter eines Issues austragen |
124
124
 
125
125
  ### Tags
package/README.md CHANGED
@@ -119,7 +119,7 @@ npm run build
119
119
 
120
120
  | Tool | Description |
121
121
  |---|---|
122
- | `add_monitor` | Add yourself as a monitor of an issue |
122
+ | `add_monitor` | Add a user as a monitor of an issue |
123
123
  | `remove_monitor` | Remove a user as a monitor of an issue |
124
124
 
125
125
  ### Tags
package/dist/index.js CHANGED
@@ -88,6 +88,12 @@ async function runHttp() {
88
88
  const startupConfig = await getStartupConfig();
89
89
  const server = await createMcpServer();
90
90
  const port = startupConfig.httpPort;
91
+ // Serialize stateless requests: each request waits for the previous transport
92
+ // to be fully closed before connecting a new one. Without this, concurrent
93
+ // requests (e.g. from MCP Inspector sending resources/list + resources/read +
94
+ // tools/list in parallel) would cause server.close() to kill the transport of
95
+ // a still-running request, leaving those responses never sent.
96
+ let requestQueue = Promise.resolve();
91
97
  const httpServer = createServer(async (req, res) => {
92
98
  if (req.method === 'POST' && req.url === '/mcp') {
93
99
  if (startupConfig.httpToken) {
@@ -100,28 +106,32 @@ async function runHttp() {
100
106
  }
101
107
  const chunks = [];
102
108
  req.on('data', (chunk) => chunks.push(chunk));
103
- req.on('end', async () => {
104
- try {
105
- const body = JSON.parse(Buffer.concat(chunks).toString('utf8'));
106
- const transport = new StreamableHTTPServerTransport({
107
- sessionIdGenerator: undefined,
108
- enableJsonResponse: true,
109
- });
110
- res.on('close', () => { void transport.close(); });
111
- // Disconnect from any previous transport before connecting the new one.
112
- // The res.on('close') handler above closes the transport asynchronously,
113
- // but the next request may arrive before it fires — causing connect() to
114
- // throw "Already connected". Explicitly closing first avoids that race.
115
- await server.close();
116
- await server.connect(transport);
117
- await transport.handleRequest(req, res, body);
118
- }
119
- catch {
120
- if (!res.headersSent) {
121
- res.writeHead(400, { 'Content-Type': 'application/json' });
122
- res.end(JSON.stringify({ error: 'Bad Request' }));
109
+ req.on('end', () => {
110
+ const prev = requestQueue;
111
+ let releaseLock;
112
+ requestQueue = new Promise(resolve => { releaseLock = resolve; });
113
+ void prev.then(async () => {
114
+ try {
115
+ const body = JSON.parse(Buffer.concat(chunks).toString('utf8'));
116
+ const transport = new StreamableHTTPServerTransport({
117
+ sessionIdGenerator: undefined,
118
+ enableJsonResponse: true,
119
+ });
120
+ await server.connect(transport);
121
+ await transport.handleRequest(req, res, body);
123
122
  }
124
- }
123
+ catch (err) {
124
+ console.error('[HTTP handler error]', err instanceof Error ? err.stack : err);
125
+ if (!res.headersSent) {
126
+ res.writeHead(400, { 'Content-Type': 'application/json' });
127
+ res.end(JSON.stringify({ error: 'Bad Request' }));
128
+ }
129
+ }
130
+ finally {
131
+ await server.close();
132
+ releaseLock();
133
+ }
134
+ });
125
135
  });
126
136
  }
127
137
  else if (req.method === 'GET' && req.url === '/health') {
@@ -250,23 +250,34 @@ export function registerIssueTools(server, client, cache) {
250
250
  // ---------------------------------------------------------------------------
251
251
  server.registerTool('create_issue', {
252
252
  title: 'Create Issue',
253
- description: 'Create a new MantisBT issue. Returns the created issue including its assigned ID.',
253
+ description: `Create a new MantisBT issue. Returns the full created issue object including the assigned id, summary, status, priority, severity, category, reporter, created_at, and view_url.
254
+
255
+ Required fields: summary, description, project_id, category. All other fields are optional with sensible defaults (priority: "normal", severity: "minor").
256
+
257
+ Recommended workflow:
258
+ 1. Call get_project_categories to obtain a valid category name
259
+ 2. Optionally call get_project_versions to obtain version names
260
+ 3. Optionally call find_project_member to resolve the assignee's username
261
+
262
+ Both priority and severity accept canonical English names or localized labels from the connected MantisBT instance — call get_issue_enums to see all available values.
263
+
264
+ For the handler, prefer the username field (resolved server-side) over handler_id when working interactively.`,
254
265
  inputSchema: z.object({
255
- summary: z.string().min(1).describe('Issue summary/title'),
256
- description: z.string().min(1).describe('Detailed issue description. Required — do not create issues without a description. Plain text or Markdown.'),
257
- project_id: z.coerce.number().int().positive().describe('Project ID the issue belongs to'),
258
- category: z.string().min(1).describe('Category name (use get_project_categories to list available categories)'),
259
- priority: z.string().default('normal').describe('Priority: canonical English name (none, low, normal, high, urgent, immediate) or localized label. Default: "normal". Use get_issue_enums to see all available values.'),
260
- severity: z.string().default('minor').describe('Severity: canonical English name (feature, trivial, text, tweak, minor, major, crash, block) or localized label. Default: "minor". Use get_issue_enums to see all available values.'),
261
- handler_id: z.coerce.number().int().positive().optional().describe('User ID of the person to assign the issue to'),
262
- handler: z.string().optional().describe('Username (login name) of the person to assign the issue to. Alternative to handler_id — the server resolves the name to a user ID from the project members. Use get_project_users to see available users.'),
263
- version: z.string().optional().describe('Affected product version name (use get_project_versions to list available versions)'),
264
- target_version: z.string().optional().describe('Target version name — version in which the issue is planned to be fixed (use get_project_versions to list available versions)'),
265
- fixed_in_version: z.string().optional().describe('Version name in which the issue was fixed (use get_project_versions to list available versions)'),
266
- steps_to_reproduce: z.string().optional().describe('Steps to reproduce the issue. Plain text or Markdown.'),
267
- additional_information: z.string().optional().describe('Additional information about the issue. Plain text or Markdown.'),
268
- reproducibility: z.string().optional().describe('Reproducibility: canonical English name or localized label (always, sometimes, random, have not tried, unable to reproduce, N/A). Use get_issue_enums to see all available values.'),
269
- view_state: z.enum(['public', 'private']).optional().describe('Visibility of the issue: "public" (default) or "private"'),
266
+ summary: z.string().min(1).describe('Issue summary/title (required)'),
267
+ description: z.string().min(1).describe('Detailed issue description (required). Do not create issues without a description. Plain text or Markdown.'),
268
+ project_id: z.coerce.number().int().positive().describe('Project ID the issue belongs to — use list_projects to discover project IDs'),
269
+ category: z.string().min(1).describe('Category name (required). Use get_project_categories to list available categories for the project.'),
270
+ priority: z.string().default('normal').describe('Priority level. Canonical English names: none, low, normal, high, urgent, immediate. Default: "normal". Use get_issue_enums to see localized labels.'),
271
+ severity: z.string().default('minor').describe('Severity level. Canonical English names: feature, trivial, text, tweak, minor, major, crash, block. Default: "minor". Use get_issue_enums to see localized labels.'),
272
+ handler_id: z.coerce.number().int().positive().optional().describe('Numeric user ID of the assignee. Alternative to the handler field — use one or the other, not both.'),
273
+ handler: z.string().optional().describe('MantisBT login name of the assignee. The server resolves the name to a user ID from the project member list. Use find_project_member or get_project_users to look up valid login names.'),
274
+ version: z.string().optional().describe('Affected product version name. Use get_project_versions to list available version names for the project.'),
275
+ target_version: z.string().optional().describe('Target fix version — version in which the issue is planned to be resolved. Use get_project_versions to list available version names.'),
276
+ fixed_in_version: z.string().optional().describe('Version in which the issue was fixed. Use get_project_versions to list available version names.'),
277
+ steps_to_reproduce: z.string().optional().describe('Step-by-step instructions to reproduce the issue. Plain text or Markdown.'),
278
+ additional_information: z.string().optional().describe('Additional context or notes about the issue. Plain text or Markdown.'),
279
+ reproducibility: z.string().optional().describe('How reliably the issue reproduces. Canonical English names: always, sometimes, random, have not tried, unable to reproduce, N/A. Use get_issue_enums to see localized labels.'),
280
+ view_state: z.enum(['public', 'private']).optional().describe('Visibility of the issue: "public" (visible to all, default) or "private" (restricted to higher-access users).'),
270
281
  }),
271
282
  annotations: {
272
283
  readOnlyHint: false,
@@ -12,10 +12,16 @@ export function registerMonitorTools(server, client) {
12
12
  // ---------------------------------------------------------------------------
13
13
  server.registerTool('add_monitor', {
14
14
  title: 'Add Issue Monitor',
15
- description: 'Add a user as a monitor (watcher) of a MantisBT issue. Monitors receive email notifications for issue updates.',
15
+ description: `Add a user as a monitor (watcher) of a MantisBT issue. Monitors receive email notifications whenever the issue is updated. Returns a success confirmation object.
16
+
17
+ Use add_monitor to subscribe team members to issue updates without assigning them as the handler. To unsubscribe a user, call remove_monitor with the same parameters.
18
+
19
+ Adding a user who is already a monitor is a no-op — the operation succeeds without creating duplicates.
20
+
21
+ Prerequisites: obtain issue_id from list_issues or get_issue; use find_project_member or get_project_users to look up valid MantisBT login names.`,
16
22
  inputSchema: z.object({
17
- issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
18
- username: z.string().min(1).describe('Username of the user to add as monitor'),
23
+ issue_id: z.coerce.number().int().positive().describe('Numeric issue ID — use list_issues or get_issue to obtain issue IDs'),
24
+ username: z.string().min(1).describe('MantisBT login name (not the display name) of the user to add as monitor. Use find_project_member or get_project_users to discover valid login names for a project.'),
19
25
  }),
20
26
  annotations: {
21
27
  readOnlyHint: false,
@@ -46,11 +46,17 @@ export function registerNoteTools(server, client) {
46
46
  // ---------------------------------------------------------------------------
47
47
  server.registerTool('add_note', {
48
48
  title: 'Add Note to Issue',
49
- description: 'Add a note (comment) to an existing MantisBT issue. Full UTF-8 text is supported.',
49
+ description: `Add a note (comment) to an existing MantisBT issue. Returns the created note object including id, created_at, reporter, text, view_state, and a view_url linking directly to the note in the MantisBT web UI.
50
+
51
+ Full UTF-8 text is supported. Markdown syntax is stored as-is — rendering depends on the MantisBT instance's configured text renderer.
52
+
53
+ Use view_state="private" to restrict the note to users with reporter-level access or higher; public notes are visible to all users who can view the issue.
54
+
55
+ Prerequisites: obtain issue_id from list_issues, get_issue, or search_issues.`,
50
56
  inputSchema: z.object({
51
- issue_id: z.coerce.number().int().positive().describe('Numeric issue ID'),
52
- text: z.string().min(1).describe('Note text (supports full UTF-8, markdown will be stored as-is)'),
53
- view_state: z.enum(['public', 'private']).default('public').describe('Visibility of the note (default: public)'),
57
+ issue_id: z.coerce.number().int().positive().describe('Numeric issue ID — use list_issues or get_issue to obtain issue IDs'),
58
+ text: z.string().min(1).describe('Note text (minimum 1 character). Full UTF-8 including emoji is supported. Markdown is stored as-is.'),
59
+ view_state: z.enum(['public', 'private']).default('public').describe('Visibility of the note: "public" (visible to all, default) or "private" (visible only to users with sufficient access level).'),
54
60
  }),
55
61
  annotations: {
56
62
  readOnlyHint: false,
@@ -82,10 +88,14 @@ export function registerNoteTools(server, client) {
82
88
  // ---------------------------------------------------------------------------
83
89
  server.registerTool('delete_note', {
84
90
  title: 'Delete Note',
85
- description: 'Permanently delete a note from a MantisBT issue. This action is irreversible.',
91
+ description: `Permanently delete a note from a MantisBT issue. This action is irreversible — deleted notes cannot be recovered.
92
+
93
+ Returns a plain-text confirmation message on success. Returns an error if the note does not exist or the current user lacks permission to delete it (MantisBT enforces access control: users can typically only delete their own notes unless they have manager-level access or higher).
94
+
95
+ Prerequisites: obtain note_id from list_notes or from get_issue (notes[].id); obtain issue_id from the same source.`,
86
96
  inputSchema: z.object({
87
- issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note'),
88
- note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete'),
97
+ issue_id: z.coerce.number().int().positive().describe('Numeric issue ID that owns the note — use get_issue or list_notes to identify this value'),
98
+ note_id: z.coerce.number().int().positive().describe('Numeric note ID to delete — obtain from get_issue (notes[].id) or list_notes'),
89
99
  }),
90
100
  annotations: {
91
101
  readOnlyHint: false,
@@ -40,10 +40,16 @@ export function registerProjectTools(server, client, cache) {
40
40
  // ---------------------------------------------------------------------------
41
41
  server.registerTool('get_project_users', {
42
42
  title: 'Get Project Users',
43
- description: 'List all users with access to a specific MantisBT project.',
43
+ description: `List all users with access to a specific MantisBT project. Returns an array of user objects, each containing id, name (login name), real_name, email, and access_level fields.
44
+
45
+ Use get_project_users when you need the complete user list for a project — for example, to verify who has access or to build a handler list. For name-based lookup of a single user, prefer find_project_member which supports case-insensitive substring search and is significantly faster on large projects.
46
+
47
+ Access level IDs: 10=viewer, 25=reporter, 40=updater, 55=developer, 70=manager, 90=administrator.
48
+
49
+ Prerequisites: obtain project_id from list_projects.`,
44
50
  inputSchema: z.object({
45
- project_id: z.coerce.number().int().positive().describe('Numeric project ID'),
46
- access_level: z.coerce.number().int().optional().describe('Minimum access level filter (e.g. 55 = developer, 90 = manager)'),
51
+ project_id: z.coerce.number().int().positive().describe('Numeric project ID — use list_projects to discover project IDs'),
52
+ access_level: z.coerce.number().int().optional().describe('Return only users at or above this access level. Common values: 10=viewer, 25=reporter, 40=updater, 55=developer, 70=manager, 90=administrator. Omit to return all users.'),
47
53
  }),
48
54
  annotations: {
49
55
  readOnlyHint: true,
@@ -70,11 +76,17 @@ export function registerProjectTools(server, client, cache) {
70
76
  // ---------------------------------------------------------------------------
71
77
  server.registerTool('get_project_versions', {
72
78
  title: 'Get Project Versions',
73
- description: 'List all versions defined for a MantisBT project.',
79
+ description: `List all versions defined for a MantisBT project. Returns an array of version objects, each containing id, name, released (boolean), obsolete (boolean), and optionally a date field.
80
+
81
+ Use the returned version names directly when creating or updating issues via create_issue and update_issue (version, target_version, fixed_in_version fields).
82
+
83
+ By default, obsolete and inherited parent-project versions are excluded. Set obsolete=true to include deprecated versions; set inherit=true to also return versions from parent projects.
84
+
85
+ Prerequisites: obtain project_id from list_projects.`,
74
86
  inputSchema: z.object({
75
- project_id: z.coerce.number().int().positive().describe('Numeric project ID'),
76
- obsolete: z.preprocess(coerceBool, z.boolean()).default(false).describe('Include obsolete (deprecated) versions (default: false)'),
77
- inherit: z.preprocess(coerceBool, z.boolean()).default(false).describe('Include versions inherited from parent projects (default: false)'),
87
+ project_id: z.coerce.number().int().positive().describe('Numeric project ID — use list_projects to discover project IDs'),
88
+ obsolete: z.preprocess(coerceBool, z.boolean()).default(false).describe('Include obsolete (deprecated) versions in the response. Default: false. Set to true to see all versions including those no longer actively used.'),
89
+ inherit: z.preprocess(coerceBool, z.boolean()).default(false).describe('Include versions inherited from parent projects. Default: false. Set to true for sub-projects that share versions with a parent project.'),
78
90
  }),
79
91
  annotations: {
80
92
  readOnlyHint: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpesch/mantisbt-mcp-server",
3
- "version": "1.10.1",
3
+ "version": "1.10.2",
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",
@@ -14,7 +14,18 @@
14
14
  "url": "https://github.com/dpesch/mantisbt-mcp-server",
15
15
  "_note": "GitHub mirror for ecosystem compatibility only — canonical source: https://codeberg.org/dpesch/mantisbt-mcp-server"
16
16
  },
17
- "keywords": ["mcp", "mcp-server", "mantisbt", "bugtracker", "mantis", "issue-tracker", "bug-tracker", "model-context-protocol", "claude", "claude-code"],
17
+ "keywords": [
18
+ "mcp",
19
+ "mcp-server",
20
+ "mantisbt",
21
+ "bugtracker",
22
+ "mantis",
23
+ "issue-tracker",
24
+ "bug-tracker",
25
+ "model-context-protocol",
26
+ "claude",
27
+ "claude-code"
28
+ ],
18
29
  "main": "dist/index.js",
19
30
  "bin": {
20
31
  "mantisbt-mcp-server": "dist/index.js"
@@ -35,14 +46,14 @@
35
46
  "dependencies": {
36
47
  "@huggingface/transformers": "^3.0.0",
37
48
  "@modelcontextprotocol/sdk": "^1.0.0",
38
- "zod": "^3.22.4"
49
+ "zod": "^3.22.4"
39
50
  },
40
51
  "devDependencies": {
41
52
  "@types/node": "^20.0.0",
42
- "@vitest/coverage-v8": "^2.0.0",
53
+ "@vitest/coverage-v8": "^4.1.5",
43
54
  "tsx": "^4.0.0",
44
55
  "typescript": "^5.3.0",
45
- "vitest": "^2.0.0"
56
+ "vitest": "^4.1.5"
46
57
  },
47
58
  "engines": {
48
59
  "node": ">=18"
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.10.1",
6
+ "version": "1.10.2",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "@dpesch/mantisbt-mcp-server",
11
- "version": "1.10.1",
11
+ "version": "1.10.2",
12
12
  "runtimeHint": "npx",
13
13
  "transport": {
14
14
  "type": "stdio"