MCP server for persistent interactive terminals, stateful sessions, SSH connections, and background process management.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag โ we're steadily working through the catalog.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by PiloTY.
PiloTY (PTY for your AI Copilot) is an MCP server that gives an agent a persistent, interactive terminal.
If you have used Claude Code / Codex to run shell commands, you have probably hit the same wall: tool calls tend to be stateless. Each call starts "fresh", so environment variables disappear, interactive programs cannot be driven reliably, and long-running processes get cut off or orphaned while the agent is thinking.
PiloTY exists to make the agent's terminal behave more like a human's: start something in a real terminal, come back later, and keep going.
Warning: PiloTY exposes unrestricted terminal access. Treat it like giving the agent your keyboard.
tail -f, journalctl -f, kubectl logs -f, CI logs, service restarts.python, ipython, pdb).sudo, SSH passwords, key passphrases).less, man, top, vim can work, but cursor-heavy programs often require screen snapshots instead of plain text output.PiloTY is meant to be launched by an MCP client over stdio.
Add it to Codex CLI as an MCP server:
If you prefer SSH-based Git fetch:
If you already have a local clone:
Run the server command directly (without adding it to an MCP client):
One session is one real interactive terminal that stays alive across tool calls.
PiloTY keeps two representations:
output: incremental text stream (optionally ANSI-stripped)Public MCP results separate call outcome from terminal interpretation:
outcome: success, deadline_exceeded, eof, error, invalid_session, or terminatedterminal_state: best-effort rendered-state classification after the call (running, ready, password, confirm, repl, editor, pager, unknown)Sessions are addressed by a session_id string. Reusing the same id is what keeps state.
MCP does not expose a standard "client cwd" field, so the first step is always to create a session with an explicit working directory, then reuse the same session_id for subsequent calls.
Typical agent workflow:
session_id.send_line to submit a newline-terminated command, send_text for raw bytes, and send_control / send_signal for interrupts.wait_for_output for temporal PTY output waiting, wait_for_regex for content-based waits, and wait_for_shell_prompt after ssh or similar login flows.snapshot_screen / snapshot_scrollback when layout matters. Snapshot tools are passive and do not ingest fresh PTY bytes.send_password for secret entry; terminate the session when done.For exact tool names, arguments, and return fields, use your MCP client's tool schema or read piloty/mcp_server.py.
deadline_s is a wall-clock budget. On send/wait tools, it is not "process completion time".send_line, send_text, send_control, send_password, send_signal, wait_for_output) stop after the server quiescence policy (PILOTY_QUIESCENCE_MS, default 1000) or when deadline_s expires.wait_for_output can return partial output with outcome=deadline_exceeded if output started but the PTY never went quiet before the deadline.wait_for_regex first checks already-rendered scrollback, then waits on new PTY bytes.wait_for_shell_prompt consumes PTY output while it waits and returns the consumed bytes in output.send_password() suppresses transcript logging and terminal echo for that send. It does not prevent other prompts/programs from echoing secrets later.PILOTY_QUIESCENCE_MS (default 1000).Each server instance writes session logs under ~/.piloty/:
~/.piloty/servers/<server-instance-id>/sessions/<session-id>/transcript.log: raw PTY bytes (combined stdout/stderr)~/.piloty/servers/<server-instance-id>/sessions/<session-id>/commands.log: inputs sent (best-effort)~/.piloty/servers/<server-instance-id>/sessions/<session-id>/interaction.log: inputs plus captured output (best-effort)~/.piloty/servers/<server-instance-id>/sessions/<session-id>/session.json: metadata snapshot~/.piloty/active/<server-instance-id>/<session-id>: symlink to the current session directory (when symlinks are supported)Server logs default to /tmp/piloty.log.
tools/session_viewer.py can inspect sessions:
Repository layout:
Run tests:
License: Apache License 2.0, see LICENSE.
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/yiwenlu66-piloty)<a href="https://allmcps.com/mcp/yiwenlu66-piloty"><img src="https://allmcps.com/api/badge/yiwenlu66-piloty?style=directory" alt="PiloTY on AllMCPs" /></a>