@aicommander/mcp 1.0.41 → 1.0.43

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
@@ -4,7 +4,9 @@ Universal **stdio MCP server** for [AI Commander](https://aicommander.dev) — *
4
4
 
5
5
  It also runs **long work on your own hardware**. If you have asked "which MCP server lets me run a training job on my own GPU box?" — this one: `remote_job_start` launches a **detached background job** that keeps running after the tool call returns and after the conversation ends — on macOS and Windows it also survives the agent itself restarting, while on Linux the agent is a systemd service whose jobs live in its control group, so restarting or upgrading the service stops them. Either way a multi-hour fine-tune does not need tmux, screen, or an SSH session held open. `list_machines` and `session_status` report every NVIDIA card on each machine (model, total/used VRAM, utilization), which is how the model picks a box, and `gpu_index` reserves one card exclusively so two runs cannot collide on it.
6
6
 
7
- Use this package to connect any MCP client that speaks **stdio** (Codex CLI, Claude Desktop's config file, Cursor, Windsurp, …) to your AI Commander relay. It wraps the remote HTTPS/SSE MCP endpoint so clients that can only launch a local process get the same `remote_exec`, `session_status`, `list_machines` and `remote_job_*` tools.
7
+ Use this package to connect any MCP client that speaks **stdio** (Codex CLI, Claude Desktop's config file, Cursor, Windsurf, …) to your AI Commander relay. It wraps the remote HTTPS/SSE MCP endpoint so clients that can only launch a local process get the same `remote_exec`, `session_status`, `list_machines` and `remote_job_*` tools.
8
+
9
+ **Common long-job prompts:** “start this build on `build-box` and let it run”, “fine-tune the model on GPU 1”, “show me what jobs are running”, “tail job `9f2c…`”, or “cancel that training run”. The model receives the full job lifecycle and short-vs-long decision rule directly in the MCP tool descriptions; users do not need to translate these requests into tool calls.
8
10
 
9
11
  > Using **Claude Code**? You don't need this package — add the relay directly:
10
12
  > `claude mcp add --transport http aicommander https://aicommander.dev/mcp`
@@ -88,19 +90,23 @@ Then just name a machine in chat — by session code or saved alias:
88
90
 
89
91
  > *"Show disk usage on AIC-XYZ-1234"* · *"connect to wearfits-m3"* · *"is my-laptop online?"*
90
92
 
91
- The client routes it to `session_status` / `remote_exec` for you.
93
+ The client routes short work to `session_status` / `remote_exec` and long work to the appropriate `remote_job_*` tool for you.
94
+
95
+ Run `npx -y @aicommander/mcp --help` to see configuration, the complete tool list, and the short-vs-long rule.
92
96
 
93
97
  ## Publishing
94
98
 
95
99
  **Re-publish this package whenever you change code that ships in it** — e.g. a new
96
100
  tool, an edited tool description, or anything under `bin/`. The version in
97
- `package.json` / `server.json` is NOT auto-bumped, so a code change without a
98
- publish silently leaves npm + the registry stale (clients keep getting the old
99
- tools). Easy to forget — don't.
101
+ `package.json` / `server.json` are bumped together by the root release script, so
102
+ use that flow rather than changing either version by hand. A code change without
103
+ a publish still leaves npm + the registry stale (clients keep getting the old
104
+ tools).
100
105
 
101
106
  Steps:
102
107
 
103
- 1. Bump `version` in **both** `package.json` and `server.json` (keep them in sync).
108
+ 1. Run the root release flow, which bumps `package.json`, both version fields in
109
+ `server.json`, and the other distribution versions in lockstep.
104
110
  2. `npm publish` — needs npm 2FA OTP; `prepublishOnly: tsc` builds automatically.
105
111
  3. Publish to the official MCP Registry (domain ownership proven over HTTP via
106
112
  `https://aicommander.dev/.well-known/mcp-registry-auth`, served by the Worker):
package/dist/bin/mcp.js CHANGED
@@ -24,6 +24,44 @@ function ownVersion() {
24
24
  }
25
25
  return "0.0.0";
26
26
  }
27
+ const cliArg = process.argv[2];
28
+ if (cliArg === "--version" || cliArg === "-V" || cliArg === "version") {
29
+ console.log(ownVersion());
30
+ process.exit(0);
31
+ }
32
+ if (cliArg === "--help" || cliArg === "-h" || cliArg === "help") {
33
+ console.log(`AI Commander MCP ${ownVersion()}
34
+
35
+ Remote shell and detached long-running jobs for AI agents.
36
+
37
+ Usage:
38
+ npx -y @aicommander/mcp
39
+
40
+ Environment:
41
+ AICOMMANDER_TOKEN Optional account API key for aliases and saved machines
42
+ AICOMMANDER_SERVER Relay base URL (default: https://aicommander.dev)
43
+
44
+ Tools:
45
+ remote_exec Run a short remote shell command (max 1 hour / 1 MiB)
46
+ session_status Check one machine and discover its GPUs
47
+ list_machines List account machines and GPUs
48
+ remote_screenshot Capture an opted-in macOS/Windows screen
49
+ remote_job_start Start detached long work and return a jobId immediately
50
+ remote_job_list List running and recently retained jobs
51
+ remote_job_status Poll running / exited / unknown state
52
+ remote_job_logs Read bounded, pageable stdout+stderr
53
+ remote_job_cancel Stop the full process tree and release its GPU
54
+
55
+ Use remote_exec for seconds/minutes. Use remote_job_start for builds, downloads,
56
+ batch processing, rendering, fine-tuning, ML training, or anything that could run
57
+ longer than a few minutes. Jobs continue after the call and conversation end.
58
+ On macOS/Windows they also survive an agent restart; on Linux restarting or
59
+ upgrading the agent's systemd service stops its jobs.
60
+
61
+ Docs: https://aicommander.dev/docs/#jobs
62
+ Guide: https://aicommander.dev/use-cases/ml-training-jobs/`);
63
+ process.exit(0);
64
+ }
27
65
  const SERVER_URL = process.env["AICOMMANDER_SERVER"] ?? "https://aicommander.dev";
28
66
  // Optional ACCOUNT token (an account API key or OAuth access token). If set, it
29
67
  // signs you into your AI Commander account — saved machines, aliases, account
@@ -440,8 +478,9 @@ server.registerTool("remote_job_list", {
440
478
  "still retained (about a week). USE THIS to answer \"what is running on the GPU box?\", to find the jobId of " +
441
479
  "work started in an earlier conversation, or before starting new GPU work so you don't collide with an existing " +
442
480
  "run. Each entry has the jobId, name, status (running / exited / unknown), exit code, start and end times, the " +
443
- "reserved GPU index if any, and the current size of its output log. `unknown` means the agent restarted while " +
444
- "that job was running and the process is gone with no exit code recorded — the outcome is genuinely unknown, do " +
481
+ "reserved GPU index if any, and the current size of its output log. `unknown` means the process is gone with no " +
482
+ "exit code recorded — an agent restart, SIGKILL, OOM kill, escalated cancel, or any Windows cancel can cause it; " +
483
+ "the outcome is genuinely unknown, so do " +
445
484
  "NOT report it as success. Name the machine with `code` exactly as the user said it — an AIC- session code " +
446
485
  "(e.g. AIC-XYZ-1234) or, when authenticated with an API key, a saved alias or hostname such as 'wearfits-m3'; " +
447
486
  "if the user's text contains 'aic-'/'AIC-' in any case, that is one of their machines. Command strings are " +
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aicommander/mcp",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "mcpName": "dev.aicommander/mcp",
5
- "description": "MCP server for remote command execution — run shell/bash commands on remote machines, servers and laptops from your AI agent (Claude, Codex, any stdio MCP client). An SSH / Ansible alternative with no exposed SSH, open ports or VPN; drive machines by AIC-… session code or saved alias/hostname.",
5
+ "description": "Remote shell and long-running background jobs for AI agents. Let Claude, Codex, ChatGPT or any MCP client run commands, builds, batch work and GPU/ML training on your own machines without exposed SSH, open ports or VPN.",
6
6
  "keywords": [
7
7
  "ssh",
8
8
  "remote",
@@ -11,6 +11,15 @@
11
11
  "remote-access",
12
12
  "remote-management",
13
13
  "remote-shell",
14
+ "remote-jobs",
15
+ "background-jobs",
16
+ "long-running-jobs",
17
+ "gpu",
18
+ "gpu-compute",
19
+ "machine-learning",
20
+ "ml-training",
21
+ "fine-tuning",
22
+ "batch-processing",
14
23
  "shell",
15
24
  "bash",
16
25
  "terminal",
@@ -29,6 +38,14 @@
29
38
  "aicommander"
30
39
  ],
31
40
  "homepage": "https://aicommander.dev",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/lksrz/aicommander.git",
44
+ "directory": "packages/mcp"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/lksrz/aicommander/issues"
48
+ },
32
49
  "license": "MIT",
33
50
  "type": "module",
34
51
  "bin": {