@akms/mcp-ssh 0.1.7 → 0.1.9
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 +250 -205
- package/README.md +307 -287
- package/lib/cli.cjs +344 -336
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.js +344 -335
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs +13 -11
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +2 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.js +13 -10
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,205 +1,250 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `@akms/mcp-ssh`. Dates are `YYYY-MM-DD`.
|
|
4
|
-
|
|
5
|
-
## 0.1.
|
|
6
|
-
|
|
7
|
-
###
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
- `
|
|
158
|
-
`
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
###
|
|
167
|
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
- `
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
### Library API
|
|
193
|
-
|
|
194
|
-
- `
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
`
|
|
204
|
-
|
|
205
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@akms/mcp-ssh`. Dates are `YYYY-MM-DD`.
|
|
4
|
+
|
|
5
|
+
## 0.1.9 — 2026-10-19
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Load SSH and its crypto runtime on the first connection instead of during idle MCP startup or local configuration work. Direct, proxy and jump-host routes share the loaded client constructor.
|
|
10
|
+
- Preserve shared connection attempts and reject a connection closed while the module was loading, before opening a proxy or network transport.
|
|
11
|
+
- Document idle-memory behavior and direct Node launch as an alternative to a persistent npm wrapper.
|
|
12
|
+
|
|
13
|
+
## 0.1.8 — 2026-10-19
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Add **Copy to another client** to each saved entry's config menu. Choose Claude Code,
|
|
18
|
+
Codex, Claude Desktop or Cursor to copy its name, command, arguments and complete
|
|
19
|
+
environment without changing the source or switching the current client.
|
|
20
|
+
- Ask before overwriting any same-name destination entry, including another package or
|
|
21
|
+
HTTP transport. The default is No; Esc returns to the destination picker.
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Validate complete TOML before and after edits. Recognize inline/dotted server names,
|
|
26
|
+
quoted keys and multiline values; refuse layouts that cannot be edited without
|
|
27
|
+
changing unrelated settings. Preserve all string environment values when copying.
|
|
28
|
+
- Write JSON and TOML configs through a flushed temporary file and a single rename.
|
|
29
|
+
Partial writes and failed commits keep the original; concurrent changes observed
|
|
30
|
+
before committing abort the save. New config files use owner-only permissions.
|
|
31
|
+
- Detect destination names even when the entry cannot be listed as a stdio server.
|
|
32
|
+
Reject malformed JSON server maps instead of replacing their contents.
|
|
33
|
+
- Replace the complete destination Codex server table when copying, removing stale
|
|
34
|
+
transport options while keeping unrelated settings. Ordinary edits still preserve
|
|
35
|
+
hand-written options.
|
|
36
|
+
- Restore the complete previous Claude Code entry if its replacement fails, and report
|
|
37
|
+
recovery failures accurately. Missing-CLI messages no longer print credentials.
|
|
38
|
+
|
|
39
|
+
### Documentation
|
|
40
|
+
|
|
41
|
+
- Document the copy menu, overwrite confirmation and copied fields in the README.
|
|
42
|
+
|
|
43
|
+
### Verification
|
|
44
|
+
|
|
45
|
+
- Cover cross-client copying, name conflicts, cancellation, EOF, unreadable destinations,
|
|
46
|
+
source preservation, TOML replacement and Claude Code CLI rollback.
|
|
47
|
+
- Reproduce multiline-string corruption, missed inline-name collisions, lost env keys,
|
|
48
|
+
partial disk writes, failed renames and concurrent file changes.
|
|
49
|
+
|
|
50
|
+
## 0.1.7 — 2026-10-19
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Keep connection check results visible in interactive `config` until Enter is pressed,
|
|
55
|
+
instead of immediately redrawing the menu and scrolling the report out of view.
|
|
56
|
+
Esc goes back and Ctrl+C exits; scripted input needs no additional answer.
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Animate checks in `config` and `--check` with a spinner and elapsed time for each phase:
|
|
61
|
+
SSH preparation, the jump host or proxy (when configured), and the target handshake and authentication.
|
|
62
|
+
Completed phases remain visible with success or failure markers and colors.
|
|
63
|
+
- Fit progress lines to the terminal width, use ASCII on legacy Windows consoles, and
|
|
64
|
+
respect `NO_COLOR`. Redirected output and `TERM=dumb` keep plain reports.
|
|
65
|
+
|
|
66
|
+
### Documentation
|
|
67
|
+
|
|
68
|
+
- Include `CHANGELOG.md` in the npm package and document the check display in the README.
|
|
69
|
+
|
|
70
|
+
### Library API
|
|
71
|
+
|
|
72
|
+
- `SshConnection.connect(onProgress?)` can report the `transport` and `host` phases of a new connection attempt.
|
|
73
|
+
|
|
74
|
+
### Verification
|
|
75
|
+
|
|
76
|
+
- Cover report pauses, cancellation, progress timing and cleanup, narrow terminals, and
|
|
77
|
+
phase transitions on successful and failed checks.
|
|
78
|
+
|
|
79
|
+
## 0.1.6 — 2026-10-13
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
|
|
83
|
+
- Never stay behind when the MCP client dies. The first log line written after stdin ends goes to
|
|
84
|
+
a stderr nobody reads; that EPIPE is now absorbed once and logging stops for good, instead of
|
|
85
|
+
being logged again (the loop that kept `@akms/mcp-db` 0.1.1 alive at 100% CPU). Shutdown also
|
|
86
|
+
has a 5 s deadline (`SHUTDOWN_DEADLINE_MS`) after which the process exits regardless.
|
|
87
|
+
- Keep the server running through an uncaught exception or unhandled rejection raised by one
|
|
88
|
+
session instead of taking every tool of the client down; both are logged.
|
|
89
|
+
|
|
90
|
+
### Changed
|
|
91
|
+
|
|
92
|
+
- The `mcp server ready on stdio` log line carries the process `pid`.
|
|
93
|
+
|
|
94
|
+
### Verification
|
|
95
|
+
|
|
96
|
+
- Add `tests/cli-shutdown.test.ts`: starts the server through `cmd /c` the way Claude Code does
|
|
97
|
+
on Windows, completes the handshake, lets the client die, and expects the server gone within 5 s.
|
|
98
|
+
|
|
99
|
+
## 0.1.5 — 2026-10-13
|
|
100
|
+
|
|
101
|
+
### Changed
|
|
102
|
+
|
|
103
|
+
- **Breaking:** Use `akms-mcp-ssh config` as the only configuration command. The former
|
|
104
|
+
`setup` command now exits with code 1 and a reminder to use `config`.
|
|
105
|
+
- Align CLI help, usage examples and developer documentation with `config`.
|
|
106
|
+
|
|
107
|
+
### Verification
|
|
108
|
+
|
|
109
|
+
- Add CLI regression tests for help, `config --target codex`, rejecting `setup`, and
|
|
110
|
+
the `--check` guidance when no host is configured. Tests use temporary client settings.
|
|
111
|
+
|
|
112
|
+
## 0.1.4 — 2026-10-13
|
|
113
|
+
|
|
114
|
+
### Documentation
|
|
115
|
+
|
|
116
|
+
- Expand the `setup` guide with keyboard controls, Esc behavior, the legacy `config`
|
|
117
|
+
alias, and reconnecting the MCP client after saving.
|
|
118
|
+
- Document release version synchronization across the package files and `SERVER_VERSION`,
|
|
119
|
+
plus tests, build, CLI smoke checks and package inspection before publishing.
|
|
120
|
+
- Clarify the test suite's local network requirements and its coverage of form navigation
|
|
121
|
+
and text editing. Runtime behavior is unchanged.
|
|
122
|
+
|
|
123
|
+
## 0.1.3 — 2026-10-11
|
|
124
|
+
|
|
125
|
+
### Changed
|
|
126
|
+
|
|
127
|
+
- **The host manager is `akms-mcp-ssh setup`.** `config` still opens it, so the name used
|
|
128
|
+
in 0.1.0 – 0.1.2 keeps working, but it is no longer listed in `--help`.
|
|
129
|
+
|
|
130
|
+
### Fixed
|
|
131
|
+
|
|
132
|
+
- **Esc goes back one level everywhere in `setup`.** Inside the settings form, Esc in a
|
|
133
|
+
choice list (authentication, route, private key), a text field or a secret returns to the
|
|
134
|
+
form with the setting unchanged — including the follow-up a choice opened, so Esc at the
|
|
135
|
+
jump-host question also restores the route. Esc at the "Write it?" preview reopens the form
|
|
136
|
+
on the same values. Before, a list opened from the form ignored Esc, and a text field never
|
|
137
|
+
saw it: on macOS / Linux the terminal handed the `ESC` byte over as part of the value.
|
|
138
|
+
- Text fields on a terminal are now a small line editor in raw mode (←/→, Home/End,
|
|
139
|
+
Backspace/Delete, Ctrl+U), which is what makes Esc visible there.
|
|
140
|
+
|
|
141
|
+
## 0.1.2 — 2026-10-11
|
|
142
|
+
|
|
143
|
+
### Changed
|
|
144
|
+
|
|
145
|
+
- **Adding or editing a host opens a settings form** instead of a sequence of questions.
|
|
146
|
+
Every setting is listed with its value; pick one to change it, in any order, as often as
|
|
147
|
+
needed. The cursor then moves to the next setting, so Enter down the list still fills the
|
|
148
|
+
form top to bottom. Settings a choice brings with it (the private key, the jump host) appear
|
|
149
|
+
under it once chosen, empty required settings are marked, and Save moves to the first
|
|
150
|
+
missing one. Test the connection and Save sit below the settings; Save offers a test when
|
|
151
|
+
the values changed since the last one. On a terminal the form redraws in place.
|
|
152
|
+
|
|
153
|
+
## 0.1.1 — 2026-10-11
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
|
|
157
|
+
- **`config` menus are arrow-key lists.** Options are picked with ↑/↓ and Enter instead of
|
|
158
|
+
typing a keyword (`claude-code`, `password`, a menu letter). The hosts are the main menu:
|
|
159
|
+
pick one to edit, check, print or remove it. The private key is chosen from the keys found
|
|
160
|
+
in `~/.ssh`, and the route is one choice (directly / jump host / proxy command / both)
|
|
161
|
+
instead of two yes/no questions. Answered prompts collapse to one `✔ question · answer`
|
|
162
|
+
line. Without a terminal (a pipe, Git Bash's mintty) the lists are numbered instead.
|
|
163
|
+
|
|
164
|
+
## 0.1.0 — 2026-10-11
|
|
165
|
+
|
|
166
|
+
### Added
|
|
167
|
+
|
|
168
|
+
- **`akms-mcp-ssh config`** — an interactive manager for the hosts registered in an MCP
|
|
169
|
+
client's config: list, add, edit, remove, check, print, switch client. It asks plain
|
|
170
|
+
questions instead of `SSH_*` names, tests the connection, offers to pin the host key, and
|
|
171
|
+
writes the entry. Targets Claude Code (user scope, through `claude mcp`), Codex
|
|
172
|
+
(`~/.codex/config.toml`), Claude Desktop and Cursor. `--target <client>` picks one.
|
|
173
|
+
- **Jump host** — `SSH_JUMP_HOST` (with `SSH_JUMP_PORT` / `SSH_JUMP_USER` / `SSH_JUMP_KEY`
|
|
174
|
+
/ `SSH_JUMP_PASSPHRASE` / `SSH_JUMP_PASSWORD` / `SSH_JUMP_HOST_KEY`) connects to a
|
|
175
|
+
bastion first and reaches the target over a forwarded TCP channel, as `ssh -J` does.
|
|
176
|
+
User and key default to the target's.
|
|
177
|
+
- **Proxy command** — `SSH_PROXY_COMMAND` runs a command and speaks SSH over its
|
|
178
|
+
stdin/stdout, as OpenSSH's `ProxyCommand` does; `%h` / `%p` / `%r` expand to the first
|
|
179
|
+
hop. It carries the jump host when both are set, so "cloudflared to the bastion, then
|
|
180
|
+
forward to the target" is one entry.
|
|
181
|
+
- A `SSH_JUMP_*` variable set without `SSH_JUMP_HOST` aborts startup, like every other
|
|
182
|
+
half-formed value.
|
|
183
|
+
- `ssh_list_hosts` shows the route; `--check` prints it along with the jump host's key
|
|
184
|
+
fingerprint.
|
|
185
|
+
|
|
186
|
+
### Changed
|
|
187
|
+
|
|
188
|
+
- `--check` now lets warnings and errors through instead of silencing the log entirely,
|
|
189
|
+
so a missing key file or the proxy command's stderr (a `cloudflared` login prompt) is
|
|
190
|
+
visible where the operator is looking. An explicit `SSH_MCP_LOG_LEVEL` still wins.
|
|
191
|
+
|
|
192
|
+
### Library API
|
|
193
|
+
|
|
194
|
+
- `SshHostProfile` gains `proxyCommand` and `jump` (`SshJumpProfile`); `SshHostSummary`
|
|
195
|
+
gains `viaProxyCommand` and `jump`.
|
|
196
|
+
- `SshConnection.jumpHostKeyFingerprint`.
|
|
197
|
+
- `loadHostProfile(env?)` reads from the given record instead of `process.env` when one
|
|
198
|
+
is passed.
|
|
199
|
+
|
|
200
|
+
## 0.0.3 — 2026-09-28
|
|
201
|
+
|
|
202
|
+
- `package.json` declares `repository`, `homepage` and `bugs` pointing at
|
|
203
|
+
`github.com/alkemic-studio/npm.akms.mcp-ssh`.
|
|
204
|
+
|
|
205
|
+
## 0.0.2 — 2026-08-09
|
|
206
|
+
|
|
207
|
+
First release to reach the registry. `0.0.1` was built but never published, so the
|
|
208
|
+
configuration surface listed under **Removed** never actually shipped — it is recorded
|
|
209
|
+
here because the code carried it right up to this version.
|
|
210
|
+
|
|
211
|
+
### Changed
|
|
212
|
+
|
|
213
|
+
- **Configuration is environment variables only.** A host is declared with plain `SSH_*`
|
|
214
|
+
variables in the MCP client's own server entry — one entry per host. "What is this
|
|
215
|
+
server allowed to do" is now answerable by reading that entry, with no second file to
|
|
216
|
+
find and no precedence order to reason about.
|
|
217
|
+
- Fronting several hosts means several server entries, each carrying its own connection
|
|
218
|
+
and its own guard policy, declared where you read it.
|
|
219
|
+
- `--check` reports the one configured host instead of iterating profiles.
|
|
220
|
+
|
|
221
|
+
### Removed
|
|
222
|
+
|
|
223
|
+
- Every config-file source: the `--config <path>` flag, `SSH_MCP_CONFIG`,
|
|
224
|
+
`~/.akms-ssh.json` and `~/.config/akms-ssh/config.json` — along with the `defaults`
|
|
225
|
+
block, the `hosts` map and the zod schema that validated them.
|
|
226
|
+
- The `target` argument on every tool. With one host there is nothing to select, so the
|
|
227
|
+
model cannot name a machine even in principle.
|
|
228
|
+
- `ssh_reload_config`. Environment variables are fixed for the life of the process, so
|
|
229
|
+
applying a change means restarting the server.
|
|
230
|
+
- `privateKey` (inline key contents), `passphraseEnv` and `passwordEnv`. `SSH_KEY` takes a
|
|
231
|
+
path and `SSH_PASSPHRASE` / `SSH_PASSWORD` are themselves environment variables, so the
|
|
232
|
+
indirection had nothing left to point at.
|
|
233
|
+
- The protected-local-path rule for `.akms-ssh.json`. The files that define the guards are
|
|
234
|
+
now the MCP client configurations (`.mcp.json`, `.claude*`,
|
|
235
|
+
`claude_desktop_config.json`), which stay protected.
|
|
236
|
+
|
|
237
|
+
### Library API
|
|
238
|
+
|
|
239
|
+
- `loadConfig(path?)` → `loadHostProfile()`, returning `SshHostProfile | null`.
|
|
240
|
+
- `createSshMcpServer(options?)` → `createSshMcpServer()`. The instance exposes `profile`
|
|
241
|
+
instead of `config`, and `reloadConfig()` is gone.
|
|
242
|
+
- Dropped the `SshMcpConfig` and `SshMcpServerOptions` types and the `POLICY_INPUT_SCHEMA`
|
|
243
|
+
/ `HOST_INPUT_SCHEMA` / `CONFIG_INPUT_SCHEMA` exports.
|
|
244
|
+
|
|
245
|
+
### Unchanged
|
|
246
|
+
|
|
247
|
+
The guards. Catastrophe rules, `SSH_READONLY`, `SSH_ALLOW_SUDO`, `SSH_ALLOW_COMMANDS`,
|
|
248
|
+
`SSH_DENY_PATTERNS` and `SSH_ALLOWED_PATHS` screen exactly what they did before, at the
|
|
249
|
+
same chokepoint inside `SshConnection.exec` and the SFTP operations. A malformed value
|
|
250
|
+
still aborts startup rather than being ignored.
|