Terminal UI DevTools

Created By
nvms3 months ago
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.
Overview

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.

Server Config

{
  "mcpServers": {
    "tui-mcp": {
      "command": "npx",
      "args": [
        "tui-mcp"
      ]
    }
  }
}
Project Info
Created At
3 months ago
Updated At
3 months ago
Author Name
nvms
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Tavily Mcp
@tavily-ai

JavaScript
a year ago