fmea-api-mcp-server 1.1.49 → 1.1.50

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/dist/index.js CHANGED
@@ -28,7 +28,7 @@ class ApiDocsServer {
28
28
  constructor() {
29
29
  this.server = new Server({
30
30
  name: "api-docs-mcp",
31
- version: "1.1.49",
31
+ version: "1.1.50",
32
32
  }, {
33
33
  capabilities: {
34
34
  resources: {},
@@ -190,6 +190,24 @@ class ApiDocsServer {
190
190
  required: ["path"],
191
191
  },
192
192
  },
193
+ {
194
+ name: "get_changes",
195
+ description: "Get API endpoint changelog. Shows what endpoints/parameters were added, removed, or modified across versions.",
196
+ inputSchema: {
197
+ type: "object",
198
+ properties: {
199
+ since_version: {
200
+ type: "string",
201
+ description: "Return all changes from this version onwards (e.g. '1.1.40'). Omit to get the latest version only.",
202
+ },
203
+ version: {
204
+ type: "string",
205
+ description: "Return changes for this exact version only (e.g. '1.1.49').",
206
+ },
207
+ },
208
+ required: [],
209
+ },
210
+ },
193
211
  ],
194
212
  };
195
213
  });
@@ -296,6 +314,46 @@ class ApiDocsServer {
296
314
  ],
297
315
  };
298
316
  }
317
+ if (request.params.name === "get_changes") {
318
+ const changelogPath = path.join(DATA_DIR, "changelog.json");
319
+ try {
320
+ const raw = await fs.readFile(changelogPath, "utf-8");
321
+ const changelog = JSON.parse(raw);
322
+ const sinceVersion = request.params.arguments?.since_version
323
+ ? String(request.params.arguments.since_version) : undefined;
324
+ const exactVersion = request.params.arguments?.version
325
+ ? String(request.params.arguments.version) : undefined;
326
+ const parseVer = (v) => v.split(".").map(Number);
327
+ const cmpVer = (a, b) => {
328
+ for (let i = 0; i < 3; i++) {
329
+ if ((a[i] || 0) !== (b[i] || 0))
330
+ return (a[i] || 0) - (b[i] || 0);
331
+ }
332
+ return 0;
333
+ };
334
+ let result;
335
+ if (exactVersion) {
336
+ result = changelog[exactVersion] ? { [exactVersion]: changelog[exactVersion] } : {};
337
+ }
338
+ else if (sinceVersion) {
339
+ const sinceArr = parseVer(sinceVersion);
340
+ result = Object.fromEntries(Object.entries(changelog).filter(([v]) => cmpVer(parseVer(v), sinceArr) >= 0));
341
+ }
342
+ else {
343
+ // Latest version only
344
+ const versions = Object.keys(changelog).sort((a, b) => cmpVer(parseVer(b), parseVer(a)));
345
+ result = versions.length > 0 ? { [versions[0]]: changelog[versions[0]] } : {};
346
+ }
347
+ return {
348
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
349
+ };
350
+ }
351
+ catch (_error) {
352
+ return {
353
+ content: [{ type: "text", text: JSON.stringify({ message: "No changelog available yet." }) }],
354
+ };
355
+ }
356
+ }
299
357
  throw new McpError(ErrorCode.MethodNotFound, "Tool not found");
300
358
  });
301
359
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmea-api-mcp-server",
3
- "version": "1.1.49",
3
+ "version": "1.1.50",
4
4
  "description": "MCP server for serving API documentation from endpoints directory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",