tui-mcp
What Chrome DevTools MCP is for the browser, tui-mcp is for the terminal.
Launch any terminal app in a managed pty, take screenshots, read text, send keystrokes. The app thinks it's running in a real terminal. Works with any TUI framework or no framework at all - vim, htop, bubbletea, textual, ink, inquirer, trend, ncurses, whatever.
How is this different from a bash tool?
A bash tool runs discrete commands - each invocation is fire-and-forget. The process exits, the output comes back. tui-mcp maintains a persistent, interactive session. The pty stays alive between calls. This matters when:
- The tool has state - you're in a
mysqlshell, you'veUSEd a database, you're in a transaction. A bash tool can't hold that session open between calls. - The tool has UI - htop, vim, k9s, lazygit. A bash tool gets garbage back because these apps paint full-screen interfaces with ANSI escape codes. tui-mcp renders them into a readable screenshot or text snapshot through xterm emulation.
- The interaction is multi-step - SSH prompts for a password, then a 2FA code, then you're in. An interactive installer asks questions.
git rebase -idrops you into an editor. These are conversational flows that a stateless bash tool can't handle. - You need to watch something - tail a log, monitor a build, wait for a deploy to finish. The session stays open, the agent can snapshot whenever it wants to check progress.
- The tool requires a TTY - some CLIs behave differently (or refuse to run) without a real terminal. node-pty gives them a real pty with
xterm-256color, so everything works as expected.






