MCP tools
alto mcp serves 7 tools over the Model Context Protocol, on standard input and output. Add it to
Claude Code with claude mcp add alto -- alto mcp. Each tool acts on the work pane linked to the
conversation unless told otherwise (session, device, or use). See
The MCP server for setup. Generated from alto 0.0.1.
run
Run a shell command in a terminal the person can see (their work pane, by default), typed at its prompt, and get back only the command's output and exit status as JSON: {output, exit, truncated, took, timed_out}. Refused, saying why, if something else is running there or someone has typed at the prompt.
| Argument | Type | What it is |
|---|---|---|
command required |
string |
The command, as you'd type it at the shell's prompt. |
timeout |
number |
Seconds to wait for it; it keeps running past them (then `wait`). Default: until it ends. |
max_lines |
integer |
Keep only the last this many lines of output (default 2000). |
session |
string |
A session's id (from list_sessions). Leave out for the work pane linked to this conversation, or what `use` chose. |
device |
string |
The device the session is on, by name (as `alto --on` takes it). Leave out for this one. |
wait
Wait until the terminal's program reaches a state (idle, working, needs-you, done; or prompt: the shell back at its prompt), or prints text matching a regular expression. Default: until the prompt.
| Argument | Type | What it is |
|---|---|---|
until |
prompt | idle | working | needs-you | done |
|
text |
string |
A regular expression to wait for in what it prints from now on. |
timeout |
number |
Seconds to wait at most. |
session |
string |
A session's id (from list_sessions). Leave out for the work pane linked to this conversation, or what `use` chose. |
device |
string |
The device the session is on, by name (as `alto --on` takes it). Leave out for this one. |
read_screen
What the terminal shows now, as text, with where the cursor is: for full-screen programs (an editor, less, top). With `last`, the last lines of its scrollback instead.
| Argument | Type | What it is |
|---|---|---|
last |
integer |
The last this many lines, scrollback included. |
session |
string |
A session's id (from list_sessions). Leave out for the work pane linked to this conversation, or what `use` chose. |
device |
string |
The device the session is on, by name (as `alto --on` takes it). Leave out for this one. |
send_keys
Type into the terminal: text, then keys by name (Enter, Escape, Tab, Up, PageDown, F5, q; with C-, M- or S- before it: C-c, M-x, S-Tab). For answering a program; for shell commands, use run.
| Argument | Type | What it is |
|---|---|---|
text |
string |
|
keys |
array |
|
session |
string |
A session's id (from list_sessions). Leave out for the work pane linked to this conversation, or what `use` chose. |
device |
string |
The device the session is on, by name (as `alto --on` takes it). Leave out for this one. |
work
The work panes linked to this conversation: terminals beside it, here or on other devices, where the other tools act by default.
No arguments.
list_sessions
The sessions on this device, or on another (`device`), with what each is doing.
| Argument | Type | What it is |
|---|---|---|
device |
string |
use
Act on this session (on `device`, if given) from now on in this conversation, instead of the work pane; or start one there with new: true. With nothing, back to the work pane.
| Argument | Type | What it is |
|---|---|---|
new |
boolean |
Start a new session (a shell, or `command`) and use it. |
command |
string |
With new: what it runs, in place of the login shell. |
session |
string |
A session's id (from list_sessions). Leave out for the work pane linked to this conversation, or what `use` chose. |
device |
string |
The device the session is on, by name (as `alto --on` takes it). Leave out for this one. |