Terminal

•
12
•

Manages persistent PTY sessions for interactive terminal use in AI clients, supporting SSH, REPLs, database CLIs, and TUI applications.

terminal-mcp addresses the limitations of AI code assistants that struggle with interactive terminal sessions, persistent connections, and special key inputs. It acts as an MCP server, providing real PTY (pseudo-terminal) sessions that enable AI clients to seamlessly interact with SSH, run multi-line REPLs (Python, Node.js), operate database CLIs (psql, mysql), and navigate TUI (Text User Interface) applications like htop or vim. The tool ensures session persistence across AI tool calls, supports complex terminal operations, and includes features like a dangerous command gate and intelligent output handling to enhance AI-driven terminal productivity.

Key Features

01Dangerous command gate for risky operations requiring confirmation
02Auto TUI detection and output diff mode to minimize token usage
032 GitHub stars
04Intelligent output truncation strategies and ANSI stripping
05Persistent PTY sessions that survive across tool calls
06Send input, control characters, or special keys to active sessions

Use Cases

01Interacting with database CLIs (e.g., psql, mysql) and navigating TUI applications (e.g., htop, vim) via AI commands.
02Managing interactive SSH sessions with remote servers from within an AI assistant.
03Operating multi-line REPLs for languages like Python or Node.js in an AI-driven workflow.