ssh-agent-workspace 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +121 -28
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -71,11 +71,13 @@ Your agent gets a **real interactive terminal** — not one-off exec commands. I
71
71
 
72
72
  ### Install
73
73
 
74
+ npx auto-downloads and runs the latest version. Or install globally:
75
+
74
76
  ```bash
75
77
  npm install -g ssh-agent-workspace
76
78
  ```
77
79
 
78
- Or from source:
80
+ From source:
79
81
 
80
82
  ```bash
81
83
  git clone https://github.com/ShiroNexo/ssh-agent-workspace.git
@@ -121,16 +123,18 @@ Your agent now has a persistent workspace on `prod`.
121
123
 
122
124
  ### Add to Your MCP Client
123
125
 
124
- #### OpenCode
126
+ <details>
127
+ <summary><b>OpenCode</b></summary>
125
128
 
126
- Add to `opencode.json`:
129
+ Add to `~/.config/opencode/opencode.json`:
127
130
 
128
131
  ```json
129
132
  {
130
- "mcpServers": {
133
+ "$schema": "https://opencode.ai/config.json",
134
+ "mcp": {
131
135
  "workspace": {
132
- "command": "node",
133
- "args": ["/path/to/ssh-agent-workspace/dist/index.js"]
136
+ "type": "local",
137
+ "command": ["npx", "-y", "ssh-agent-workspace"]
134
138
  }
135
139
  }
136
140
  }
@@ -139,23 +143,25 @@ Add to `opencode.json`:
139
143
  Or via CLI:
140
144
 
141
145
  ```bash
142
- opencode mcp add workspace -- node /path/to/ssh-agent-workspace/dist/index.js
146
+ opencode mcp add workspace -- npx -y ssh-agent-workspace
143
147
  ```
148
+ </details>
144
149
 
145
- #### Claude Code
150
+ <details>
151
+ <summary><b>Claude Code</b></summary>
146
152
 
147
153
  ```bash
148
- claude mcp add workspace -- node /path/to/ssh-agent-workspace/dist/index.js
154
+ claude mcp add workspace -- npx -y ssh-agent-workspace
149
155
  ```
150
156
 
151
- Or add to Claude Code config (`~/.config/claude-code/claude_code_config.json` or project `.mcp.json`):
157
+ Or add to `~/.config/claude-code/claude_code_config.json` or project `.mcp.json`:
152
158
 
153
159
  ```json
154
160
  {
155
161
  "mcpServers": {
156
162
  "workspace": {
157
- "command": "node",
158
- "args": ["/path/to/ssh-agent-workspace/dist/index.js"],
163
+ "command": "npx",
164
+ "args": ["-y", "ssh-agent-workspace"],
159
165
  "autoApprove": [
160
166
  "mcp__workspace__connect",
161
167
  "mcp__workspace__exec",
@@ -172,33 +178,106 @@ Or add to Claude Code config (`~/.config/claude-code/claude_code_config.json` or
172
178
  }
173
179
  ```
174
180
 
175
- **Tip:** The `autoApprove` block lets the agent use those tools without asking you for permission each time. Add or remove tools based on your comfort level.
181
+ > **Tip:** The `autoApprove` block lets the agent use those tools without asking permission each time. Add or remove tools based on your comfort level.
182
+ </details>
183
+
184
+ <details>
185
+ <summary><b>Cursor</b></summary>
186
+
187
+ Go to `Cursor Settings` → `MCP` → `New MCP Server`. Use this config:
188
+
189
+ ```json
190
+ {
191
+ "mcpServers": {
192
+ "workspace": {
193
+ "command": "npx",
194
+ "args": ["-y", "ssh-agent-workspace"]
195
+ }
196
+ }
197
+ }
198
+ ```
199
+ </details>
200
+
201
+ <details>
202
+ <summary><b>Codex (OpenAI)</b></summary>
203
+
204
+ ```bash
205
+ codex mcp add workspace -- npx -y ssh-agent-workspace
206
+ ```
207
+
208
+ Or add to `~/.codex/config.toml`:
209
+
210
+ ```toml
211
+ [mcp_servers.workspace]
212
+ command = "npx"
213
+ args = ["-y", "ssh-agent-workspace"]
214
+ ```
215
+ </details>
216
+
217
+ <details>
218
+ <summary><b>Windsurf</b></summary>
176
219
 
177
- #### Cursor / Windsurf / Generic MCP
220
+ Add to `~/.codeium/windsurf/mcp_config.json`:
178
221
 
179
222
  ```json
180
223
  {
181
224
  "mcpServers": {
182
225
  "workspace": {
183
- "command": "node",
184
- "args": ["/path/to/ssh-agent-workspace/dist/index.js"]
226
+ "command": "npx",
227
+ "args": ["-y", "ssh-agent-workspace"]
185
228
  }
186
229
  }
187
230
  }
188
231
  ```
232
+ </details>
189
233
 
190
- #### If Using npx (no global install)
234
+ <details>
235
+ <summary><b>Copilot / VS Code</b></summary>
191
236
 
192
- Replace `"command": "node"` and `"args"` with:
237
+ ```json
238
+ {
239
+ "mcpServers": {
240
+ "workspace": {
241
+ "command": "npx",
242
+ "args": ["-y", "ssh-agent-workspace"]
243
+ }
244
+ }
245
+ }
246
+ ```
247
+ </details>
248
+
249
+ <details>
250
+ <summary><b>Gemini CLI</b></summary>
251
+
252
+ ```bash
253
+ gemini mcp add workspace npx -y ssh-agent-workspace
254
+ ```
255
+ </details>
256
+
257
+ <details>
258
+ <summary><b>Cline</b></summary>
193
259
 
194
260
  ```json
195
261
  {
196
- "command": "npx",
197
- "args": ["-y", "ssh-agent-workspace"]
262
+ "mcpServers": {
263
+ "workspace": {
264
+ "command": "npx",
265
+ "args": ["-y", "ssh-agent-workspace"]
266
+ }
267
+ }
198
268
  }
199
269
  ```
270
+ </details>
271
+
272
+ <details>
273
+ <summary><b>Qoder</b></summary>
274
+
275
+ ```bash
276
+ qodercli mcp add workspace -- npx -y ssh-agent-workspace
277
+ ```
278
+ </details>
200
279
 
201
- npx will download and run the latest version automatically.
280
+ > **Using npx** means no global install needed. npx auto-downloads the latest version. If you installed globally (`npm install -g ssh-agent-workspace`), replace `"npx"` / `"-y"` / `"ssh-agent-workspace"` with `"ssh-agent-workspace"` as the command directly.
202
281
 
203
282
  Your agent now has a persistent workspace on `prod`. Running `cd /var/www` once means the agent stays there for every subsequent command.
204
283
 
@@ -255,7 +334,8 @@ No restart needed. Changes apply immediately.
255
334
 
256
335
  ## Tools (25)
257
336
 
258
- ### Workspace (9)
337
+ <details>
338
+ <summary><b>Workspace (9 tools)</b></summary>
259
339
 
260
340
  | Tool | Description |
261
341
  |---|---|
@@ -268,45 +348,58 @@ No restart needed. Changes apply immediately.
268
348
  | `disconnect` | Close session. Optionally kill tmux or keep alive |
269
349
  | `list_hosts` | List `~/.ssh/config` aliases |
270
350
  | `list_sessions` | List active workspaces |
351
+ </details>
271
352
 
272
- ### File Transfer (3)
353
+ <details>
354
+ <summary><b>File Transfer (3 tools)</b></summary>
273
355
 
274
356
  | Tool | Description |
275
357
  |---|---|
276
358
  | `sftp_upload` | Upload file to remote |
277
359
  | `sftp_download` | Download file from remote |
278
360
  | `sftp_list` | List remote directory |
361
+ </details>
279
362
 
280
- ### Monitoring (3)
363
+ <details>
364
+ <summary><b>Monitoring (3 tools)</b></summary>
281
365
 
282
366
  | Tool | Description |
283
367
  |---|---|
284
368
  | `connection_status` | SSH liveness + tmux existence |
285
369
  | `health_check` | CPU / RAM / Disk / Load / Uptime |
286
370
  | `tail_log` | Log tail with optional follow |
371
+ </details>
287
372
 
288
- ### DevOps (4)
373
+ <details>
374
+ <summary><b>DevOps (6 tools)</b></summary>
289
375
 
290
376
  | Tool | Description |
291
377
  |---|---|
292
378
  | `deploy` | Upload → backup → chmod → chown → restart |
293
379
  | `backup` | tar.gz archive → download → cleanup |
294
380
  | `sync` | Rsync-lite via SFTP (bidirectional, dry-run) |
295
- | `ssh_tunnel_open` / `ssh_tunnel_list` / `ssh_tunnel_close` | Port forwarding + SOCKS5 |
381
+ | `ssh_tunnel_open` | Local port forward or SOCKS5 proxy |
382
+ | `ssh_tunnel_list` | List active tunnels |
383
+ | `ssh_tunnel_close` | Close tunnel, free port |
384
+ </details>
296
385
 
297
- ### Cluster & Queries (2)
386
+ <details>
387
+ <summary><b>Cluster & Queries (2 tools)</b></summary>
298
388
 
299
389
  | Tool | Description |
300
390
  |---|---|
301
391
  | `group_exec` | Run command across multiple workspaces (parallel/sequential) |
302
392
  | `db_query` | Read-only MySQL / PostgreSQL / MongoDB via SSH |
393
+ </details>
303
394
 
304
- ### Runtime Config (2)
395
+ <details>
396
+ <summary><b>Runtime Config (2 tools)</b></summary>
305
397
 
306
398
  | Tool | Description |
307
399
  |---|---|
308
400
  | `tools_config` | Enable/disable tools at runtime |
309
401
  | `host_security` | Per-host read-only, command allow/denylist |
402
+ </details>
310
403
 
311
404
  **Full reference:** [`docs/TOOLS.md`](docs/TOOLS.md) | **Security:** [`docs/SECURITY.md`](docs/SECURITY.md)
312
405
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-agent-workspace",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Persistent SSH workspaces for AI agents. Stateful tmux-backed sessions that survive reconnects, restarts, and network drops — with runtime security and tool configuration.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",