Interactive Terminal MCP
Planned support for saving terminal interaction logs in asciinema format for replay and auditing of shell sessions.
Recommended as a sandboxed environment for running the MCP server to prevent unauthorized system modifications when providing terminal access.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Interactive Terminal MCPspawn a python REPL and import numpy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Interactive Terminal MCP
English | 中文
A Model Context Protocol (MCP) server that provides stateful, interactive terminal access.
Unlike standard command execution tools that run in isolation, this server allows LLMs to spawn persistent processes (like ssh, ipython, or gdb), maintain session context, and interact with shells via standard input/output streams.
Why use this MCP?
Standard command execution tools usually run in isolation (stateless). This MCP server allows for persistent sessions (stateful), which is critical for remote management and debugging tools.
Side-by-Side Comparison
Scenario | Without this MCP (Stateless) | With Interactive-Terminal-MCP (Stateful) |
1. Remote SSH Session | Context Lost: Must reconnect for every command.> | Context Preserved: Maintains one connection.1. |
2. Interactive Debugging | Unsupported: Cannot handle interactive prompts or wait for specific output patterns. | Supported: Can drive interactive tools.1. |
Related MCP server: Interactive Shell MCP
Features
Stateful Sessions: Environment variables, working directories, and process states persist between commands.
Interactive Support: Specifically designed for REPLs and interactive CLIs that require continuous input.
Output Control: Supports waiting for specific output patterns (regex) to ensure commands complete before returning.
Session Management: Handle multiple concurrent terminal sessions.
History: Access full session logs via MCP resources.
Usage
Running Directly
uvx interactive-terminal-mcpIntegration with Claude Code
You can add this server to Claude Code uvx.
Using pipx:
claude mcp add --transport stdio interactive-terminal-mcp -- uvx interactive-terminal-mcpManual Configuration (claude_config.json):
{
"mcpServers": {
"interactive-terminal": {
"command": "uvx",
"args": ["interactive-terminal-mcp"]
}
}
}Available Tools
spawn_process
Starts a new interactive process.
Arguments:
command(List[str]): The command to run (e.g.,["bash"],["python3", "-i"]).
Returns:
session_id(str)
send_command
Sends input to an active session and waits for output.
Arguments:
session_id(str): The target session ID.cmd(str): The command string to send.wait_for(str, optional): Regex pattern to wait for (e.g.,\$\s*). Defaults to a short timeout if not provided.timeout(int, optional): Maximum time to wait in seconds.
read_buffer
Reads any pending output from the session buffer without sending new commands.
Arguments:
session_id(str)
kill_session
Terminates a specific session.
Arguments:
session_id(str)
Resources
cli://{session_id}/history: Retrieves the full interaction history (inputs and outputs) for a specific session.
Roadmap
Session Recording: Support saving interaction logs in standard formats (e.g., asciinema) for replay and auditing.
Human Intervention: Enable mechanisms for users to pause, terminate, or manually intervene in active shell sessions managed by the Agent.
Security Warning: This tool provides full terminal access to the connected LLM. The LLM will have the same permissions as the user running the MCP server. Use only in trusted environments or sandboxed containers (e.g., Docker) to prevent unauthorized system modifications.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceExecute terminal commands locally or remotely via SSH with session persistence and environment variable support. Manage terminal sessions that maintain state for up to 20 minutes, enabling efficient command execution workflows. Connect using stdio or SSE for flexible integration with AI models and aLast updated11MIT
- Alicense-qualityDmaintenanceEnables LLMs to create and manage persistent, interactive shell sessions with full terminal emulation and PTY support. It allows for sequential command execution and supports interactive programs like vim or htop through specialized streaming and snapshot output modes.Last updated4MIT
- Alicense-qualityBmaintenanceProvides persistent interactive shell sessions via pseudo-terminals for MCP agents, enabling bidirectional communication, incremental reads, and stateful command execution across steps.Last updated39MIT
- Alicense-qualityCmaintenanceEnables AI agents to interact with interactive CLI processes via a real PTY, allowing them to send keystrokes, read screen output, and handle interactive prompts.Last updated2MIT
Related MCP Connectors
Operate your own Linux servers from your LLM. Requires the SentinelX agent installed per host.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Run AI customer support from your terminal: conversations, knowledge base, and chat widget.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/WangYihang/interactive-terminal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server