Terminator
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terminator Spawn a bash session, run ls -la, and screenshot the output"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terminator
Playwright for terminals — an MCP server that lets AI agents interact with CLI applications.
Terminator wraps tmux to give AI agents the ability to spawn CLI processes, type into them, read what's on screen, and assert on the output. It's like Playwright, but for terminal applications instead of web browsers.
Why
Testing CLI applications today means either:
A human manually runs commands and eyeballs the output
Fragile
expect-style scripts that match on raw byte streams
Terminator gives you a virtual terminal with a proper PTY, ANSI rendering, and a screen buffer — exactly what a human sees. An AI agent (or any test script) can spawn a process, interact with it, take "screenshots" of the rendered terminal, and assert on the visible output.
Related MCP server: shell-use
Prerequisites
Node.js >= 20
tmux >= 3.0 (
brew install tmuxon macOS,apt install tmuxon Linux)
Installation
npm install -g terminator-mcpOr clone and build from source:
git clone https://github.com/silver83/terminator.git
cd terminator
npm install
npm run buildUsage with Claude Code
Add to your Claude Code MCP config (~/.claude/settings.json):
{
"mcpServers": {
"terminator": {
"command": "node",
"args": ["/path/to/terminator/build/index.js"]
}
}
}Then Claude can use the terminal tools directly:
"Spawn a bash session, run
ls -la, and tell me what files are in the directory"
Tools
Tool | Description |
| Start a CLI process in a virtual terminal |
| Type text into the terminal |
| Send special keys (Enter, Escape, Ctrl-C, Tab, arrows, etc.) |
| Capture what the user currently sees (rendered text) |
| Poll until a regex pattern appears on screen |
| Assert screen contains expected text or pattern |
| Close the terminal session |
Example: Testing a CLI application
# 1. Spawn the application
terminal_spawn(command: "python3")
# 2. Wait for the REPL to load
terminal_wait_for(pattern: ">>>")
# 3. Type a command
terminal_type(text: "print('hello world')")
terminal_send_key(key: "enter")
# 4. Wait for output and verify
terminal_wait_for(pattern: "hello world")
terminal_assert(text: "hello world")
# 5. Clean up
terminal_send_key(key: "ctrl-d")
terminal_close()Example: Testing an interactive prompt
# Spawn an app that shows an interactive prompt
terminal_spawn(command: "my-cli-tool")
# Wait for the prompt to render
terminal_wait_for(pattern: "Are you sure\\?")
# Take a screenshot to see the full UI
terminal_screenshot()
# Type a response
terminal_type(text: "y")
terminal_send_key(key: "enter")
# Verify the result
terminal_wait_for(pattern: "Done!")
terminal_assert(text: "Done!")How it works
Terminator is a thin MCP server that delegates to tmux:
Spawn =
tmux new-session -d -s <id> -x <cols> -y <rows> <command>Type =
tmux send-keys -t <id> -l <text>(literal characters)Send key =
tmux send-keys -t <id> <key>(interpreted key names)Screenshot =
tmux capture-pane -t <id> -p(rendered text, ANSI stripped)Wait for = polling loop over
capture-paneuntil regex matchesAssert =
capture-pane+ string/regex matchClose =
tmux kill-session -t <id>
tmux handles all the hard parts: PTY allocation, ANSI escape sequence parsing, screen buffer management, and terminal rendering. Terminator just exposes it as MCP tools.
Running tests
npm run build
npm testLicense
MIT
Available Tools
9 toolsterminal_assertA
Assert that the terminal screen contains expected text or matches a regex pattern. Returns pass/fail with the current screen content and a human-readable message.
Inputs: text (required), session_id (required), regex.
terminal_closeA
Close a terminal session and kill the underlying process. Idempotent — safe to call on already-closed sessions.
Inputs: session_id (required).
terminal_exportA
Export the session recording as an asciicast v2 (.cast) file, playable in asciinema-player or asciinema.org. Recording happens automatically — every type, send_key, and screenshot is captured with timing.
Inputs: session_id (required), save_path.
terminal_screenshotA
Capture what the user currently sees in the terminal — the rendered text grid with ANSI escape sequences stripped. This is the equivalent of looking at the screen.
Inputs: session_id (required).
terminal_send_keyB
Send a special key to the terminal. Supported keys: enter, escape, tab, space, backspace, delete, up, down, left, right, home, end, pageup, pagedown, ctrl-c, ctrl-d, ctrl-z, ctrl-l, ctrl-a, ctrl-e, ctrl-k, ctrl-u, ctrl-w, ctrl-r, ctrl-p, ctrl-n.
Inputs: key (required), session_id (required).
terminal_spawnA
Start a CLI process in a virtual terminal (tmux session). Returns a session_id for subsequent interactions. The process runs in a real PTY with proper ANSI rendering.
Inputs: command (required), env, args, cols, +1 more.
terminal_traceA
Retrieve the recorded trace of all terminal operations since the server started. Each event has a t_ms timestamp, event type, session ID, and operation-specific fields. Useful for debugging timing issues, sharing with AI agents for analysis, or saving as a test artifact.
Inputs: save_path, session_id.
terminal_typeA
Type text into the terminal. Characters are sent literally (no key name interpretation). Use terminal_send_key for special keys like Enter or Ctrl-C.
Inputs: text (required), session_id (required), delay_ms.
terminal_wait_forA
Poll the terminal screen until a regex pattern appears or timeout is reached. Useful for waiting for prompts, output, or UI elements to render.
Inputs: pattern (required), session_id (required), timeout_ms, interval_ms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool maps to a distinct terminal operation: spawn, type, send_key, read screen, poll, assert, close, export, trace. The main soft overlap is between terminal_screenshot, terminal_wait_for, and terminal_assert, which all inspect screen content, though their return semantics (snapshot vs. blocking poll vs. pass/fail assertion) are described clearly enough to distinguish.
Every tool uses the same terminal_ prefix followed by a snake_case verb or noun (terminal_spawn, terminal_send_key, terminal_wait_for). The pattern is fully predictable and readable.
Nine tools is well-scoped for a PTY automation server: input, observation, synchronization, assertion, lifecycle, and recording each get dedicated coverage without redundancy.
The lifecycle is essentially covered: spawn, drive, observe, wait, assert, close, plus recording export and trace for artifacts. Minor gaps remain—no list_sessions/exit-code or process-status retrieval and no terminal resize, which agents may need for multi-session or long-running workflows.
Maintenance
Related MCP Connectors
Email inboxes, webhook URLs, mock APIs and 170+ tools for coding agents over one MCP connection.
Secure Linux sandboxes for AI agents, as MCP tools.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to spawn, interact with, and orchestrate multiple concurrent terminal sessions via tmux.9MIT
- AlicenseAqualityDmaintenanceEnables agents to interact with CLI applications like vim, htop, and gdb by sending key inputs and capturing terminal output through tmux sessions.6MIT
- FlicenseNot gradedqualityCmaintenanceEnables end-to-end testing of CLI applications, REPLs, and TUIs by driving interactive pseudo-terminal sessions and reading clean rendered output through any MCP client.-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to interact with real terminal sessions across local and remote hosts, driving multi-turn interactive programs like TUIs, REPLs, and SSH prompts through MCP.72MIT