mkpvishnu avatar

Terminal Mcp

mkpvishnu/terminal-mcp

This server wraps persistent PTY sessions so Claude can interact with SSH connections, database CLIs, REPLs, and TUI applications that the built-in Bash tool can't handle. It exposes tools like session_create, session_send, session_read, and session_interact to manage long-lived processes across multiple tool calls. You get regex-triggered reads with session_wait_for, special key support for arrow keys and control characters, and four read modes including auto-detection of alternate screen buffers for tools like htop or vim. It includes a dangerous command gate that prompts before running destructive operations, OSC 133 shell integration for exit code detection, and configurable output truncation to manage token usage. Reach for this when you need Claude to maintain an interactive session that survives beyond a single command execution, whether that's a multi-line Python REPL or a live MySQL prompt.

GitHub stars
7
tools
9
transport
STDIO
env vars
2
last updated
Feb 28, 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

Configuration

TERMINAL_MCP_MAX_SESSIONS

Maximum concurrent sessions

TERMINAL_MCP_IDLE_TIMEOUT

Seconds before auto-close (default 1800)

Readme

terminal-mcp banner

Give your AI a real terminal. Persistent sessions. Interactive programs. Zero limitations.

PyPI Python 3.10+ License: MIT CI CodeQL


View the full README on GitHub

Details

Repository
github.com/mkpvishnu/terminal-mcp
Categories
Databases, Developer Tools
Package
terminal-mcp
Transport
STDIO
Registry
MCP registry, active

Related Databases MCP servers

View all
1florentine-ai avatarMcpflorentine-ai/mcpMCP server for Florentine.ai - Natural language to MongoDB aggregations0stars
2letoribo avatarMcp Graphql Enhancedletoribo/mcp-graphql-enhancedGraphQL gateway for LLMs. Handles huge GitHub GraphQL & @neo4j/graphql schemas without crashing6stars
3cyanheads avatarFaostat Mcp Servercyanheads/faostat-mcp-serverUN FAOSTAT global food & agriculture statistics over a local SQLite mirror, via MCP.3stars
4madezmedia avatarAcmi Mcpmadezmedia/acmiPersistent agent memory via ACMI — Profile/Signals/Timeline. 16 tools on Upstash Redis.3stars
5nikitacometa avatarMnemon Mcpnikitacometa/mnemon-mcpPersistent layered memory for AI agents. SQLite FTS5, fact versioning, zero-cloud.3stars
6agentic-eng avatarA2dbagentic-eng/a2dbSafe, read-only database access for AI agents. 5 databases, batch queries, SQLGlot.2stars