Skip to content

aos serve

Expose this machine’s commands to other agents

3 commands. Run aos serve --help for the same list from the binary, or see every group.

Serve things over HTTP. mcp exposes every available non-blocking command as a typed tool on loopback, guarded by a per-run or pinned token (see using it from an agent (MCP)); tools previews the catalogue without starting a server. files serves a folder read-only with listings, on loopback or, with --lan, behind a random token for a phone on the same Wi-Fi (see serving files).

Serve a directory read-only over HTTP, with listings

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos serve files <dir> [--lan] [--port=<n>] [--for=<dur>] [--hidden] [--json]
flag values meaning
<dir> Required positional argument
--lan Optional
--port <n> Optional
--for <dur> Optional
--hidden Optional
--json Optional
Terminal window
aos serve files ./dist
aos serve files ~/Downloads --lan --for=10m # phone on the same wifi; URL carries a token
aos serve files . --port=8000 --json # one JSON line per request
aos service create share --now -- aos serve files ~/share --lan --port=8080 # keep it alive

Serve every command as an MCP tool over streamable HTTP

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos serve mcp [--addr=<host:port> | --socket=<path>] [--token=<k>] [--groups=<a,b>] [--gui=on|off|auto] [--quiet]
flag values meaning
--addr <host:port> Optional
--socket <path> Optional
--token <k> Optional
--groups <a,b> Optional. comma-separated
--gui on, off, auto Optional
--quiet Optional
Terminal window
aos serve mcp
aos serve mcp --socket=~/.aos/serve.sock # the host end of an SSH RemoteForward
aos serve mcp --addr=127.0.0.1:9000 --groups=window,capture,exec
aos serve mcp --gui=off # screenless tools only

Print the MCP tool catalogue this machine would expose

Under WSL / SSH: runs inside WSL (where aos was started). How the host works

Terminal window
aos serve tools [--groups=<a,b>]
flag values meaning
--groups <a,b> Optional. comma-separated
Terminal window
aos serve tools --groups=window