Setup guide

Connect your AI client

Wire up AI Commander through MCP, plain REST, or an Agent Skill. Pick your client below, install the agent on a machine, then run quick shell commands or detached long-running jobs by quoting its machine code.

Are you an AI agent reading this? The complete, copy-paste onboarding is at aicommander.dev/llms-full.txt (concise index: /llms.txt). It has the exact command for each client and the tool reference. Read it, then run the setup for your user's client.

Before you start

The relay is already live at https://aicommander.dev/mcp. There is nothing to deploy or host. Connecting runs a one-time browser sign-in and binds the connector to your account (so saved-machine aliases resolve); for the quick no-account path, drive a machine by its code with https://aicommander.dev/mcp?anonymous=1. To use it, you need one thing:

  1. An agent running on the machine you want to control, showing a session code like AIC-7K3P-WX9M-RTBN. Install it below.

You drive a machine by quoting its session code in chat. The code is the credential: anyone who knows a current code can run commands until the owner resets the code or blocks their account. New codes work without an account for the first hour; sign in for ongoing access. See Security.

Optional — accounts. Sign in to save machines under friendly aliases and connect with a personal API key. After a machine is linked, you can use either its alias or raw code while the owner allows access. See Accounts.
Two transports. Some clients connect over remote HTTP (Claude Code, opencode, Codex, ChatGPT, Claude Desktop connectors). Others run a local stdio process with @aicommander/mcp (pi, Cursor, Windsurf, Antigravity, and Claude Desktop's config file).

Install the agent

Run the agent on the machine you want to control. Pick your platform — the download or install command updates below.

Download the desktop app. It bundles the agent and gives you a small menu-bar UI to copy or reset the code, pause access, and get notified when a remote operator connects. No terminal needed.

Download for macOS

Apple Silicon (M1–M4) · Intel (x64)

Download the desktop app. It bundles the agent and gives you a tray UI to copy or reset the code, pause access, and get notified when a remote operator connects. No terminal needed.

Download for Windows

Windows x64

Use the signed release installer on the Linux box (server, VM, Raspberry Pi). It detects your CPU architecture and installs the agent as a systemd service that starts on boot. Do not pipe /install to sudo bash: that would execute mutable website content as root before it can authenticate itself.

Trust anchor required. Before continuing, confirm the Ed25519 public-key SPKI SHA-256 fingerprint 2d76d381fc8ed38e7dfb53882e14b2980ee105e0b49ff31cf55403e19e648407 through a channel independent of aicommander.dev (for example, directly with your operator). A fingerprint copied only from this page does not protect you if this website/CDN itself is compromised.
$ bash <<'AICOMMANDER_VERIFY'
set -euo pipefail
base="https://aicommander.dev"
expected_key_sha256="2d76d381fc8ed38e7dfb53882e14b2980ee105e0b49ff31cf55403e19e648407"

command -v curl >/dev/null || { echo "curl is required" >&2; exit 1; }
command -v openssl >/dev/null || { echo "OpenSSL 3.x is required" >&2; exit 1; }
case "$(openssl version 2>/dev/null)" in *LibreSSL*) echo "LibreSSL cannot verify this signature" >&2; exit 1;; esac
openssl_help="$(openssl pkeyutl -help 2>&1 || true)"
[[ "$openssl_help" == *"-rawin"* ]] || { echo "OpenSSL pkeyutl -rawin is required" >&2; exit 1; }

tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT
metadata="$(curl -fsS --proto '=https' --tlsv1.2 "$base/dist/latest")"
version="$(printf '%s' "$metadata" | sed -n 's/.*"version"[[:space:]]*:[[:space:]]*"\([0-9][0-9.]*\)".*/\1/p')"
[[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Invalid release version" >&2; exit 1; }

curl -fsS --proto '=https' --tlsv1.2 "$base/dist/v/$version/install" -o "$tmp/install"
curl -fsS --proto '=https' --tlsv1.2 "$base/dist/v/$version/install.sig" -o "$tmp/install.sig"
curl -fsS --proto '=https' --tlsv1.2 "$base/install.pub" -o "$tmp/install.pub"
[[ -s "$tmp/install" && -s "$tmp/install.sig" && -s "$tmp/install.pub" ]]

actual_key_sha256="$(openssl pkey -pubin -in "$tmp/install.pub" -outform DER 2>/dev/null | openssl dgst -sha256 | awk '{print $NF}')"
[[ "$actual_key_sha256" == "$expected_key_sha256" ]] || { echo "Signing-key fingerprint mismatch" >&2; exit 1; }
openssl pkeyutl -verify -pubin -inkey "$tmp/install.pub" -rawin \
  -in "$tmp/install" -sigfile "$tmp/install.sig" >/dev/null \
  || { echo "Installer signature verification failed" >&2; exit 1; }

sudo bash "$tmp/install"
AICOMMANDER_VERIFY

x86_64 & arm64 (systemd). Runs as root by default — guard the session code like a password.

Need a Node-managed foreground run (dev box, container, CI)? The same agent is also on npm as @aicommander/agent (needs Node ≥20 on the target):

$ npx @aicommander/agent
$ sudo npm i -g @aicommander/agent && sudo aicommander-agent install

npx is an ephemeral foreground run: it prints the full session code, but stops when the process or terminal closes and provides no service or reboot persistence. aicommander-agent install requires Linux with a running, reachable systemd manager; merely having a systemctl binary is not enough. On a compatible host it writes and enables aicommander-agent.service (logs/status keep the code masked — reveal it with sudo aicommander-agent status --reveal). Without systemd, use foreground mode only for temporary access, or configure aicommander-agent run under the platform's native init/process manager or a container restart policy for persistence. The native release flow verifies the installer before sudo and then enforces the binary checksum and Ed25519 signature; the npm package instead relies on npm registry/tarball integrity.

Full technical details and the session-code lifetime: The Linux agent.

Installer disappeared, or the machine never came online? On Windows the two usual causes are an account that isn't a local administrator (UAC elevates the installer to a different account and it exits silently) and security software treating a remote-administration tool as a threat — a false positive that can quarantine or delete files without ever mentioning antivirus in the symptoms. Both are diagnosed in Troubleshooting: the silent installer and antivirus blocks.

Pick your client

Choose the setup that matches the tool you already use:

CLI agents

Terminal coding agents. Most connect to the remote relay over HTTP with one command. The first use runs a one-time browser sign-in and binds the connector to your account; append ?anonymous=1 to the URL for the quick no-sign-in path (drive a machine by its code).

Native remote-HTTP MCP — nothing to install. The first connection opens a one-time browser sign-in and binds the connector to your account.

$ claude mcp add --transport http aicommander https://aicommander.dev/mcp

Verify with claude mcp list (look for aicommander: ✔ Connected), then mention a code in chat: "Run npm test on AIC-7K3P-WX9M-RTBN."

Skip the sign-in? Use https://aicommander.dev/mcp?anonymous=1 instead for the anonymous-by-code path (no account; works for a code's first hour).

Recent Codex connects to remote HTTP MCP servers directly:

$ codex mcp add aicommander --url https://aicommander.dev/mcp

The first connection runs a one-time browser sign-in and binds the connector to your account; append ?anonymous=1 to the URL for the no-sign-in anonymous-by-code path. Pass --url before the URL — without it Codex treats the address as a command and fails with os error 2. Prefer a local stdio process? Add this to ~/.codex/config.toml instead:

[mcp_servers.aicommander]
command = "npx"
args = ["-y", "@aicommander/mcp"]
env = { AICOMMANDER_SERVER = "https://aicommander.dev" }

On Windows use command = "npx.cmd" for the stdio variant — plain npx resolves to npx.exe and the spawn fails with the same os error 2.

opencode connects to remote HTTP MCP servers directly:

$ opencode mcp add aicommander --url https://aicommander.dev/mcp

The first connection runs a one-time browser sign-in and binds the connector to your account; append ?anonymous=1 to the URL for the no-sign-in anonymous-by-code path. For the optional account features, attach your API key as an environment variable: add --env AICOMMANDER_TOKEN=<your-key> to the command. Then aliases work — see Accounts.

pi installs the @aicommander/mcp stdio bridge from npm:

$ pi install npm:@aicommander/mcp

The bridge defaults to the hosted relay (https://aicommander.dev), so no extra config is needed to drive a machine by raw code. For aliases, set AICOMMANDER_TOKEN=<your-key> in the bridge's environment — see Accounts.

Coding GUIs & IDEs

Editors and AI coding tools — Cursor, Windsurf, Antigravity, Zed, and others — accept an MCP server as JSON and run it locally over the same stdio bridge. The config is identical everywhere; only the file location differs:

{
  "mcpServers": {
    "aicommander": {
      "command": "npx",
      "args": ["-y", "@aicommander/mcp"],
      "env": {
        "AICOMMANDER_SERVER": "https://aicommander.dev"
      }
    }
  }
}

On Windows use "command": "npx.cmd". Add "AICOMMANDER_TOKEN": "<your-key>" to env for alias-based access. Restart the editor; the remote_exec and session_status tools appear.

Chat apps — ChatGPT & Claude (MCP connectors)

The desktop / web chat apps connect to the relay as a custom connector — a remote HTTPS MCP endpoint. Adding the connector runs a one-time browser sign-in and binds it to your account (so saved-machine aliases resolve); the client auto-registers, so no manual credentials are needed. For the quick no-sign-in path, point it at https://aicommander.dev/mcp?anonymous=1 instead. A confidential OAuth client (Client ID + Client Secret) is an optional way to authenticate — see Optional: pre-provisioned OAuth credentials below.

ChatGPT

Settings → Connectors → Advanced / Developer mode → Add custom connector:

Note. Custom MCP connectors require a ChatGPT plan that exposes developer mode / connectors, and the relay must be reachable from the public internet (it is).

Claude Desktop

Custom connector (recommended): Settings → Connectors → Add custom connector, URL https://aicommander.dev/mcp, leave auth empty — the connector auto-registers and you complete a one-time browser sign-in that binds it to your account. (For the anonymous-by-code path use https://aicommander.dev/mcp?anonymous=1; for a client that needs pre-provisioned credentials, paste a Client ID + Client Secret — see below.) Or use the stdio config file claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/) with the same JSON as the IDE config above, then restart Claude Desktop.

Optional: pre-provisioned OAuth credentials (Client ID + Secret)

Account binding is the default at https://aicommander.dev/mcp: just point the connector there and complete the one-time browser sign-in — the client auto-registers (Dynamic Client Registration), so most clients need no manual credentials. You only need a confidential OAuth client — a Client ID and a one-time Client Secret — for clients that require pre-provisioned credentials and can't self-register. You still complete the normal browser sign-in when you connect, and that interactive login is what decides which account the connector's access is bound to.

  1. In the dashboard, go to OAuth clients and create a client. For the Redirect URI, Claude (Desktop, web, mobile) uses the fixed callback https://claude.ai/api/mcp/auth_callback (pre-filled); Claude Code uses a local loopback, so add http://localhost/callback and http://127.0.0.1/callback. You get a Client ID and a one-time Client Secret.
  2. Point the connector at https://aicommander.dev/mcp and, in its Auth / advanced settings, paste the client_id and client_secret.
  3. Connect — Claude opens a browser sign-in; completing it binds the connector to your account.
Note. The Client ID/Secret is optional — only clients that need pre-provisioned OAuth credentials require it; everyone else can just connect to https://aicommander.dev/mcp and sign in. For the explicit anonymous opt-in (drive a machine by its code, no sign-in), append ?anonymous=1 to the URL: https://aicommander.dev/mcp?anonymous=1.
Note. The Client Secret is shown only once, at creation — copy it then; it cannot be retrieved later. You can revoke a confidential client at any time from the dashboard, and revocation takes effect immediately for every grant issued through it.
Connected apps. Every successful OAuth approval — public auto-registration or a confidential client — appears under Connected apps. Disconnect it there to invalidate its access and refresh tokens immediately. Refresh rotates on every use, and each rotation rolls the connector's window forward to 30 days from that refresh — measured from the latest refresh, not from the original approval — up to a 12-month ceiling, after which it asks for consent again. A connector you keep using never expires before that ceiling; one you abandon dies 30 days after its last refresh.

Chat apps without MCP

No connector support, or don't want to set one up? Any capable chat model — the ChatGPT app, the Claude app, or similar — can drive a machine if it can make HTTP requests through browsing, code interpreter, or a generic fetch tool. There is no config to paste; give it the relay, the machine code, and the goal.

Give it the relay, the machine's code, and the goal. For example:

# Paste this into ChatGPT / Claude (with web or tool access enabled)
Connect to my computer AIC-7K3P-WX9M-RTBN through aicommander.dev
and tell me its disk usage.

The REST API is documented at https://aicommander.dev/openapi.json
(POST https://aicommander.dev/api/v1/exec with JSON {"code","command"}).
No auth is needed for the first hour after a code is created or refreshed;
sign in (free) to use the code at any time after that.

The model can then call /api/v1/exec with the code and a command like df -h, read the JSON result, and answer. You can keep going in plain language ("now restart nginx", "tail the last 50 lines of the app log") and it will make new calls as needed.

Make it reliable. If the model is unsure, point it at aicommander.dev/llms-full.txt for onboarding and /openapi.json for the machine-readable API. With an account, give it an API key (Authorization: Bearer <key>) so it can reach machines by alias — see Accounts.
Why this works. The same two operations behind MCP — run a command, check status — are plain HTTPS endpoints (next section). Anything that can call a URL can use AI Commander; MCP just makes it automatic.

Any MCP client (raw HTTP+SSE)

The relay speaks standard MCP over HTTP with SSE responses. Point any compliant client at:

# Endpoint — no auth header needed
POST https://aicommander.dev/mcp
Accept: text/event-stream

Tools exposed include remote_exec(code, command, cwd?, timeout_ms?), session_status(code), detached jobs, file transfer, and (with an API key) list_machines(). Command output is buffered; SSE carries heartbeats while exec runs and one final result event.

REST API & Agent Skill (no MCP needed)

If your client doesn't speak MCP — or you want a single HTTP call — use the REST API. Auth matches MCP: no token means anonymous access during a code's first hour, while Authorization: Bearer <api-key> enables alias-based access after sign-in. There is no OAuth browser flow on this surface; REST clients paste an API key.

# Is the machine online?
$ curl -s https://aicommander.dev/api/v1/status/AIC-7K3P-WX9M-RTBN

# Run a command (buffered JSON result)
$ curl -s -X POST https://aicommander.dev/api/v1/exec \
    -H 'Content-Type: application/json' \
    -d '{"code":"AIC-7K3P-WX9M-RTBN","command":"df -h"}'

The exec response is { "ok": true, "exitCode": 0, "stdout": "…", "stderr": "…", "truncated": false }. Add "cwd" and "timeout_ms" as needed. With Accept: text/event-stream, the server sends heartbeat comments while the command runs and one final result event; stdout and stderr are still buffered. Machine-readable spec: /openapi.json.

Install the Agent Skill (instead of the MCP server)

SKILL.md is an open Agent Skills format supported by Claude Code and other agents. If you prefer a skill over an MCP server, install the hosted AI Commander skill into your agent's skills directory. It is served from the relay, so there is nothing to clone. The example below uses Claude's ~/.claude/skills/ location; point it at your agent's skills folder if it differs:

$ mkdir -p ~/.claude/skills/aicommander && \
    curl -fsSL https://aicommander.dev/skill/SKILL.md -o ~/.claude/skills/aicommander/SKILL.md

Your agent auto-loads it on the next session — quote an AIC-… code and it drives the machine over the REST API, with no MCP server to add and no OAuth. View the skill: /skill/SKILL.md.

Installing the agent on a QNAP NAS (separate skill)

QNAP's QTS / QuTS hero is not a normal Linux distribution: there is no systemd, /usr/local and /etc are rebuilt from a ramdisk at every boot, and the standard installer fails there with curl: (23) Failure writing output to destination. A second, install-time skill walks an agent through the procedure that works. Install it only when the target machine is a QNAP NAS:

$ mkdir -p ~/.claude/skills/aicommander-qnap && \
    curl -fsSL https://aicommander.dev/skill/qnap/SKILL.md -o ~/.claude/skills/aicommander-qnap/SKILL.md

View the skill: /skill/qnap/SKILL.md.

Running GPU / long jobs (separate skill)

Heavy work — PyTorch training, fine-tuning, dataset processing, long builds — is exactly the work that dies with the session that started it: normally you'd babysit it over ssh with tmux and nohup, and hope the laptop stays awake. Run it as a detached job instead of a plain remote_exec / POST /api/v1/exec command. A third skill covers those tools and the conventions around them: picking a machine from its reported GPUs, a uv workspace per run, reserving a card with gpu_index, paging a training log, keeping model caches off the system partition, and getting artifacts off the box. Install it when the user has a GPU machine:

$ mkdir -p ~/.claude/skills/aicommander-gpu && \
    curl -fsSL https://aicommander.dev/skill/gpu/SKILL.md -o ~/.claude/skills/aicommander-gpu/SKILL.md

View the skill: /skill/gpu/SKILL.md.

Long-running jobs

A training run, a long build, or an overnight dataset job shouldn't need a session kept alive. Start it as a detached job: the call returns a jobId straight away and the work keeps running on your machine after the chat ends and after your client disconnects. No tmux, no screen, nothing to keep open. A job also outlives the agent itself restarting on all three platforms; on Linux each job started by an agent that already has this feature is launched into its own transient systemd scope, outside the agent service's control group, so stopping or restarting the service — an agent upgrade included — leaves it running, provided the box runs systemd and the agent runs as root. Without both, jobs stay in the service's control group and a restart still ends them, and a job that was already running when the agent was upgraded to that version is in no scope either, so the upgrade's own restart ends it. See Start ML training on your own GPU for the full walkthrough.

From an MCP client — just ask

Five tools cover the whole lifecycle. In practice you phrase it in plain language and the client picks the tool:

Passing gpu_index reserves that NVIDIA card for the job, so a second run asking for the same card is refused (gpu_busy, naming the holder) rather than both runs hitting CUDA OOM. On agents 1.0.50 and newer, when the machine's GPU list is known, an index that is not on it is refused with invalid_request rather than starting a phantom job; an older agent takes any in-range index and lets the job fail inside CUDA. Jobs have no elevated option.

Over REST

Same operations, same authorization as /api/v1/exec. code goes in the JSON body for the POST and as a query parameter everywhere else:

# Start a job — returns the jobId immediately
$ curl -s -X POST https://aicommander.dev/api/v1/jobs \
    -H 'Authorization: Bearer YOUR_API_KEY' -H 'Content-Type: application/json' \
    -d '{"code":"gpu-box","command":"./.venv/bin/python train.py","cwd":"/home/u/aic-jobs/mytrain","name":"mytrain","gpu_index":0}'

# → {"ok":true,"job":{"jobId":"9f2c1b7ad4e05386","name":"mytrain","status":"running","exitCode":null,"gpuIndex":0,"logBytes":0,"truncated":false, …}}

# List jobs on the machine
$ curl -s 'https://aicommander.dev/api/v1/jobs?code=gpu-box'                       -H 'Authorization: Bearer YOUR_API_KEY'

# Poll one job's status
$ curl -s 'https://aicommander.dev/api/v1/jobs/9f2c1b7ad4e05386?code=gpu-box'      -H 'Authorization: Bearer YOUR_API_KEY'

# Tail the log, then follow it with offset_bytes=<nextOffsetBytes>
$ curl -s 'https://aicommander.dev/api/v1/jobs/9f2c1b7ad4e05386/logs?code=gpu-box&tail_lines=200' -H 'Authorization: Bearer YOUR_API_KEY'
$ curl -s 'https://aicommander.dev/api/v1/jobs/9f2c1b7ad4e05386/logs?code=gpu-box&offset_bytes=131072' -H 'Authorization: Bearer YOUR_API_KEY'

# Cancel it
$ curl -s -X DELETE 'https://aicommander.dev/api/v1/jobs/9f2c1b7ad4e05386?code=gpu-box' -H 'Authorization: Bearer YOUR_API_KEY'

A log reply is { "ok": true, "logs": { "chunk": "<base64>", "offsetBytes": …, "nextOffsetBytes": …, "eof": …, "truncated": … } }chunk is base64 because process output is arbitrary bytes. eof: true means you've read to the current end of the file, not that the job finished. Machine-side refusals get their own status: 409 gpu_busy, 429 too_many_jobs, 404 not_found, 400 invalid_request. Full reference: Docs → Detached jobs.

To get a checkpoint or a render off the machine, use POST /api/v1/pull — it returns a download link, and access to the stored copy ends after 24 hours. An hourly, retrying sweep removes inaccessible expired bytes afterward. Above its 100 MiB limit, have the job push the artifact to storage you already control (aws s3 cp, rclone, scp) as its final step.

Accounts & API keys

You can try a fresh machine code without an account for the first hour. For ongoing access, sign in with a passkey or email magic link — no password. An account lets you:

With an API key set (Authorization: Bearer <key>, or AICOMMANDER_TOKEN=<key> for the @aicommander/mcp stdio bridge), remote_exec and session_status accept either a raw AIC-… code or one of your aliases.

Owner controls — who can reach your machine

The machine's owner stays in charge of access at all times:

Keys and OAuth connectors need the dashboard opened every 24h. For security, a personal API key — and any OAuth connector on your account — only works over MCP/HTTP while you've opened the dashboard within the last 24 hours — just opening it (or a fresh sign-in, or clicking Reactivate) re-arms the window. If it lapses, the key keeps its value but stops acting: over HTTP you get a "reactivation required" reply, and over MCP a friendly "open the dashboard to reactivate" notice — so a leaked key is useless to anyone who can't also open your dashboard. A paused OAuth connector behaves the same way — it stays installed and authorized, and simply reports that it's paused until you open the dashboard. It never asks you to re-authorize it: the connector and its tokens keep working, so signing in is all it takes. (A connector's own authorization lives for 30 days of inactivity, rolling forward every time it's used, up to a 12-month maximum before it asks for consent again; you can revoke one at any moment under Connected apps.) This bounds the blast radius of a leaked credential to 24 hours. Running unattended automation (CI/cron) where opening a dashboard daily isn't practical? Turn the gate off per account under Credential security in the dashboard — one setting covering both API keys and OAuth connectors (this trades that protection away). Service tokens and first-hour session-code access are outside the gate.
OAuth (passwordless). Some clients (Codex, ChatGPT, Claude Desktop) can sign in via OAuth instead of an API key: when prompted, enter your email and type the one-time code we send you, on the same page. The client then gets a token bound to your account, so aliases work. After your first code sign-in the page offers to save a passkey — next time you can authorize with Face ID / Touch ID / Windows Hello / a security key instead of waiting for a code. (Prefer a single API key for CLI / loopback clients — it's simpler.)

Service tokens — for automation

remote_exec and /api/v1/exec give an AI root-level, interactive access — great when you're driving the machine yourself. For unattended work — a cron job, a CI step, or one AI agent calling another with claude -p — there's a deliberately narrower lane: secure exec, driven by a service token. It's the opposite of the root path: a non-root sandbox, pinned to one machine, limited to an allowlist of commands.

Create a token in the dashboard (Service tokens → pick a machine → choose allowed commands) — the plaintext token (aics_…) is shown once. Then call the secure-exec endpoint:

# Run an allowlisted command, non-root, on the pinned machine
$ curl -s -X POST https://aicommander.dev/api/v1/secure-exec \
    -H 'Authorization: Bearer aics_…' \
    -H 'Content-Type: application/json' \
    -d '{"argv":["df","-h"]}'

The response mirrors /api/v1/exec ({ "ok": true, "exitCode": 0, "stdout": "…", "stderr": "…", "truncated": false }, output capped at 8 MiB; add a base64 "input" for stdin, plus optional "cwd" / "timeout_ms"). Only a service token is accepted here — an account API key, admin token, or anonymous request is rejected. Create tokens in the dashboard; list/revoke them via /api/v1/secure-tokens and view recent runs via /api/v1/secure-exec/audit; full reference in the API docs.

Linux agent only; the denylist is not a sandbox. Secure exec needs the Linux agent running as root (it drops privileges itself); it isn't available through the desktop apps. The denylist covers known generic execution primitives but cannot classify every program or future plugin. The dedicated non-root uid/group boundary remains the containment mechanism. For claude -p inside the sandbox, provision the aicommander-exec user's own ~/.claude (or set CLAUDE_CONFIG_DIR).