aybelatchane avatar

Terminal MCP Server

aybelatchane/mcp-server-terminal

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 tools

Public 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.

Parameters* required
colsinteger
default: 120
cwdstring
envobject
namestring
rowsinteger
default: 30
shellstring
terminal_execRun a command in a session and wait for completion.6 params

Run a command in a session and wait for completion.

Parameters* required
commandstring
maxLinesinteger
default: 200
minOutputBytesinteger
Min bytes before quiet exitdefault: 1
quietExitMsinteger
Exit if silent for N ms
sessionIdstring
timeoutinteger
default: 30000
terminal_runRun a binary directly. shell=true for built-ins/pipes/redirects.12 params

Run a binary directly. shell=true for built-ins/pipes/redirects.

Parameters* required
argsarray
cmdstring
cwdstring
maxOutputBytesinteger
default: 102400
parseboolean
Parse structured outputdefault: true
parseOnlyboolean
Omit raw when parseddefault: false
shellboolean
Run via system shelldefault: false
successExitCodevalue
null=anydefault: 0
successFilestring
successFilePatternstring
Regex
summaryboolean
default: false
timeoutinteger
default: 30000
terminal_writeWrite raw data to a terminal session.2 params

Write raw data to a terminal session.

Parameters* required
datastring
sessionIdstring
terminal_readRead new output from a terminal session.5 params

Read new output from a terminal session.

Parameters* required
idleTimeoutinteger
Must be < timeoutdefault: 500
maxLinesinteger
default: 200
sessionIdstring
sinceinteger
Byte position for inc. read
timeoutinteger
default: 30000
terminal_waitWait for a pattern to appear in terminal output.5 params

Wait for a pattern to appear in terminal output.

Parameters* required
patternstring
returnModestring
one of tail · full · match-onlydefault: tail
sessionIdstring
tailLinesinteger
default: 50
timeoutinteger
default: 30000
terminal_stopStop a terminal session.3 params

Stop a terminal session.

Parameters* required
sessionIdstring
snapshotLinesinteger
Return last N lines. 0 = none.default: 0
transcriptPathstring
Write history to this path
terminal_listList active terminal sessions.1 params

List active terminal sessions.

Parameters* required
verboseboolean
default: true
terminal_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.

Parameters* required
argsobject
listboolean
default: false
toolstring

Sponsors

Configuration

DISPLAY

X11 display for visual mode (Linux/WSL). Example: :0

RUST_LOGdefault: info

Logging level: error, warn, info, debug, trace

Readme

Terminal MCP Server

npm version npm downloads License: MIT

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

View the full README on GitHub

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

Related Web & Browser Automation MCP servers

View all
1klarlabs-studio avatarScoutklarlabs-studio/scoutBrowser automation MCP server with 84 tools. Pure CDP, DOM diffing, vision hybrid.14stars
2sh6drack avatarZen Mcpsh6drack/zen-mcpMCP server for Zen Browser automation via WebDriver BiDi10stars
3cherchyk avatarMCP Browsercherchyk/mcpbrowserBrowser automation using the user's Chromium session — JS execution, auth, and anti-bot support.9stars
4baixianger avatarCamoufox Mcpbaixianger/camoufox-mcpAnti-detection browser automation with Camoufox - stealth Firefox for web scraping7stars
5overtimepog avatarCloakmcpovertimepog/cloakmcpStealth browser MCP server — anti-detection Chromium with snapshot-first agent interface7stars
6sidebutton avatarSideButton MCP Serversidebutton/sidebuttonOpen-source MCP server with browser automation and knowledge packs for AI agents6stars