MCP Hub
Back to servers

tui-mcp

What Chrome DevTools MCP is for the browser, tui-mcp is for the terminal. Launch any TUI app, take screenshots, send keystrokes, read text - works with any framework.

glama
Forks
1
Updated
Mar 13, 2026

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.

trend dashboard idea htop

Setup

claude mcp add --scope user tui-mcp -- npx tui-mcp

Tools

ToolDescription
launchSpawn a TUI app in a managed pty
killTerminate a session
list_sessionsList active sessions
resizeResize the terminal
screenshotCapture terminal as PNG
snapshotCapture terminal as plain text
read_regionRead a rectangular area of the buffer
cursorGet cursor position
send_keysSend a keystroke or combo (Enter, Ctrl+C, Up, q)
send_textType a string of characters
send_mouseSend mouse events
wait_for_textWait for a regex pattern to appear
wait_for_idleWait until the terminal stops changing

How it works

your app  <-->  node-pty  <-->  xterm-headless  <-->  MCP tools
                (pty)        (terminal emulator)    (screenshot, send_keys, etc.)

The app runs in a real pseudo-terminal via node-pty. Its output is parsed by xterm-headless (the same terminal emulator that powers VS Code's terminal, but without a DOM). The MCP tools read and interact with that parsed buffer.

Reviews

No reviews yet

Sign in to write a review