
Terminal MCP Server
Think Playwright but for terminal applications. This server lets AI agents interact with terminal UIs through structured snapshots that detect buttons, text fields, and other elements. You get operations like terminal_click to interact with UI components, terminal_wait_for to sync on text or idle states, and terminal_snapshot to capture the current state tree. Ships with visual mode using xterm on Linux/macOS or headless for CI environments. The use case is automating complex terminal applications like htop, vim, or custom TUIs where you need more than just shell command execution. Built in Rust, installed via npx, and works across Claude, Cursor, VS Code, and other MCP clients.
- GitHub stars
- 15
- tools
- 9
- transport
- STDIO
- env vars
- 2
- last updated
- Dec 9, 2025
Tools
9 toolsPublic tool metadata for what this MCP can expose to an agent.
terminal_startStart a terminal session. Auto-detects shell if omitted.6 params
Start a terminal session. Auto-detects shell if omitted.
colsintegercwdstringenvobjectnamestringrowsintegershellstringterminal_execRun a command in a session and wait for completion.6 params
Run a command in a session and wait for completion.
commandstringmaxLinesintegerminOutputBytesintegerquietExitMsintegersessionIdstringtimeoutintegerterminal_runRun a binary directly. shell=true for built-ins/pipes/redirects.12 params
Run a binary directly. shell=true for built-ins/pipes/redirects.
argsarraycmdstringcwdstringmaxOutputBytesintegerparsebooleanparseOnlybooleanshellbooleansuccessExitCodevaluesuccessFilestringsuccessFilePatternstringsummarybooleantimeoutintegerterminal_writeWrite raw data to a terminal session.2 params
Write raw data to a terminal session.
datastringsessionIdstringterminal_readRead new output from a terminal session.5 params
Read new output from a terminal session.
idleTimeoutintegermaxLinesintegersessionIdstringsinceintegertimeoutintegerterminal_waitWait for a pattern to appear in terminal output.5 params
Wait for a pattern to appear in terminal output.
patternstringreturnModestringtail · full · match-onlydefault: tailsessionIdstringtailLinesintegertimeoutintegerterminal_stopStop a terminal session.3 params
Stop a terminal session.
sessionIdstringsnapshotLinesintegertranscriptPathstringterminal_listList active terminal sessions.1 params
List active terminal sessions.
verbosebooleanterminal_extra8 more tools: terminal_run_paged, terminal_get_history, terminal_resize, terminal_send_key, terminal_watch, terminal_retry, terminal_diff, terminal_write_file. list=true for full schemas, or pass tool + args to call.3 params
8 more tools: terminal_run_paged, terminal_get_history, terminal_resize, terminal_send_key, terminal_watch, terminal_retry, terminal_diff, terminal_write_file. list=true for full schemas, or pass tool + args to call.
argsobjectlistbooleantoolstringSponsors
Configuration
DISPLAYX11 display for visual mode (Linux/WSL). Example: :0
RUST_LOGdefault: infoLogging level: error, warn, info, debug, trace
Readme
Terminal MCP Server
MCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.
Installation
Via npm (Recommended)
npx mcp-server-terminal
Via GitHub Releases
Download pre-built binaries from Releases.
Build from Source
git clone https://github.com/aybelatchane/mcp-server-terminal.git
cd mcp-server-terminal
cargo build --release
# Binary: ./target/release/terminal-mcp
Configuration
Claude
Claude Code (CLI)
claude mcp add terminal -- npx mcp-server-terminal
Claude Desktop
Details
- Repository
- github.com/aybelatchane/mcp-server-terminal
- Website
- github.com/aybelatchane/mcp-server-terminal
- Categories
- Web & Browser Automation, Developer Tools
- Package
mcp-server-terminal- Transport
- STDIO
- Registry
- MCP registry, active