@thesashadev/ssh-mcp-server 1.0.0 → 1.1.0

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 CHANGED
@@ -1,16 +1,20 @@
1
1
  # ssh-mcp-server
2
2
 
3
- MCP server for executing commands, uploading and downloading files on remote servers via SSH. Optimized for AI agents (Claude Code, Cursor, Windsurf, Antigravity, etc).
3
+ [![npm](https://img.shields.io/npm/v/@thesashadev/ssh-mcp-server)](https://www.npmjs.com/package/@thesashadev/ssh-mcp-server)
4
+ [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
4
5
 
5
- ## Features
6
+ MCP server for executing commands, uploading and downloading files on remote servers via SSH. Zero-config for single servers — just pass credentials inline.
7
+
8
+ ## Features
6
9
 
7
10
  - **Command execution** — sync/async modes, timeout, background polling
8
- - **Reliable file transfers** — 5 automatic fallback strategies (SFTP parallel → SFTP stream → SCP → base64 → chunked)
11
+ - **Reliable file transfers** — 5 automatic fallback strategies
9
12
  - **Multi-server** — easy switching with workspace-based auto-selection
10
- - **AI-Native output** — ANSI codes stripped, binary detected, control chars removed
11
- - **Extreme Performance** — Cached sessions, connection pooling, 64-stream parallel transfers
13
+ - **AI-Native output** — ANSI stripped, binary detected, control chars removed
14
+ - **Zero-config mode** — pass server credentials directly in MCP config, no extra files needed
15
+ - **Fast** — SFTP session caching, connection pooling, 64-stream parallel transfers
12
16
 
13
- ## 🛠 Tools
17
+ ## Tools
14
18
 
15
19
  | Tool | Description |
16
20
  |------|-------------|
@@ -19,25 +23,26 @@ MCP server for executing commands, uploading and downloading files on remote ser
19
23
  | `ssh_upload` | Upload a local file to remote server |
20
24
  | `ssh_download` | Download a remote file to local machine |
21
25
 
22
- ## 🚀 Quick Start
23
-
24
- ### Option A: Use via npx (Fastest)
25
- 1. Create `ssh-servers.json` in your current folder.
26
- 2. Run directly:
27
- ```bash
28
- npx -y @thesashadev/ssh-mcp-server
29
- ```
26
+ ## Quick Start
30
27
 
31
- ### Option B: Local Build
32
- 1. Clone & Build:
33
- ```bash
34
- git clone https://github.com/TheSashaDev/ssh-mcp-server.git
35
- cd ssh-mcp-server
36
- npm install
37
- npm run build
28
+ ### Zero-Config (Inline)
29
+ No files needed — pass server credentials directly in your AI tool's MCP config:
30
+ ```json
31
+ {
32
+ "ssh": {
33
+ "command": "npx",
34
+ "args": [
35
+ "-y", "@thesashadev/ssh-mcp-server",
36
+ "--host", "1.2.3.4",
37
+ "--username", "ubuntu",
38
+ "--password", "your-password"
39
+ ]
40
+ }
41
+ }
38
42
  ```
39
43
 
40
- 2. Create `ssh-servers.json` in the project root.
44
+ ### With Config File
45
+ For multi-server setups, create `ssh-servers.json` in your working directory:
41
46
  ```json
42
47
  {
43
48
  "servers": [
@@ -52,26 +57,70 @@ npm run build
52
57
  ]
53
58
  }
54
59
  ```
55
- *Supports password, private key (`privateKeyPath`), and SSH agent auth.*
60
+ Then run:
61
+ ```bash
62
+ npx -y @thesashadev/ssh-mcp-server
63
+ ```
56
64
 
57
65
  ## 🔌 Client Integration
58
66
 
59
- Select your AI tool to see the setup guide:
60
-
61
67
  <details>
62
- <summary><b>🤖 Claude Code (CLI)</b></summary>
68
+ <summary><b>Claude Code (CLI)</b></summary>
69
+
70
+ **Single server:**
71
+ ```bash
72
+ claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server --host 1.2.3.4 --username ubuntu --password secret
73
+ ```
74
+
75
+ **Two servers:**
76
+ ```bash
77
+ claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server \
78
+ --host 1.2.3.4 --username ubuntu --password secret --id dev \
79
+ --host 5.6.7.8 --username deploy --key ~/.ssh/id_rsa --id prod
80
+ ```
63
81
 
64
- Run this command in your terminal:
82
+ **Or with config file:**
65
83
  ```bash
66
- claude mcp add ssh -- node "D:/ssh mco/dist/index.js"
84
+ claude mcp add ssh -- npx -y @thesashadev/ssh-mcp-server
67
85
  ```
68
- Or manually add to `~/.config/claude/mcp_servers.json`:
86
+ *(Place `ssh-servers.json` in your project root)*
87
+ </details>
88
+
89
+ <details>
90
+ <summary><b>Claude Desktop</b></summary>
91
+
92
+ Edit `claude_desktop_config.json`:
93
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
94
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
95
+
96
+ **Single server:**
69
97
  ```json
70
98
  {
71
99
  "mcpServers": {
72
100
  "ssh": {
73
- "command": "node",
74
- "args": ["D:/ssh mco/dist/index.js"]
101
+ "command": "npx",
102
+ "args": [
103
+ "-y", "@thesashadev/ssh-mcp-server",
104
+ "--host", "1.2.3.4",
105
+ "--username", "ubuntu",
106
+ "--password", "secret"
107
+ ]
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ **Two servers:**
114
+ ```json
115
+ {
116
+ "mcpServers": {
117
+ "ssh": {
118
+ "command": "npx",
119
+ "args": [
120
+ "-y", "@thesashadev/ssh-mcp-server",
121
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
122
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
123
+ ]
75
124
  }
76
125
  }
77
126
  }
@@ -79,47 +128,79 @@ Or manually add to `~/.config/claude/mcp_servers.json`:
79
128
  </details>
80
129
 
81
130
  <details>
82
- <summary><b>🖥️ Claude Desktop</b></summary>
131
+ <summary><b>Cursor</b></summary>
83
132
 
84
- Edit your `claude_desktop_config.json`:
85
- - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
86
- - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
133
+ Open **Settings** → **Cursor Settings** → **MCP** → **+ Add New MCP Server**.
87
134
 
135
+ Or add to `~/.cursor/mcp.json`:
136
+
137
+ **Single server:**
88
138
  ```json
89
139
  {
90
140
  "mcpServers": {
91
141
  "ssh": {
92
- "command": "node",
93
- "args": ["D:/ssh mco/dist/index.js"]
142
+ "command": "npx",
143
+ "args": [
144
+ "-y", "@thesashadev/ssh-mcp-server",
145
+ "--host", "1.2.3.4",
146
+ "--username", "ubuntu",
147
+ "--password", "secret"
148
+ ]
94
149
  }
95
150
  }
96
151
  }
97
152
  ```
98
- </details>
99
-
100
- <details>
101
- <summary><b>🖱️ Cursor</b></summary>
102
153
 
103
- 1. Go to **Settings** > **Cursor Settings** > **Features** > **MCP**.
104
- 2. Click **+ Add New MCP Server**.
105
- 3. Name: `ssh`. Type: `command`.
106
- 4. Command:
107
- ```bash
108
- node "D:/ssh mco/dist/index.js"
154
+ **Two servers:**
155
+ ```json
156
+ {
157
+ "mcpServers": {
158
+ "ssh": {
159
+ "command": "npx",
160
+ "args": [
161
+ "-y", "@thesashadev/ssh-mcp-server",
162
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
163
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
164
+ ]
165
+ }
166
+ }
167
+ }
109
168
  ```
110
169
  </details>
111
170
 
112
171
  <details>
113
- <summary><b>🏄 Windsurf</b></summary>
172
+ <summary><b>Windsurf</b></summary>
114
173
 
115
174
  Edit `~/.codeium/windsurf/mcp_config.json` (macOS/Linux) or `%USERPROFILE%\.codeium\windsurf\mcp_config.json` (Windows):
116
175
 
176
+ **Single server:**
177
+ ```json
178
+ {
179
+ "mcpServers": {
180
+ "ssh": {
181
+ "command": "npx",
182
+ "args": [
183
+ "-y", "@thesashadev/ssh-mcp-server",
184
+ "--host", "1.2.3.4",
185
+ "--username", "ubuntu",
186
+ "--password", "secret"
187
+ ]
188
+ }
189
+ }
190
+ }
191
+ ```
192
+
193
+ **Two servers:**
117
194
  ```json
118
195
  {
119
196
  "mcpServers": {
120
197
  "ssh": {
121
- "command": "node",
122
- "args": ["D:/ssh mco/dist/index.js"]
198
+ "command": "npx",
199
+ "args": [
200
+ "-y", "@thesashadev/ssh-mcp-server",
201
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
202
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
203
+ ]
123
204
  }
124
205
  }
125
206
  }
@@ -127,15 +208,38 @@ Edit `~/.codeium/windsurf/mcp_config.json` (macOS/Linux) or `%USERPROFILE%\.code
127
208
  </details>
128
209
 
129
210
  <details>
130
- <summary><b>🛡️ Antigravity</b></summary>
211
+ <summary><b>Antigravity</b></summary>
131
212
 
132
213
  Add to `mcp_config.json`:
214
+
215
+ **Single server:**
133
216
  ```json
134
217
  {
135
218
  "mcpServers": {
136
219
  "ssh": {
137
- "command": "node",
138
- "args": ["D:/ssh mco/dist/index.js"]
220
+ "command": "npx",
221
+ "args": [
222
+ "-y", "@thesashadev/ssh-mcp-server",
223
+ "--host", "1.2.3.4",
224
+ "--username", "ubuntu",
225
+ "--password", "secret"
226
+ ]
227
+ }
228
+ }
229
+ }
230
+ ```
231
+
232
+ **Two servers:**
233
+ ```json
234
+ {
235
+ "mcpServers": {
236
+ "ssh": {
237
+ "command": "npx",
238
+ "args": [
239
+ "-y", "@thesashadev/ssh-mcp-server",
240
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
241
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
242
+ ]
139
243
  }
140
244
  }
141
245
  }
@@ -143,27 +247,69 @@ Add to `mcp_config.json`:
143
247
  </details>
144
248
 
145
249
  <details>
146
- <summary><b>🧠 Codex</b></summary>
250
+ <summary><b>Codex</b></summary>
147
251
 
148
252
  Add to `codex.toml`:
253
+
254
+ **Single server:**
255
+ ```toml
256
+ [mcp_servers."ssh"]
257
+ command = "npx"
258
+ args = [
259
+ "-y", "@thesashadev/ssh-mcp-server",
260
+ "--host", "1.2.3.4",
261
+ "--username", "ubuntu",
262
+ "--password", "secret"
263
+ ]
264
+ enabled = true
265
+ ```
266
+
267
+ **Two servers:**
149
268
  ```toml
150
269
  [mcp_servers."ssh"]
151
- command = "node"
152
- args = ["D:/ssh mco/dist/index.js"]
270
+ command = "npx"
271
+ args = [
272
+ "-y", "@thesashadev/ssh-mcp-server",
273
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
274
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
275
+ ]
153
276
  enabled = true
154
277
  ```
155
278
  </details>
156
279
 
157
280
  <details>
158
- <summary><b>🔍 Cody (Sourcegraph)</b></summary>
281
+ <summary><b>Cody (Sourcegraph)</b></summary>
282
+
283
+ Edit `~/.config/cody/mcp_servers.json`:
159
284
 
160
- Edit `~/.config/cody/mcp_servers.json` (macOS/Linux) or `%USERPROFILE%\.config\cody\mcp_servers.json` (Windows):
285
+ **Single server:**
161
286
  ```json
162
287
  {
163
288
  "mcpServers": {
164
289
  "ssh": {
165
- "command": "node",
166
- "args": ["D:/ssh mco/dist/index.js"]
290
+ "command": "npx",
291
+ "args": [
292
+ "-y", "@thesashadev/ssh-mcp-server",
293
+ "--host", "1.2.3.4",
294
+ "--username", "ubuntu",
295
+ "--password", "secret"
296
+ ]
297
+ }
298
+ }
299
+ }
300
+ ```
301
+
302
+ **Two servers:**
303
+ ```json
304
+ {
305
+ "mcpServers": {
306
+ "ssh": {
307
+ "command": "npx",
308
+ "args": [
309
+ "-y", "@thesashadev/ssh-mcp-server",
310
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
311
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
312
+ ]
167
313
  }
168
314
  }
169
315
  }
@@ -171,42 +317,117 @@ Edit `~/.config/cody/mcp_servers.json` (macOS/Linux) or `%USERPROFILE%\.config\c
171
317
  </details>
172
318
 
173
319
  <details>
174
- <summary><b>🔁 Continue.dev</b></summary>
320
+ <summary><b>Continue.dev</b></summary>
321
+
322
+ Add to `.continue/config.json`:
175
323
 
176
- Add to your `.continue/config.json`:
324
+ **Single server:**
177
325
  ```json
178
326
  {
179
- "contextProviders": [
327
+ "mcpServers": [
180
328
  {
181
- "name": "mcp",
182
- "params": {
183
- "mcpServers": {
184
- "ssh": {
185
- "command": "node",
186
- "args": ["D:/ssh mco/dist/index.js"]
187
- }
188
- }
189
- }
329
+ "name": "ssh",
330
+ "command": "npx",
331
+ "args": [
332
+ "-y", "@thesashadev/ssh-mcp-server",
333
+ "--host", "1.2.3.4",
334
+ "--username", "ubuntu",
335
+ "--password", "secret"
336
+ ]
337
+ }
338
+ ]
339
+ }
340
+ ```
341
+
342
+ **Two servers:**
343
+ ```json
344
+ {
345
+ "mcpServers": [
346
+ {
347
+ "name": "ssh",
348
+ "command": "npx",
349
+ "args": [
350
+ "-y", "@thesashadev/ssh-mcp-server",
351
+ "--host", "1.2.3.4", "--username", "ubuntu", "--password", "secret", "--id", "dev",
352
+ "--host", "5.6.7.8", "--username", "deploy", "--key", "~/.ssh/id_rsa", "--id", "prod"
353
+ ]
190
354
  }
191
355
  ]
192
356
  }
193
357
  ```
194
358
  </details>
195
359
 
196
- ## ⚙️ Server Config
360
+ ## Configuration
361
+
362
+ Three ways to configure servers (in priority order):
363
+
364
+ ### 1. CLI Arguments (Zero-Config)
365
+ Pass directly in your MCP config args:
366
+ ```
367
+ --host 1.2.3.4 --username ubuntu --password secret
368
+ --host 1.2.3.4 --username deploy --key ~/.ssh/id_rsa
369
+ ```
370
+
371
+ | Arg | Description |
372
+ |-----|-------------|
373
+ | `--host` | SSH host (starts a new server block) |
374
+ | `--port` | SSH port (default: 22) |
375
+ | `--username` | SSH user |
376
+ | `--password` | Password auth |
377
+ | `--key` | Path to private key |
378
+ | `--passphrase` | Key passphrase |
379
+ | `--id` | Server ID (default: "default") |
380
+ | `--name` | Display name |
381
+ | `--remote-dir` | Default remote directory |
382
+ | `--workspace` | Local directory binding |
383
+
384
+ Multiple servers: repeat `--host` blocks:
385
+ ```
386
+ --host 1.2.3.4 --username dev --password pass1 --id dev
387
+ --host 5.6.7.8 --username prod --key ~/.ssh/id_rsa --id prod
388
+ ```
389
+
390
+ ### 2. Environment Variables
391
+ For single-server setups via env:
392
+ ```
393
+ SSH_HOST=1.2.3.4 SSH_USER=ubuntu SSH_PASSWORD=secret
394
+ ```
197
395
 
198
- | Field | Required | Description |
199
- |-------|----------|-------------|
200
- | `id` | yes | ID used in tool calls |
201
- | `host` | yes | SSH host |
202
- | `username` | yes | SSH username |
203
- | `password` | no | Password auth |
204
- | `privateKeyPath`| no | Path to private key |
205
- | `workspaces` | no | Local folders for auto-selection |
396
+ | Env Var | Description |
397
+ |---------|-------------|
398
+ | `SSH_HOST` | SSH host |
399
+ | `SSH_PORT` | SSH port |
400
+ | `SSH_USER` | Username |
401
+ | `SSH_PASSWORD` | Password |
402
+ | `SSH_KEY` | Private key path |
403
+ | `SSH_PASSPHRASE` | Key passphrase |
404
+ | `SSH_REMOTE_DIR` | Default remote dir |
405
+ | `SSH_WORKSPACE` | Local workspace |
206
406
 
207
- ### Workspace Auto-Selection
208
- When `workspaces` are set (e.g. `["D:\\projects\\my-app"]`), the AI automatically selects the correct server based on your current local directory. No manual `server_id` required!
407
+ ### 3. Config File (`ssh-servers.json`)
408
+ For complex multi-server setups. Looked up in: current directory package directory.
409
+
410
+ ```json
411
+ {
412
+ "servers": [
413
+ {
414
+ "id": "dev",
415
+ "host": "1.2.3.4",
416
+ "username": "ubuntu",
417
+ "password": "secret",
418
+ "workspaces": ["D:\\projects\\my-app"]
419
+ },
420
+ {
421
+ "id": "prod",
422
+ "host": "5.6.7.8",
423
+ "username": "deploy",
424
+ "privateKeyPath": "~/.ssh/id_rsa",
425
+ "workspaces": ["D:\\projects\\production"]
426
+ }
427
+ ]
428
+ }
429
+ ```
209
430
 
210
- ## 📜 License
431
+ ## License
211
432
 
212
433
  AGPL-3.0
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAKA,MAAM,WA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AO,EAAE,YAAY,EAAE,CAAC;CAC3B;AA4GD,wBAAgB,UAAU,IAAI,MAAM,CA+DnC;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,YAAY,CAQxD;AAED,wBAAgB,qBAAqB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAkB7E;AAED,wBAAgB,WAAW,IAAI,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAQrG"}
package/dist/config.js CHANGED
@@ -5,9 +5,147 @@ import { dirname, normalize } from 'path';
5
5
  const __filename = fileURLToPath(import.meta.url);
6
6
  const __dirname = dirname(__filename);
7
7
  let cachedConfig = null;
8
+ // Parse CLI args like --host, --username, --password, --key, etc.
9
+ function parseCliServers() {
10
+ const args = process.argv.slice(2);
11
+ const servers = [];
12
+ let current = null;
13
+ function flushCurrent() {
14
+ if (current?.host && current?.username) {
15
+ servers.push({
16
+ id: current.id || 'default',
17
+ name: current.name || `${current.username}@${current.host}`,
18
+ host: current.host,
19
+ port: current.port || 22,
20
+ username: current.username,
21
+ password: current.password,
22
+ privateKeyPath: current.privateKeyPath,
23
+ passphrase: current.passphrase,
24
+ defaultRemoteDir: current.defaultRemoteDir || `/home/${current.username}`,
25
+ workspaces: current.workspaces || [],
26
+ });
27
+ }
28
+ }
29
+ function getVal(i) {
30
+ return i + 1 < args.length ? args[i + 1] : undefined;
31
+ }
32
+ for (let i = 0; i < args.length; i++) {
33
+ const arg = args[i];
34
+ const val = getVal(i);
35
+ switch (arg) {
36
+ case '--host':
37
+ // Each --host starts a new server block
38
+ if (current)
39
+ flushCurrent();
40
+ current = { host: val };
41
+ i++;
42
+ break;
43
+ case '--port':
44
+ if (!current)
45
+ current = {};
46
+ current.port = val ? parseInt(val, 10) : 22;
47
+ i++;
48
+ break;
49
+ case '--username':
50
+ case '--user':
51
+ if (!current)
52
+ current = {};
53
+ current.username = val;
54
+ i++;
55
+ break;
56
+ case '--password':
57
+ case '--pass':
58
+ if (!current)
59
+ current = {};
60
+ current.password = val;
61
+ i++;
62
+ break;
63
+ case '--key':
64
+ case '--private-key':
65
+ if (!current)
66
+ current = {};
67
+ current.privateKeyPath = val;
68
+ i++;
69
+ break;
70
+ case '--passphrase':
71
+ if (!current)
72
+ current = {};
73
+ current.passphrase = val;
74
+ i++;
75
+ break;
76
+ case '--id':
77
+ if (!current)
78
+ current = {};
79
+ current.id = val;
80
+ i++;
81
+ break;
82
+ case '--name':
83
+ if (!current)
84
+ current = {};
85
+ current.name = val;
86
+ i++;
87
+ break;
88
+ case '--remote-dir':
89
+ if (!current)
90
+ current = {};
91
+ current.defaultRemoteDir = val;
92
+ i++;
93
+ break;
94
+ case '--workspace':
95
+ if (!current)
96
+ current = {};
97
+ if (!current.workspaces)
98
+ current.workspaces = [];
99
+ if (val)
100
+ current.workspaces.push(val);
101
+ i++;
102
+ break;
103
+ }
104
+ }
105
+ flushCurrent();
106
+ return servers;
107
+ }
108
+ // Also check env vars for single-server inline config
109
+ function parseEnvServer() {
110
+ const host = process.env.SSH_HOST;
111
+ const username = process.env.SSH_USER || process.env.SSH_USERNAME;
112
+ if (!host || !username)
113
+ return null;
114
+ return {
115
+ id: process.env.SSH_ID || 'default',
116
+ name: process.env.SSH_NAME || `${username}@${host}`,
117
+ host,
118
+ port: parseInt(process.env.SSH_PORT || '22', 10),
119
+ username,
120
+ password: process.env.SSH_PASSWORD || process.env.SSH_PASS,
121
+ privateKeyPath: process.env.SSH_KEY || process.env.SSH_PRIVATE_KEY,
122
+ passphrase: process.env.SSH_PASSPHRASE,
123
+ defaultRemoteDir: process.env.SSH_REMOTE_DIR || `/home/${username}`,
124
+ workspaces: process.env.SSH_WORKSPACE ? [process.env.SSH_WORKSPACE] : [],
125
+ };
126
+ }
8
127
  export function loadConfig() {
9
128
  if (cachedConfig)
10
129
  return cachedConfig;
130
+ const inlineServers = [];
131
+ // Priority 1: CLI args
132
+ const cliServers = parseCliServers();
133
+ inlineServers.push(...cliServers);
134
+ // Priority 2: Env vars (single server)
135
+ if (inlineServers.length === 0) {
136
+ const envServer = parseEnvServer();
137
+ if (envServer)
138
+ inlineServers.push(envServer);
139
+ }
140
+ // If we have inline servers, use them (skip file)
141
+ if (inlineServers.length > 0) {
142
+ for (const srv of inlineServers) {
143
+ srv.workspaces = (srv.workspaces || []).map(w => normalize(w).toLowerCase());
144
+ }
145
+ cachedConfig = { servers: inlineServers };
146
+ return cachedConfig;
147
+ }
148
+ // Priority 3: Config file
11
149
  let configPath = process.env.SSH_MCP_CONFIG;
12
150
  if (!configPath) {
13
151
  const cwdConfig = resolve(process.cwd(), 'ssh-servers.json');
@@ -39,7 +177,7 @@ export function loadConfig() {
39
177
  }
40
178
  catch (err) {
41
179
  if (err.code === 'ENOENT') {
42
- throw new Error(`Config file not found at ${configPath}. Create ssh-servers.json with your server definitions.`);
180
+ throw new Error(`No servers configured. Pass --host/--username args, set SSH_HOST/SSH_USER env vars, or create ssh-servers.json.`);
43
181
  }
44
182
  throw new Error(`Failed to load config: ${err.message}`);
45
183
  }
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAO,MAAM,MAAM,CAAC;AAmB/C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,IAAI,YAAY,GAAkB,IAAI,CAAC;AAEvC,MAAM,UAAU,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AE,CAAC;IAC5B,MAAM,cAAc,GAAG,SAAS,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IAE1D,IAAI,SAAS,GAAwB,IAAI,CAAC;IAC1C,IAAI,OAAO,GAAG,CAAC,CAAC;IAEhB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;QAC/B,KAAK,MAAM,EAAE,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC;YAC9B,IAAI,cAAc,CAAC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,OAAO,EAAE,CAAC;gBACvD,SAAS,GAAG,GAAG,CAAC;gBAChB,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC;YACxB,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,WAAW;IACvB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QAC5B,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,UAAU,EAAE,CAAC,CAAC,UAAU;KAC3B,CAAC,CAAC,CAAC;AACR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thesashadev/ssh-mcp-server",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Professional SSH MCP server for AI agents. Supports sync/async commands, high-performance file transfers with 5 fallbacks.",
5
5
  "license": "AGPL-3.0",
6
6
  "type": "module",