
Interactive Terminal
Brings real interactive terminal sessions to Claude and other AI agents through node-pty and xterm-headless emulation. Handles REPLs (Python, Node, Rails console), SSH sessions, database clients (psql, mysql), Docker exec, and any CLI that needs stdin streaming. Exposes seven tools: create_session spawns a process with full PTY support, send_command pipes input and waits for prompt detection, read_output grabs the current screen buffer, and send_control handles arrow keys and ctrl sequences. Falls back to pipe mode when PTY isn't available. Blocks dangerous patterns (rm -rf, DROP TABLE, curl|bash) behind a separate confirm_dangerous_command tool that requires justification. Solves the problem of agents that can't handle interactive commands because they lack PTY access.
- GitHub stars
- 15
- tools
- 7
- transport
- STDIO
- env vars
- 3
- last updated
- Feb 16, 2026
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
create_sessionSpawn an interactive process.
Spawn an interactive process.
No parameter schema in public metadata yet.
send_commandSend input and get output.
Send input and get output.
No parameter schema in public metadata yet.
read_outputRead terminal screen (read-only).
Read terminal screen (read-only).
No parameter schema in public metadata yet.
list_sessionsList active sessions (read-only).
List active sessions (read-only).
No parameter schema in public metadata yet.
close_sessionKill a session.
Kill a session.
No parameter schema in public metadata yet.
send_controlSend control characters.
Send control characters.
No parameter schema in public metadata yet.
confirm_dangerous_commandTwo-step safety confirmation.
Two-step safety confirmation.
No parameter schema in public metadata yet.
Sponsors
Configuration
MCP_TERMINAL_MAX_SESSIONSMaximum concurrent sessions
MCP_TERMINAL_SANDBOXEnable OS-level kernel sandboxing
MCP_TERMINAL_REDACT_SECRETSRedact AWS keys, tokens, private keys in output
Readme
mcp-interactive-terminal
MCP server that gives AI agents (Claude Code, Cursor, Windsurf, etc.) real interactive terminal sessions. Run REPLs, SSH, database clients, and any interactive CLI — with clean text output, smart completion detection, and 7-layer security.
Why This Exists
AI coding agents can't handle interactive commands. There's no PTY, no stdin streaming. You can't run rails console, python, psql, ssh, or any REPL through them. This MCP server fixes that.
AI Agent (Claude Code, Cursor, etc.)
↕ MCP (JSON-RPC over stdio)
mcp-interactive-terminal
↕ node-pty + xterm-headless
Interactive Process (rails console, python, psql, ssh, bash...)
↕
Clean text output (exactly what a human would see)
Install
Claude Code
claude mcp add terminal -- npx -y mcp-interactive-terminal
Details
- Repository
- github.com/amol21p/mcp-interactive-terminal
- Categories
- Cloud & Infrastructure, Developer Tools
- Package
mcp-interactive-terminal- Transport
- STDIO
- Registry
- MCP registry, active