pungggi avatar

Smart Terminal

pungggi/smart-terminal-mcp

Gives Claude persistent shell access through PTY-backed sessions instead of one-shot exec calls. You get terminal_exec for tracked commands with completion markers, terminal_read for incremental output fetching, terminal_wait for pattern matching, and terminal_watch for event-driven monitoring. Handles interactive tools like vim and npm prompts that break with piped stdin. Works across Windows, Linux, and macOS with auto-detected shells. Useful when you want stateful sessions that survive across turns, need to poll long-running dev servers without re-reading full buffers, or want portable terminal workflows that aren't tied to a specific AI client's built-in terminal behavior.

GitHub stars
12
tools
9
transport
STDIO
last updated
Oct 26, 2026

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

Readme

smart-terminal-mcp

Smithery Official Registry

A PTY-based MCP server with strong Windows support, giving MCP-capable AI clients and their agents persistent, interactive shell access via pseudo-terminals (node-pty).

Unlike simple exec-based approaches, this keeps PTY-backed shell sessions alive across steps, with bidirectional communication for interactive CLI tools, incremental reads, and session state that carries forward.

See the Changelog for recent updates.

Why use this instead of your AI client's built-in terminal?

Install this if you want a more consistent terminal workflow across AI clients, instead of relying on whatever built-in terminal behavior a single client happens to provide.

This MCP is most useful when you want:


View the full README on GitHub

Details

Repository
github.com/pungggi/smart-terminal-mcp
Category
Developer Tools
Package
smart-terminal-mcp
Transport
STDIO
Registry
MCP registry, active

Related Developer Tools MCP servers

View all
1mkpvishnu avatarTerminal Mcpmkpvishnu/terminal-mcpMCP server for interactive terminal sessions — SSH, REPLs, database CLIs, TUI apps7stars
2aaronsb avatarJira Cloudaaronsb/jira-cloudMCP server for Jira Cloud — manage issues, sprints, boards, filters, and custom fields4stars
3raalarcon9705 avatarJira Mcpraalarcon9705/jira-mcpJira & Confluence MCP: 24 tools for issues, sprints, comments, transitions & wiki. Run via npx.4stars
4digital-defiance avatarMcp Filesystemdigital-defiance/ai-capabilities-suiteAdvanced filesystem operations with strict security boundaries for AI agents3stars
5xjtlumedia avatarMarkdown Formatterxjtlumedia/ai_answer_copierAI Answer Copier — Convert Markdown to PDF, DOCX, HTML, LaTeX, CSV, JSON, XML, XLSX, RTF, PNG0stars
6davidweb3-ctrl avatarGit Enhanceddavidweb3-ctrl/mcp-git-enhancedEnhanced Git MCP Server - Code review, commit analysis, and branch management1stars