@akms/mcp-ssh 0.1.9 → 0.2.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 +13 -0
- package/README.md +37 -7
- package/lib/cli.cjs +1 -1
- package/lib/cli.cjs.map +1 -1
- package/lib/cli.js +1 -1
- package/lib/cli.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@akms/mcp-ssh`. Dates are `YYYY-MM-DD`.
|
|
4
4
|
|
|
5
|
+
## 0.2.1 — 2026-10-19
|
|
6
|
+
|
|
7
|
+
### Documentation
|
|
8
|
+
|
|
9
|
+
- Add a minimum key-based connection example to README and clarify that host/user alone require an available authenticated SSH agent; document password alternatives and Windows launch settings.
|
|
10
|
+
- Make the jump-host/proxy example a complete JSON client configuration.
|
|
11
|
+
|
|
12
|
+
## 0.2.0 — 2026-10-19
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Align the package, CLI and MCP server versions with the 0.2.0 MCP release family. Retain lazy SSH runtime loading and the existing command/path guard API used by WSL.
|
|
17
|
+
|
|
5
18
|
## 0.1.9 — 2026-10-19
|
|
6
19
|
|
|
7
20
|
### Changed
|
package/README.md
CHANGED
|
@@ -16,6 +16,32 @@ npx -y @akms/mcp-ssh --help # or run it straight from the registry
|
|
|
16
16
|
akms-mcp-ssh --version # show the installed version
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
## Minimum working configuration
|
|
20
|
+
|
|
21
|
+
For a direct SSH connection using a private key, use this MCP client entry. Replace the host, user and key path with your own. The SSH server must be reachable on port `22`, and the matching public key must already be authorized for that user.
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"ssh": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "@akms/mcp-ssh"],
|
|
29
|
+
"env": {
|
|
30
|
+
"SSH_HOST": "ssh.example.com",
|
|
31
|
+
"SSH_USER": "deploy",
|
|
32
|
+
"SSH_KEY": "~/.ssh/id_ed25519"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`SSH_HOST` and `SSH_USER` are required. The example also supplies authentication explicitly: `SSH_KEY` must point to an existing private key file; add `SSH_PASSPHRASE` if it is encrypted. For password authentication, replace `SSH_KEY` with `SSH_PASSWORD`. Omit both only when the MCP process can access an SSH agent with an authorized key (`SSH_AUTH_SOCK`, or the OpenSSH agent on Windows). No default key file or `~/.ssh/config` is loaded automatically.
|
|
40
|
+
|
|
41
|
+
`SSH_PORT` defaults to `22`; jump-host and proxy settings are optional. Writes are allowed by default; add `"SSH_READONLY": "true"` for a read-only entry.
|
|
42
|
+
|
|
43
|
+
The JSON example fits an MCP client's `mcpServers` configuration, such as a project `.mcp.json` or Cursor's `mcp.json`. On Windows, use `"command": "cmd"` and `"args": ["/c", "npx", "-y", "@akms/mcp-ssh"]`. For Codex TOML or automatic registration, run `npx -y @akms/mcp-ssh config --target codex` (or choose another client below).
|
|
44
|
+
|
|
19
45
|
## ⚙️ MCP client setup
|
|
20
46
|
|
|
21
47
|
**Let the CLI write it.** `config` opens a small manager for the hosts registered in a client's config. It asks plain questions — host, user, key or password, jump host, read-only — tests the connection, offers to pin the host key, and writes the entry. No `SSH_*` name has to be remembered.
|
|
@@ -99,7 +125,7 @@ Only entries that launch this package are listed for management. An edit keeps e
|
|
|
99
125
|
}
|
|
100
126
|
```
|
|
101
127
|
|
|
102
|
-
`SSH_HOST` + `SSH_USER` is
|
|
128
|
+
`SSH_HOST` + `SSH_USER` is sufficient only when an SSH agent with an authorized key is available; otherwise also provide a key path or password as shown in [Minimum working configuration](#minimum-working-configuration). The **private key stays a file on disk** — only its path goes in the config. Because each server fronts one host, the agent never names it: `ssh_exec({ command: "df -h" })` is a complete call. The server name (`ssh-prod`) is what the agent sees in its tool list, so name it after the host.
|
|
103
129
|
|
|
104
130
|
The server speaks MCP over **stdio**: stdout carries the JSON-RPC stream and all logging goes to stderr. Running it by hand in a terminal only prints the startup line and waits. When the client goes away — stdin ends, or the process is simply gone — the server closes its sessions and exits within a few seconds on its own; a stderr nobody reads is never a reason to stay. Its log says `mcp server ready on stdio` with its `pid`, for when one has to be found among a client's processes.
|
|
105
131
|
|
|
@@ -137,12 +163,16 @@ Authentication is tried in this order: **private key by path** (with `SSH_PASSPH
|
|
|
137
163
|
`~/.ssh/config` is **not** read — the server never shells out to `ssh` — so a `ProxyJump` or `ProxyCommand` that works on the command line has to be stated in the entry. Both OpenSSH shapes are available, and they compose:
|
|
138
164
|
|
|
139
165
|
```json
|
|
140
|
-
|
|
141
|
-
"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
166
|
+
{
|
|
167
|
+
"mcpServers": {
|
|
168
|
+
"ssh-dev": {
|
|
169
|
+
"command": "npx", "args": ["-y", "@akms/mcp-ssh"],
|
|
170
|
+
"env": {
|
|
171
|
+
"SSH_HOST": "10.0.16.12", "SSH_USER": "ubuntu", "SSH_KEY": "~/.ssh/id_ed25519",
|
|
172
|
+
"SSH_JUMP_HOST": "dev-ak-ssh.example.com",
|
|
173
|
+
"SSH_PROXY_COMMAND": "cloudflared access ssh --hostname %h"
|
|
174
|
+
}
|
|
175
|
+
}
|
|
146
176
|
}
|
|
147
177
|
}
|
|
148
178
|
```
|
package/lib/cli.cjs
CHANGED
|
@@ -36,7 +36,7 @@ var CWD_MARKER = "__AKMS_SSH_CWD__";
|
|
|
36
36
|
var MAX_DIRECTORY_ENTRIES = 1e3;
|
|
37
37
|
var SERVER_NAME = "akms-mcp-ssh";
|
|
38
38
|
var PACKAGE_NAME = "@akms/mcp-ssh";
|
|
39
|
-
var SERVER_VERSION = "0.1
|
|
39
|
+
var SERVER_VERSION = "0.2.1";
|
|
40
40
|
|
|
41
41
|
// src/_defs/command-rules.ts
|
|
42
42
|
var CRITICAL_PATH_PATTERN = new RegExp(
|