# yiwenlu66/PiloTY [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/yiwenlu66/PiloTY  
**GitHub Stars:** 44  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/yiwenlu66-piloty

## Description
AI pilot for PTY operations enabling agents to control interactive terminals with stateful sessions, SSH connections, and background process management

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "piloty": {
    "command": "uvx",
    "args": ["--from","git+https://github.com/yiwenlu66/PiloTY.git","piloty"],
    "env": {
      "PILOTY_QUIESCENCE_MS": ""
    }
  }
}
```

**Requires environment variables:** `PILOTY_QUIESCENCE_MS` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What yiwenlu66/PiloTY MCP server does

yiwenlu66/PiloTY MCP server exposes a real interactive pseudo-terminal to an MCP client. Each session remains available after a tool call, allowing an agent to start a command, inspect its output later, and continue in the same shell. The session retains its current directory, environment variables, foreground process, REPL or debugger state, and active SSH connection.

The server is intended for workflows where ordinary shell execution is too short-lived or non-interactive. Examples include builds, migrations, test suites, log followers, service operations, Python REPLs, debuggers, remote administration, and terminal programs such as `less`, `man`, `top`, or `vim`.

PiloTY exposes unrestricted terminal access. It should therefore be treated as equivalent to giving the agent keyboard access to the host and any reachable remote session.

## How it works

Create a session with an explicit working directory, then pass the same `session_id` to later calls. MCP does not provide a standard client-working-directory field, so session creation is the starting point for a predictable workflow.

Commands and input can be sent as newline-terminated lines, raw text, control input, passwords, or signals. Waiting operations can collect output until the terminal becomes quiet, wait for a regular expression, or wait for a shell prompt. A prompt wait is useful after SSH or another login sequence.

The server tracks both an incremental output stream and a rendered terminal representation. Results distinguish call outcomes such as success, timeout, end-of-file, errors, invalid sessions, and termination from an inferred terminal state such as `running`, `ready`, `password`, `confirm`, `repl`, `editor`, or `pager`. Screen and scrollback snapshots are passive and do not consume newly arriving PTY bytes.

## Setup and configuration

The yiwenlu66/PiloTY MCP server is launched by an MCP client over stdio. With Codex CLI, install it from Git using `uvx`:

```bash
codex mcp add piloty -- uvx --from git+https://github.com/yiwenlu66/PiloTY.git piloty
```

A local checkout can instead be run with `uv --directory /path/to/PiloTY run piloty`. The server can also be started directly with `uvx` without registering it in a client. SSH-based Git fetching is supported through a Git SSH URL.

`PILOTY_QUIESCENCE_MS` controls the quiet period used by drain-based output collection and defaults to `1000` milliseconds. A custom shell-prompt regular expression can be configured when the default prompt detection is unsuitable.

## Tools and capabilities

The yiwenlu66/PiloTY MCP server provides capabilities for:

- Creating and reusing stateful terminal sessions.
- Sending lines, raw text, control characters, passwords, and signals.
- Waiting for output, matching text with a regular expression, or detecting a shell prompt.
- Taking rendered screen and scrollback snapshots for layout-sensitive programs.
- Keeping long-running local commands and SSH sessions available between calls.
- Supporting interactive password prompts, REPLs, debuggers, pagers, editors, and terminal interfaces.
- Recording session information for later inspection with the bundled session viewer.

Session data is written below `~/.piloty/`, including PTY transcripts, command records, interaction logs, metadata, and an active-session link where supported. The server log defaults to `/tmp/piloty.log`.

## Limitations and notes

A `deadline_s` value limits the wall-clock duration of a send or wait operation; it does not promise that the underlying process has finished. Drain-based calls stop when the quiescence policy is reached or the deadline expires. `wait_for_output` may return partial output with `deadline_exceeded` when output began but the PTY remains active.

Prompt and terminal-state detection are best effort and may be inaccurate for custom prompts or cursor-heavy applications. Plain text can misrepresent full-screen interfaces, so use screen snapshots when visual layout matters. Programs that emit periodic output can interfere with quiescence-based collection; adjust `PILOTY_QUIESCENCE_MS` when needed.

Password sending suppresses transcript logging and terminal echo for that specific send, but it cannot stop a later prompt or program from echoing secrets. Terminate sessions after sensitive work is complete.

_Full upstream README: https://allmcps.com/mcp/yiwenlu66-piloty/readme_

