Tui MCP logo

Tui MCP

by nvms

Operate persistent terminal sessions over MCP, including TUI apps, interactive CLIs, screenshots, text snapshots, and keystrokes.

Install Tui MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "nvms-tui-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "tui-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The nvms/tui-mcp MCP server launches terminal applications in persistent pseudo-terminal sessions and exposes them to an MCP client. Agents can inspect rendered terminal state as screenshots or text, send keyboard and mouse input, resize sessions, and wait for output or process completion. It suits interactive TUIs, stateful command-line workflows, monitoring tasks, and programs that require a real TTY rather than one-shot shell execution. Reach for it when an agent needs to operate software through the terminal UI instead of calling a dedicated API.

Use cases

  • Operate an interactive database shell across multiple steps
  • Monitor logs or builds in a persistent terminal session
  • Drive full-screen tools such as editors, dashboards, or system monitors
  • Handle installers, SSH prompts, and other conversational CLI flows
  • Run several terminal sessions for tests, services, and debugging

Key features

  • Persistent managed pseudo-terminal sessions
  • PNG screenshots and text-based terminal inspection
  • Keyboard, text, and mouse input
  • Session lifecycle and exit-state management
  • Regex, idle, and process-exit waiting
  • Terminal monitor for observing and controlling sessions

Tools17

What Tui MCP lets your agent do. Expand a tool for its parameters.

Self-reported~186 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

4/4 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · tui-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars14Stargazers on the source repository.
npm downloads118Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Tools exposed17Callable tools this server registers over MCP.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How Tui MCP works

What nvms/tui-mcp does

The nvms/tui-mcp MCP server gives an agent a persistent terminal session for launching and operating command-line applications. Each application runs in a managed pseudo-terminal, so it can behave as if a person opened a real terminal. This supports full-screen interfaces and interactive programs, including applications built with different TUI frameworks or with no framework.

Unlike a one-shot shell command, a session remains available across MCP calls. That makes it possible to preserve state in programs such as database shells, continue through multi-step prompts, watch a long-running process, or work inside an interactive editor or debugger. The server does not target one product API; it exposes the terminal interaction layer used by many command-line programs.

How it works

The application runs through node-pty, which provides a pseudo-terminal configured with xterm-256color. Terminal output is parsed by xterm-headless, allowing the server to expose the resulting buffer to MCP tools. The flow is application to pseudo-terminal to terminal emulator to MCP operations.

The nvms/tui-mcp MCP server can return a rendered PNG, plain terminal text, scrolled-off history, a selected rectangular region, cursor coordinates, or the unprocessed pty byte stream. Input can be sent as individual keys or combinations, text, and mouse events. Waiting tools can pause until a regular expression appears, the terminal becomes idle, or the process exits.

Setup and configuration

The README provides this Claude MCP setup command:

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

The package is started with npx tui-mcp. A separate terminal monitor can be started with:

Terminal
npx tui-mcp monitor

The monitor discovers running tui-mcp servers on the machine and displays their sessions with a live ANSI-rendered preview. It can attach to sessions, launch new ones, show scrollback, and terminate selected sessions. Attach, launch, kill, and scrollback require server version 1.2 or newer; older sessions can still be observed in read-only mode.

Tools and capabilities

The server exposes tools for the complete session lifecycle:

  • launch, kill, list_sessions, and status manage processes and report session state or exit codes.
  • resize changes terminal dimensions.
  • screenshot, snapshot, scrollback, output, read_region, and cursor inspect terminal contents and position.
  • send_keys, send_text, and send_mouse provide keyboard, text, and pointer input.
  • wait_for_text, wait_for_idle, and wait_for_exit coordinate actions with terminal or process state.

Limitations and notes

The nvms/tui-mcp MCP server provides terminal-level interaction rather than a specialized integration for a particular CLI, database, cloud platform, or operating system service. The target application must be available in the environment where the server runs. Raw pty output includes escape sequences, while rendered or text-oriented inspection is available through separate tools. Session control and observation depend on the server version noted above.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Tui MCP

nvms/tui-mcp is an MCP server that connects AI agents to terminal applications through persistent pseudo-terminal sessions. Its main tools launch and manage sessions, capture screenshots or text, send keys, text, and mouse events, inspect terminal state, and wait for matching output, idle activity, or process exit.

Install it for Claude with `claude mcp add --scope user tui-mcp -- npx tui-mcp`.

It can control terminal applications that run in a pseudo-terminal, including interactive CLIs, full-screen TUIs, editors, database shells, debuggers, and other programs that require a TTY. It sends keys, text, and mouse events and reads rendered or raw terminal output.

Run `npx tui-mcp monitor` to open the terminal monitor. It discovers running tui-mcp servers, shows session previews, and supports attaching, launching, viewing scrollback, and killing sessions when the server is version 1.2 or newer.

It shows a standard MCP command for Claude and describes MCP tools, but it does not explicitly confirm compatibility with Cursor.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewTui MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/nvms-tui-mcp?style=directory)](https://allmcps.com/mcp/nvms-tui-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/nvms-tui-mcp"><img src="https://allmcps.com/api/badge/nvms-tui-mcp?style=directory" alt="Tui MCP on AllMCPs" /></a>