Terminal Mcp
Persistent terminal sessions for SSH, REPLs, database CLIs, and TUI apps, with keys and screen reads.
- CCM score
- 74 of 100
- GitHub stars
- 12
- tools
- 9
- transport
- STDIO
- env vars
- 2
- last updated
- Feb 28, 2026
Own this MCP server? Claim it
What it does
- Starts and stops sessions with
terminal_startandterminal_stop, runs commands withterminal_execandterminal_run, and reads output withterminal_readandterminal_wait - Sends raw input and keys with
terminal_writeandterminal_send_key, plusterminal_resize,terminal_get_history, andterminal_write_file - Runs locally over stdio with no account or API key; the uvx launcher is the only required setup
- Designed for remote shells, interactive interpreters, and monitoring TUIs where state must persist between calls
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.
argsobjectlistbooleantoolstringConfiguration
TERMINAL_MCP_MAX_SESSIONSMaximum concurrent sessions
TERMINAL_MCP_IDLE_TIMEOUTSeconds before auto-close (default 1800)
Readme
terminal-mcp banner
Give your AI a real terminal. Persistent sessions. Interactive programs. Zero limitations.
Details
- Repository
- github.com/mkpvishnu/terminal-mcp
- Categories
- Developer Tools, DevOps & Cloud
- Package
terminal-mcp- Transport
- STDIO
- Registry
- MCP registry, active
Questions
What can an AI agent do with the terminal-mcp server?
terminal-mcp gives an AI agent a real terminal with persistent PTY sessions that survive across tool calls, so it can connect over SSH, use Python, Node or Ruby REPLs, keep database CLI connections such as psql, mysql or redis-cli open, and navigate TUI apps like htop, vim or fzf. Its core tools include terminal_start, terminal_exec, terminal_write, terminal_read and terminal_wait, with more session controls such as terminal_send_key and terminal_watch.
How do I install the terminal-mcp MCP server?
Run it directly with uvx terminal-mcp, or install it globally with pip install terminal-mcp. Once connected, the agent can start sessions and run commands in a shell that keeps its state between calls.
Which environment variables does terminal-mcp accept?
TERMINAL_MCP_MAX_SESSIONS sets the maximum number of concurrent sessions, and TERMINAL_MCP_IDLE_TIMEOUT sets the seconds before an idle session auto-closes. A third variable, TERMINAL_MCP_MAX_BUFFER_BYTES, caps the per-session buffer size, and all three are optional.
Where does terminal-mcp rank in the Developer Tools category?
terminal-mcp is listed in the Developer Tools category on Claude Marketplaces, alongside servers such as Context7, Chrome DevTools MCP and Codebase Memory. It stands out by giving agents persistent interactive sessions, which plain subprocess-based shell tools cannot maintain between commands.
Similar to Terminal Mcp
More Developer ToolstmuxSkillmitsuhiko/agent-stuff401 installsDrive interactive CLIs like Python, gdb, and lldb through tmux sessions on a private socket.
using-tmux-for-interactive-commandsSkillobra/superpowers-lab521 installsTmux-based control of interactive CLI tools like vim, git rebase -i, and REPLs through detached sessions.
Mcp Console AutomationMCP serverooples54 starsRuns local and SSH console sessions for AI-driven command execution, output monitoring, and error detection.
ItermMCP serverferrislucas574 starsCommand execution and output reading in the active iTerm2 session on macOS.