@shodh/memory-mcp 0.1.74 → 0.1.75

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.
Files changed (2) hide show
  1. package/dist/index.js +21 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -16561,10 +16561,29 @@ async function ensureServerRunning() {
16561
16561
  console.error("[shodh-memory] Warning: Server may not have started properly");
16562
16562
  }
16563
16563
  }
16564
- process.on("exit", () => {
16564
+ function cleanupServer() {
16565
16565
  if (serverProcess && !serverProcess.killed) {
16566
- serverProcess.kill();
16566
+ if (process.platform !== "win32" && serverProcess.pid) {
16567
+ try {
16568
+ process.kill(-serverProcess.pid, "SIGTERM");
16569
+ } catch {
16570
+ serverProcess.kill("SIGTERM");
16571
+ }
16572
+ } else {
16573
+ serverProcess.kill();
16574
+ }
16567
16575
  }
16576
+ }
16577
+ process.on("exit", cleanupServer);
16578
+ process.on("SIGINT", () => {
16579
+ console.error("[shodh-memory] Received SIGINT, shutting down...");
16580
+ cleanupServer();
16581
+ process.exit(0);
16582
+ });
16583
+ process.on("SIGTERM", () => {
16584
+ console.error("[shodh-memory] Received SIGTERM, shutting down...");
16585
+ cleanupServer();
16586
+ process.exit(0);
16568
16587
  });
16569
16588
  async function main() {
16570
16589
  await ensureServerRunning();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shodh/memory-mcp",
3
- "version": "0.1.74",
3
+ "version": "0.1.75",
4
4
  "mcpName": "io.github.varun29ankuS/shodh-memory",
5
5
  "description": "MCP server for persistent AI memory - store and recall context across sessions",
6
6
  "type": "module",