mcp-ssh-manager 3.6.0 → 3.6.1
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 +9 -0
- package/README.md +9 -13
- package/package.json +1 -1
- package/src/session-manager.js +5 -2
- package/src/tunnel-manager.js +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,15 @@ All notable changes to MCP SSH Manager will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.6.1] - 2026-06-09
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Module-level monitor/cleanup intervals pinned the Node event loop** (follow-up to [#41](https://github.com/bvisible/mcp-ssh-manager/pull/41))
|
|
13
|
+
- `tunnel-manager.js` (`monitorTunnels`, every 30 s) and `session-manager.js` (inactive-session cleanup, every 5 min) registered module-level `setInterval` timers that were never `unref()`'d, so importing either module kept the event loop alive on its own.
|
|
14
|
+
- Both are now `unref()`'d, matching the keepalive and cleanup timers fixed in #41. The forced-exit added in #41 already made these harmless for the orphan-process bug; this restores proper teardown hygiene so process lifetime tracks the stdio transport, not a background timer.
|
|
15
|
+
- Verified: before, importing either module never exits on its own; after, both exit naturally. Full `npm test` (including `test:lifecycle`) stays green.
|
|
16
|
+
|
|
8
17
|
## [3.6.0] - 2026-06-09
|
|
9
18
|
|
|
10
19
|
### Added
|
package/README.md
CHANGED
|
@@ -20,21 +20,23 @@ A Model Context Protocol (MCP) server that enables **Claude Code** and **OpenAI
|
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## 🎉 What's New in v3.6.
|
|
23
|
+
## 🎉 What's New in v3.6.1
|
|
24
24
|
|
|
25
|
-
**
|
|
25
|
+
**Teardown hygiene follow-up** (Released: June 9, 2026)
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
- Add or edit a server in your `.env`/TOML and the running MCP server picks it up on the next call — `ssh_list_servers` sees it **without a restart**. A new `ServerConfigManager` reloads **lazily** when a file's signature (path + `mtime` + size) changes; if a reload fails (malformed mid-edit), the last known-good config is kept. Real `process.env` vars keep top priority. No watcher, no polling.
|
|
29
|
-
- **🔌 No more orphaned stdio processes** ([#41](https://github.com/bvisible/mcp-ssh-manager/pull/41) — thanks [@LegendaryGatz](https://github.com/LegendaryGatz))
|
|
30
|
-
- A stdio MCP server is torn down by stdin EOF / SIGTERM, not SIGINT. With only a `SIGINT` handler, every session leaked a ~83 MB node process (reparented to init). Shutdown is now idempotent across `SIGINT`/`SIGTERM`/`SIGHUP`/stdin-close, keepalive & cleanup timers are `unref()`'d, and the process exits cleanly **~10 ms** after teardown instead of never.
|
|
27
|
+
- **🔌 Module-level timers no longer pin the event loop** (follow-up to [#41](https://github.com/bvisible/mcp-ssh-manager/pull/41)) — `tunnel-manager.js` (`monitorTunnels`, 30 s) and `session-manager.js` (session cleanup, 5 min) registered module-level `setInterval`s that were never `unref()`'d, so importing either module kept Node's event loop alive on its own. Both are now `unref()`'d, matching the timers fixed in #41. Already covered by #41's forced-exit for the orphan bug — this restores clean teardown so process lifetime tracks the stdio transport. `npm test` (incl. `test:lifecycle`) stays green.
|
|
31
28
|
|
|
32
|
-
[Read full changelog →](CHANGELOG.md#
|
|
29
|
+
[Read full changelog →](CHANGELOG.md#361---2026-06-09)
|
|
33
30
|
|
|
34
31
|
---
|
|
35
32
|
|
|
36
33
|
## Previous Releases
|
|
37
34
|
|
|
35
|
+
### v3.6.0 - Live config hot reload + stdio lifecycle fix (June 9, 2026)
|
|
36
|
+
|
|
37
|
+
- **♻️ Configuration hot reload** ([#40](https://github.com/bvisible/mcp-ssh-manager/pull/40) — thanks [@EnjoySR](https://github.com/EnjoySR)) — add or edit a server in your `.env`/TOML and the running MCP server picks it up on the next call, no restart. A `ServerConfigManager` reloads lazily on file-signature change (path + `mtime` + size); a failed reload keeps the last known-good config; real `process.env` vars keep top priority. No watcher, no polling.
|
|
38
|
+
- **🔌 No more orphaned stdio processes** ([#41](https://github.com/bvisible/mcp-ssh-manager/pull/41) — thanks [@LegendaryGatz](https://github.com/LegendaryGatz)) — a stdio MCP server is torn down by stdin EOF / SIGTERM, not SIGINT; with only a `SIGINT` handler every session leaked a ~83 MB node process. Shutdown is now idempotent across `SIGINT`/`SIGTERM`/`SIGHUP`/stdin-close, timers are `unref()`'d, and the process exits **~10 ms** after teardown instead of never. [Full changelog →](CHANGELOG.md#360---2026-06-09)
|
|
39
|
+
|
|
38
40
|
### v3.5.1 - Robust SSH ping health-check on Windows/OpenSSH (May 26, 2026)
|
|
39
41
|
|
|
40
42
|
- **🪟 Healthy Windows sessions no longer reported as `Dead`** ([#39](https://github.com/bvisible/mcp-ssh-manager/pull/39) — thanks [@username77](https://github.com/username77)) — the liveness probe ran `echo "ping"` and `cmd.exe` echoed the quotes literally, failing a strict `=== 'ping'` check and needlessly rebuilding live connections. Now uses `echo ping` parsed by a null-safe `isPingAlive(stdout)` helper (CRLF/quote/case-normalized), covered by `tests/test-ssh-ping.js`. [Full changelog →](CHANGELOG.md#351---2026-05-26)
|
|
@@ -1030,10 +1032,4 @@ Made with ❤️ for the Claude Code community
|
|
|
1030
1032
|
<img width="380" height="200" src="https://glama.ai/mcp/servers/@bvisible/mcp-ssh-manager/badge" alt="SSH Manager MCP server" />
|
|
1031
1033
|
</a>
|
|
1032
1034
|
|
|
1033
|
-
<br/>
|
|
1034
|
-
|
|
1035
|
-
<a href="https://mseep.ai/app/bvisible-mcp-ssh-manager">
|
|
1036
|
-
<img src="https://mseep.net/pr/bvisible-mcp-ssh-manager-badge.png" alt="MseeP.ai Security Assessment Badge" />
|
|
1037
|
-
</a>
|
|
1038
|
-
|
|
1039
1035
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ssh-manager",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.1",
|
|
4
4
|
"description": "MCP SSH Manager: Model Context Protocol server for SSH remote server management. Control SSH connections from Claude Code and OpenAI Codex - execute commands, transfer files, database operations, backups, health monitoring, and DevOps automation. NEW: Tool activation system reduces context usage by 92%",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/session-manager.js
CHANGED
|
@@ -393,13 +393,16 @@ export function cleanupSessions(maxAge = 30 * 60 * 1000) { // 30 minutes default
|
|
|
393
393
|
return cleanedCount;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
// Periodic cleanup of inactive sessions
|
|
397
|
-
|
|
396
|
+
// Periodic cleanup of inactive sessions.
|
|
397
|
+
// unref() so this interval never keeps the process alive on its own (a stdio MCP
|
|
398
|
+
// server must exit when its transport closes, not be pinned by a background timer).
|
|
399
|
+
const sessionCleanup = setInterval(() => {
|
|
398
400
|
const cleaned = cleanupSessions();
|
|
399
401
|
if (cleaned > 0) {
|
|
400
402
|
logger.info(`Cleaned up ${cleaned} inactive sessions`);
|
|
401
403
|
}
|
|
402
404
|
}, 5 * 60 * 1000); // Every 5 minutes
|
|
405
|
+
if (typeof sessionCleanup.unref === 'function') sessionCleanup.unref();
|
|
403
406
|
|
|
404
407
|
export default {
|
|
405
408
|
createSession,
|
package/src/tunnel-manager.js
CHANGED
|
@@ -562,8 +562,12 @@ export function monitorTunnels() {
|
|
|
562
562
|
}
|
|
563
563
|
}
|
|
564
564
|
|
|
565
|
-
// Monitor tunnels periodically
|
|
566
|
-
|
|
565
|
+
// Monitor tunnels periodically.
|
|
566
|
+
// unref() so this interval never keeps the process alive on its own: as part of
|
|
567
|
+
// a stdio MCP server we must exit when the transport closes, not stay pinned by
|
|
568
|
+
// a background timer.
|
|
569
|
+
const tunnelMonitor = setInterval(monitorTunnels, 30 * 1000); // Every 30 seconds
|
|
570
|
+
if (typeof tunnelMonitor.unref === 'function') tunnelMonitor.unref();
|
|
567
571
|
|
|
568
572
|
export default {
|
|
569
573
|
createTunnel,
|