iflow-mcp_yiwenlu66-piloty
v0.3.0PiloTY: AI pilot for PTY operations via MCP - enables AI agents to control interactive terminals like a human.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_session
Create a PTY session with an explicit working directory. MCP does not provide a standard field for the client's current working directory. The caller must provide `cwd` explicitly.
| Parameter | Type | Description |
|---|---|---|
cwd * | string | |
session_id * | string | |
prompt_regex | ||
tag |
run
Execute a command in a stateful PTY session. Requires an existing session created via `create_session(session_id, cwd)`. Quiescence: reads until the PTY is silent for PILOTY_QUIESCENCE_MS (default 1000ms), or until `timeout` seconds elapse. Common SSH pattern: - create_session(session_id, cwd) - run(session_id, "ssh host", timeout=...) - expect_prompt(session_id, timeout=...) # wait for remote shell prompt
| Parameter | Type | Description |
|---|---|---|
command * | string | |
session_id * | string | |
strip_ansi | boolean | |
timeout | number |
send_input
Send raw input to a stateful terminal session (no newline added). Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
text * | string | |
strip_ansi | boolean | |
timeout | number |
send_password
Send a password plus newline. Requires an existing session created via `create_session(session_id, cwd)`. Security model: - Forces terminal echo off for this send operation (`echo=False`). - Disables transcript logging for this send operation (`log=False`). - Returns `output` as the literal string "[password sent]".
| Parameter | Type | Description |
|---|---|---|
password * | string | |
session_id * | string | |
timeout | number |
send_control
Send a control character to the terminal. Requires an existing session created via `create_session(session_id, cwd)`. Keys: - `c` sends Ctrl+C, commonly used to interrupt. - `d` sends Ctrl+D (EOF in many programs). - `z` sends Ctrl+Z (job control suspend). - `l` sends Ctrl+L (clear screen in many shells). - `[` or `escape` sends ESC. Returns the same shape as `run()`.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
session_id * | string | |
strip_ansi | boolean | |
timeout | number |
poll_output
Wait for new output without sending input. Requires an existing session created via `create_session(session_id, cwd)`. Quiescence: returns immediately once any output is observed and the PTY is silent for PILOTY_QUIESCENCE_MS (default 1000ms). Returns empty output only when `timeout` elapses without any output. If you need to wait for a shell prompt (e.g., after SSH), use expect_prompt().
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
strip_ansi | boolean | |
timeout | number |
get_screen
Get the current VT100-rendered terminal screen snapshot. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
get_scrollback
Get rendered terminal scrollback. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
lines | integer |
clear_scrollback
Clear rendered scrollback history while preserving current screen. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
expect
Wait for regex match in terminal output/scrollback. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | |
session_id * | string | |
strip_ansi | boolean | |
timeout | number |
expect_prompt
Wait until a shell prompt is detected (READY). Requires an existing session created via `create_session(session_id, cwd)`. Intended for SSH workflows where login banners and prompts may arrive after the initial `run()` returns. This avoids requiring agents to supply a fragile regex like r"[$#] ?$". Typical usage: - create_session(session_id, cwd) - run(session_id, "ssh host", timeout=2) - expect_prompt(session_id, timeout=30) - run(session_id, "cd /var/log", timeout=5) Notes: - This polls output internally; you do not need to call poll_output() i…
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
timeout | number |
get_metadata
Get metadata for an existing PTY session. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
list_sessions
configure_session
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
prompt_regex | ||
tag |
send_signal
Send an OS signal to the foreground process in a session. Requires an existing session created via `create_session(session_id, cwd)`.
| Parameter | Type | Description |
|---|---|---|
session_id * | string | |
signal * | string | |
strip_ansi | boolean |
transcript
Get the transcript file path for this session.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |
terminate
Terminate a PTY session. Future calls using the same `session_id` are rejected.
| Parameter | Type | Description |
|---|---|---|
session_id * | string |