Smart Terminal

•
13
•

Provides AI clients and their agents with persistent, interactive shell access via pseudo-terminals, ensuring consistent workflow and state management.

Smart Terminal is a PTY-based Model Context Protocol (MCP) server designed to give AI clients and their agents robust, persistent, and interactive shell access. Unlike basic `exec`-based methods, it maintains shell sessions across steps, supporting bidirectional communication for interactive CLI tools, incremental reads, and consistent session state. This allows for a more predictable and portable terminal workflow for AI agents across various MCP-capable clients, enhancing reusability of prompts and improving handling of interactive programs like `vim` or `npm` prompts.

主な機能

014 GitHub stars
02Deterministic command completion and clean output for reliable automation
03Support for interactive reads, writes, and special key commands (e.g., Ctrl+C, arrow keys)
04Interactive and persistent PTY-backed shell sessions with stateful context
05Strong Windows support with shell auto-detection and blocking mitigations
06Advanced output handling including truncation, paging, pattern waiting, and history retrieval

ユースケース

01Establishing a portable and consistent terminal workflow across different AI clients
02Enabling reusable prompts and tooling for complex, terminal-driven automation tasks by AI agents
03Managing interactive CLI tools, REPLs, and installers that require persistent session state and TTY behavior