list_sessions
List all active sessions
How to use it
Project documentation lists list_sessions for the Pty MCP MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
Install Pty MCP
claude mcp add pty-mcp -- /usr/local/bin/pty-mcpOther tools in Pty MCP (11)
Close a session (terminates remote PTY)
Start a local interactive terminal (bash, python3, node, etc.)
Connect to a serial port device
SSH to a remote host (supports SSH config aliases)
Disconnect but keep remote PTY running
List persistent sessions on a remote host
Read output, optionally wait for a pattern (waitfor, timeout, contextlines, taillines)
Resize the terminal window (rows/cols) for any session type
Send control keys (ctrl+c, ctrl+d, arrows, tab, etc.)
Send a command and wait for output to settle
Prompt the human operator for a secret via GUI dialog; sends it to the PTY session without exposing it to AI context or logs ¹