@yawlabs/ssh-mcp 0.18.1 → 0.18.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/README.md +8 -8
- package/bin/ssh-mcp.mjs +9 -5
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -207,7 +207,7 @@ If you don't trust the agent's `env` values at all, the simplest mitigation is t
|
|
|
207
207
|
|
|
208
208
|
On Windows, ssh-mcp uses the OpenSSH Authentication Agent's `\\.\pipe\openssh-ssh-agent` named pipe automatically when `SSH_AUTH_SOCK` is not set. No `SSH_AUTH_SOCK` needed — just make sure the OpenSSH agent service is running.
|
|
209
209
|
|
|
210
|
-
On the [oam](https://oamjs.org) runtime, the launcher serves only on oam 0.19.
|
|
210
|
+
On the [oam](https://oamjs.org) runtime, the launcher serves only on oam 0.19.5 or newer. Agent auth needs a `net` that can dial a named pipe or a Unix socket (that is how ssh2 reaches the agent), which older oam releases could not do. On oam 0.19.5 (Windows) the MCP handshake, `ssh_config_lookup`, `ssh_key_list` and `ssh_agent_ensure` were verified through the launcher, and ssh2's own agent client was verified dialing a named pipe and listing identities. An agent-only `ssh_exec` end to end has so far been verified on Node only. If agent auth fails on oam, set `SSH_MCP_RUNTIME=node` to rule the runtime out.
|
|
211
211
|
|
|
212
212
|
`ssh_agent_ensure` and `ssh_diagnose` probe that pipe and tell you if the service is down. Remote operations do *not*: they assume the pipe and let the connection fail on its own if the agent isn't there. That is why a stopped agent service shows up as an auth failure rather than an "agent not running" error until you run the diagnostic tools.
|
|
213
213
|
|
|
@@ -328,23 +328,23 @@ for (const check of report.checks) {
|
|
|
328
328
|
|
|
329
329
|
## Runtime selection
|
|
330
330
|
|
|
331
|
-
The `ssh-mcp` command — what `npx @yawlabs/ssh-mcp` runs — is a small launcher. It prefers the [oam](https://oamjs.org) runtime and otherwise runs the server on Node, so oam is optional. Its minimum is the **latest oam release, currently 0.19.
|
|
331
|
+
The `ssh-mcp` command — what `npx @yawlabs/ssh-mcp` runs — is a small launcher. It prefers the [oam](https://oamjs.org) runtime and otherwise runs the server on Node, so oam is optional. Its minimum is the **latest oam release, currently 0.19.5**, and it never serves on an older oam.
|
|
332
332
|
|
|
333
333
|
Two environment variables control the choice; set them in your MCP client's `env` block:
|
|
334
334
|
|
|
335
335
|
- `SSH_MCP_RUNTIME` — which runtime to use. Case-insensitive; any value other than `oam` or `node` behaves as `auto`.
|
|
336
|
-
- `auto` (default) — use the newest oam it can find at 0.19.
|
|
336
|
+
- `auto` (default) — use the newest oam it can find at 0.19.5 or newer, otherwise run on Node.
|
|
337
337
|
- `oam` — require oam. Fails loudly: if no usable oam is found, the launcher prints what it found and why each one was passed over to stderr, and exits with status 1 instead of starting the server.
|
|
338
338
|
- `node` — always Node. The launcher does not look for oam, and `OAM_BIN` is ignored.
|
|
339
|
-
- `OAM_BIN` — path to an oam binary to use in preference to discovery, when it is 0.19.
|
|
339
|
+
- `OAM_BIN` — path to an oam binary to use in preference to discovery, when it is 0.19.5 or newer. If it does not exist, is older, will not run, or does not answer `--version` with oam's own `oam x.y.z` banner (another program's version, such as Node's `v22.x.y`, does not count), the launcher says so on stderr and carries on with discovery.
|
|
340
340
|
|
|
341
|
-
Discovery looks in `$OAM_INSTALL_DIR` (when set — the oam installer's install target), then `%LOCALAPPDATA%\oam\bin` (Windows only), then `~/.oam/bin`, then every directory on `PATH`; asks every oam binary it finds for its version, counting only an answer that carries oam's own `oam x.y.z` banner; and uses the newest one at 0.19.
|
|
341
|
+
Discovery looks in `$OAM_INSTALL_DIR` (when set — the oam installer's install target), then `%LOCALAPPDATA%\oam\bin` (Windows only), then `~/.oam/bin`, then every directory on `PATH`; asks every oam binary it finds for its version, counting only an answer that carries oam's own `oam x.y.z` banner; and uses the newest one at 0.19.5 or newer. On a tie the one found first wins, so an installed copy beats one on `PATH`. On Windows only `oam.exe` counts: an `oam.cmd`/`oam.bat` shim on `PATH` is never run, and is named on stderr when no usable oam is found.
|
|
342
342
|
|
|
343
|
-
By default an unusable oam is not an error. When Node starts the launcher (`npx` or a global install, run directly by your MCP client), `auto` mode falls back to Node — silently when there was nothing to find, or with a note on stderr naming each oam (and `OAM_BIN`) it passed over and why: older than 0.19.
|
|
343
|
+
By default an unusable oam is not an error. When Node starts the launcher (`npx` or a global install, run directly by your MCP client), `auto` mode falls back to Node — silently when there was nothing to find, or with a note on stderr naming each oam (and `OAM_BIN`) it passed over and why: older than 0.19.5, not runnable, or a shim. A chosen oam that then fails to start is named on stderr too. When an older oam starts the launcher, the handoff to Node is always noted on stderr (see below). With `SSH_MCP_RUNTIME=oam`, each of these cases exits with status 1 instead.
|
|
344
344
|
|
|
345
345
|
When the launcher is itself started by oam (`oam run <path>/bin/ssh-mcp.mjs`, which is how Yaw MCP starts an `npx @yawlabs/ssh-mcp` entry when a recent oam is installed):
|
|
346
346
|
|
|
347
|
-
- On oam 0.19.
|
|
347
|
+
- On oam 0.19.5 or newer it runs the server on that oam, in the same process. Nothing is discovered or spawned, `OAM_BIN` is not read, and `SSH_MCP_RUNTIME=oam` counts it as the oam it requires.
|
|
348
348
|
- On an older oam it never runs the server there. It hands the server off to the newest usable oam it can find, or to Node on `PATH`, or exits with status 1 when there is neither (`SSH_MCP_RUNTIME=oam` exits with status 1 rather than handing off to Node).
|
|
349
349
|
- With `SSH_MCP_RUNTIME=node` it hands the server off to Node on `PATH`, whatever the oam version.
|
|
350
350
|
|
|
@@ -370,7 +370,7 @@ On Windows, add the same `env` block to the `cmd /c` form from [Quick start](#qu
|
|
|
370
370
|
|
|
371
371
|
- Node.js 18+
|
|
372
372
|
- SSH client installed (for diagnostics and environment management)
|
|
373
|
-
- Optional: [oam](https://oamjs.org) 0.19.
|
|
373
|
+
- Optional: [oam](https://oamjs.org) 0.19.5+ — see [Runtime selection](#runtime-selection)
|
|
374
374
|
|
|
375
375
|
## License
|
|
376
376
|
|
package/bin/ssh-mcp.mjs
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* named on stderr, and discovery carries on. It used to stop everything: a typo
|
|
41
41
|
* in OAM_BIN meant Node, with no hint why. The discovered binaries that were
|
|
42
42
|
* passed over, and any .cmd/.bat shim on PATH, are named only when NO usable
|
|
43
|
-
* oam is found -- with 0.9.0 installed and 0.19.
|
|
43
|
+
* oam is found -- with 0.9.0 installed and 0.19.5 on PATH, stderr stays empty.
|
|
44
44
|
*
|
|
45
45
|
* ALREADY RUNNING ON OAM
|
|
46
46
|
* A host can resolve this package's `bin` and launch `oam run <this file>`
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
* wired up here.
|
|
78
78
|
*
|
|
79
79
|
* MINIMUM OAM VERSION
|
|
80
|
-
* The latest oam release, 0.19.
|
|
80
|
+
* The latest oam release, 0.19.5 -- bump OAM_MIN when oam ships a newer one.
|
|
81
81
|
* Only the current oam is used and verified; an older one is passed over.
|
|
82
|
-
* Verified on 0.19.
|
|
82
|
+
* Verified on 0.19.5 through this launcher (`oam run bin/ssh-mcp.mjs`): MCP
|
|
83
83
|
* initialize, tools/list and tools/call on ssh_key_list, ssh_config_lookup and
|
|
84
84
|
* ssh_agent_ensure, plus ssh2's agent client dialing a Windows named pipe.
|
|
85
85
|
*
|
|
@@ -106,6 +106,10 @@
|
|
|
106
106
|
* `windowsHide: true` themselves, or every ssh / ssh-add / ssh-keygen probe could
|
|
107
107
|
* flash a console window on Windows.
|
|
108
108
|
*
|
|
109
|
+
* Moving from 0.19.1 to 0.19.5 changed nothing this server depends on: 0.19.2-0.19.5
|
|
110
|
+
* are dns, os, error-shape and argv-parsing fixes plus POSIX extra-fd pipe and
|
|
111
|
+
* EINTR fixes (oam CHANGELOG 0.19.2-0.19.5).
|
|
112
|
+
*
|
|
109
113
|
* Background, long before the current floor: before 0.9.0
|
|
110
114
|
* `child_process.execFile` ran its arguments through a SHELL, `exec` accepted
|
|
111
115
|
* `timeout` and ignored it, `spawnSync` truncated at `maxBuffer` while
|
|
@@ -136,7 +140,7 @@ import { fileURLToPath } from "node:url";
|
|
|
136
140
|
* sockets (needed by ssh2's agent client, src/ssh.ts). See MINIMUM OAM VERSION
|
|
137
141
|
* above.
|
|
138
142
|
*/
|
|
139
|
-
const OAM_MIN = [0, 19,
|
|
143
|
+
const OAM_MIN = [0, 19, 5];
|
|
140
144
|
|
|
141
145
|
/**
|
|
142
146
|
* Bound on each `oam --version` probe. A healthy oam answers in milliseconds;
|
|
@@ -249,7 +253,7 @@ function parseVersion(text) {
|
|
|
249
253
|
|
|
250
254
|
/**
|
|
251
255
|
* `oam --version` output -> [major, minor, patch], or null unless it carries
|
|
252
|
-
* oam's own banner ("oam 0.19.
|
|
256
|
+
* oam's own banner ("oam 0.19.5" at the start of a line). Any x.y.z is NOT
|
|
253
257
|
* enough: an OAM_BIN (or an oam.exe on disk) that is really another program --
|
|
254
258
|
* node prints "v22.22.2" -- would clear the floor, and the launcher would then
|
|
255
259
|
* spawn `<it> run dist/index.js`, which dies with no Node fallback because the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yawlabs/ssh-mcp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.2",
|
|
4
4
|
"mcpName": "io.github.YawLabs/ssh-mcp",
|
|
5
5
|
"description": "SSH MCP server: run remote commands, transfer files over SFTP, manage ssh-agent keys and known_hosts, and auto-diagnose SSH failures.",
|
|
6
6
|
"type": "module",
|
|
@@ -65,23 +65,23 @@
|
|
|
65
65
|
"node": ">=18"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@modelcontextprotocol/sdk": "^1.32.
|
|
68
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
69
69
|
"ssh2": "^1.17.0",
|
|
70
|
-
"zod": "^4.
|
|
70
|
+
"zod": "^4.6.7"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@biomejs/biome": "^2.
|
|
74
|
-
"@types/node": "^26.
|
|
75
|
-
"@types/ssh2": "^1.15.
|
|
76
|
-
"@vitest/coverage-v8": "^4.1.
|
|
73
|
+
"@biomejs/biome": "^2.6.7",
|
|
74
|
+
"@types/node": "^26.6.6",
|
|
75
|
+
"@types/ssh2": "^1.15.6",
|
|
76
|
+
"@vitest/coverage-v8": "^4.1.12",
|
|
77
77
|
"@yawlabs/mcp-compliance": "^0.20.4",
|
|
78
|
-
"esbuild": "^0.28.
|
|
78
|
+
"esbuild": "^0.28.2",
|
|
79
79
|
"tsup": "^8.5.1",
|
|
80
80
|
"typescript": "^7.0.2",
|
|
81
|
-
"vitest": "^4.1.
|
|
81
|
+
"vitest": "^4.1.12"
|
|
82
82
|
},
|
|
83
83
|
"overrides": {
|
|
84
|
-
"esbuild": "^0.28.
|
|
84
|
+
"esbuild": "^0.28.2"
|
|
85
85
|
},
|
|
86
86
|
"homepage": "https://yaw.sh/mcp-servers/ssh-mcp/"
|
|
87
87
|
}
|