
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

An MCP server that gives AI agents tools to open, interact with, and manage persistent tmux-based terminal sessions, with an optional real-time browser interface and security controls.
Terminal Control MCP Server is cataloged as an MCP server attributed to wehnsdaefflae. An MCP server that gives AI agents tools to open, interact with, and manage persistent tmux-based terminal sessions, with an optional real-time browser interface and security controls. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Terminal Control MCP Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes, when the optional web interface is enabled, both the agent through MCP tools and a user through the browser can interact with a session simultaneously.
No, newlines are not added automatically; to execute a command, the input must explicitly include a newline character.
The server offers four configurable security levels: off, low, medium, and high.
README.md · 1fe0a4f58e8e · Fetched 2026-11-13 08:46:14 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A modern MCP server that enables AI agents to control terminal sessions through persistent tmux-based sessions. Features real-time web interface for direct user access, comprehensive security controls, and support for interactive terminal programs including debuggers, SSH connections, and database clients.
rm -rf /, sudo, disk formatting, etc.)This package requires tmux for terminal multiplexing:
# Ubuntu/Debian
sudo apt update && sudo apt install -y tmux
# macOS
brew install tmux
# CentOS/RHEL/Fedora
sudo yum install tmux # or sudo dnf install tmux
Python Requirements: Python 3.9 or later
# Install directly from PyPI
pip install terminal-control-mcp
# Clone the repository
git clone https://github.com/wehnsdaefflae/terminal-control-mcp.git
cd terminal-control-mcp
# Create virtual environment (choose one)
python -m venv .venv # Using standard venv
# OR
uv venv # Using uv (faster)
# Activate virtual environment
source .venv/bin/activate # Linux/macOS
# .venv\Scripts\activate # Windows
# Install the package
pip install .
# Or install in development mode
pip install -e ".[dev]"
The server supports configuration through TOML files and environment variables:
# Add the MCP server
claude mcp add terminal-control -s user terminal-control-mcp
# Verify installation
claude mcp list
The MCP server will be automatically launched by Claude Code when needed.
For other MCP clients, add to your configuration:
{
"mcpServers": {
"terminal-control": {
"command": "terminal-control-mcp",
"cwd": "/path/to/working/directory"
}
}
}
The server uses TOML configuration files with optional environment variable overrides. Environment variables can override any TOML setting for deployment flexibility.
The server looks for configuration files in this order:
./terminal-control.toml (current working directory)~/.config/terminal-control.toml (user configuration directory)/etc/terminal-control.toml (system-wide configuration)[web]
enabled = false # Enable web interface (default: false)
host = "0.0.0.0" # Bind address (default: "0.0.0.0")
port = 8080 # Port number (default: 8080)
auto_port = true # Automatic unique port selection (default: true)
external_host = "" # External hostname for URLs (optional)
Web Interface Modes:
Auto Port Selection: When auto_port=true, ports are automatically selected in the 9000-9999 range using hash(working_dir + process_id) % 1000 + 9000 to avoid conflicts between multiple instances.
[security]
level = "high" # Security level: off, low, medium, high
max_calls_per_minute = 60 # Rate limiting (calls per minute)
max_sessions = 50 # Maximum concurrent sessions
Security Levels:
off: No validation (⚠️ USE WITH EXTREME CAUTION)low: Basic input validation onlymedium: Standard protection (blocks common dangerous commands)high: Full protection (comprehensive validation and filtering)[session]
default_shell = "bash" # Default shell for new sessions
timeout = 30 # Session startup timeout (seconds)
isolate_history = true # Prevent sessions from polluting system history
history_file_prefix = "mcp_session_history" # Prefix for isolated history files
History Isolation Features:
isolate_history = false if system history is preferredSupported Applications:
HISTFILE, HISTCONTROL, HISTSIZE, HISTFILESIZEHISTFILE, ZDOTDIR, SAVEHIST, HISTSIZEXDG_CONFIG_HOME, XDG_DATA_HOMEPYTHONSTARTUP with readline configurationNODE_REPL_HISTORYPSQL_HISTORYMYSQL_HISTFILE[terminal]
width = 120 # Terminal width (columns)
height = 30 # Terminal height (rows)
close_timeout = 5.0 # Terminal close timeout (seconds)
process_check_timeout = 1.0 # Process health check timeout (seconds)
polling_interval = 0.05 # Output polling interval (seconds)
send_input_delay = 0.1 # Delay after sending input (seconds)
Terminal Emulator Support: The system automatically detects available terminal emulators in order of preference:
open -a Terminal)Custom Terminal Emulator Configuration:
[terminal]
# Custom terminal emulator preferences (ordered by preference)
emulators = [
{ name = "my-terminal", command = ["my-terminal", "--exec"] },
{ name = "gnome-terminal", command = ["gnome-terminal", "--"] },
{ name = "konsole", command = ["konsole", "-e"] },
]
[logging]
level = "INFO" # Log level: DEBUG, INFO, WARNING, ERROR
Create terminal-control.toml in your project root:
[web]
enabled = false # Use terminal windows instead of web interface
host = "0.0.0.0"
port = 8080
auto_port = true # Automatic unique port selection
[security]
level = "high"
max_calls_per_minute = 60
max_sessions = 50
[session]
default_shell = "bash"
timeout = 30
[terminal]
width = 120
height = 30
close_timeout = 5.0
process_check_timeout = 1.0
polling_interval = 0.05
send_input_delay = 0.1
[logging]
level = "INFO"
The server provides 6 MCP tools for complete terminal session lifecycle management:
list_terminal_sessionsList all active terminal sessions with status information.
Returns:
exit_terminalTerminate and cleanup a terminal session.
Parameters:
session_id: Session ID to destroyFeatures:
exit_terminal OR when users type exitget_screen_contentGet terminal content with precise control over output format.
Parameters:
session_id: Session to get content fromcontent_mode: Content retrieval mode
"screen" (default): Current visible screen only"since_input": Output since last input command"history": Full terminal history"tail": Last N lines (requires line_count)line_count: Number of lines for tail modeReturns:
send_inputSend input to terminal sessions.
Parameters:
session_id: Target sessioninput_text: Text to send (supports escape sequences)Important: Newlines are NOT automatically added. For command execution, explicitly include \n (e.g., "ls\n", "python\n").
Features:
await_output 🆕Wait for specific regex patterns to appear in terminal output.
Parameters:
session_id: Session to monitorpattern: Regular expression pattern to matchtimeout: Maximum wait time in seconds (default: 10.0)Returns:
match_text: The matched text if pattern found, null if timeoutscreen_content: Current screen content when match occurred or timeout reachedelapsed_time: Time elapsed before match or timeoutsuccess: Whether operation completed without errorsFeatures:
Use Cases:
await_output(session_id, r"Build successful|BUILD SUCCESS", 300.0)await_output(session_id, r"ERROR|FAILED|Exception", 30.0)await_output(session_id, r"\$\s*$|>\s*$", 5.0)await_output(session_id, r"Server running on|Listening on", 60.0)open_terminalCreate new terminal sessions.
Parameters:
shell: Shell to use (bash, zsh, fish, sh, etc.)working_directory: Starting directory (optional)environment: Environment variables (optional)Returns:
Features:
# Natural language requests to Claude:
"Start a Python session and show me what's on screen"
"List all my active terminal sessions"
"What's currently showing in the terminal?"
"Type 'print(2+2)' in the Python session"
"Close that debugging session"
# Complex interactive workflows:
"Start a Python REPL and help me debug this script"
"SSH into the server and check disk space"
"Connect to MySQL and show me the database tables"
"Run the debugger and set breakpoints in the main function"
"Start a docker container and explore the filesystem"
Using the included examples/example_debug.py:
# 1. Start debugging session
"Debug the file examples/example_debug.py and show me the code"
# 2. Explore and set breakpoints
"Show me the source code around the current line"
"Set a breakpoint where the bug occurs"
# 3. Investigate the problem
"Step through the buggy loop and show variable values"
"What variables do we have here? Show their values"
# 4. Clean up
"We found the bug! Clean up this debugging session"
Pro tip: If you set web_enabled=true in your configuration, you can also access the debugging session directly in your browser for real-time interaction.
When web interface is enabled:
"Starting debugger session...""You can also access it at http://localhost:9123/session/abc123"http://localhost:8080/session/{session_id}http://localhost:8080/rm -rf /, sudo, dd, etc.)PATH, LD_PRELOAD, etc.)terminal-control-mcp/
├── src/terminal_control_mcp/
│ ├── main.py # FastMCP server with 6 MCP tools
│ ├── session_manager.py # Session lifecycle management
│ ├── interactive_session.py # Tmux/libtmux process control
│ ├── terminal_utils.py # Terminal window management
│ ├── web_server.py # FastAPI web interface
│ ├── security.py # Multi-layer security validation
│ ├── config.py # TOML configuration handling
│ ├── models.py # Pydantic request/response models
│ ├── templates/ # Web interface templates
│ │ ├── index.html # Session overview page
│ │ └── session.html # Individual session interface
│ └── static/ # Web interface assets
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript modules
├── tests/ # Comprehensive test suite
│ ├── test_security_manager.py
│ ├── test_execute_command.py
│ ├── test_session_lifecycle.py
│ └── test_mcp_integration.py
├── examples/
│ └── example_debug.py # Sample debugging script
├── logs/interactions/ # Session interaction logs
├── CLAUDE.md # Development guidance
├── terminal-control.toml # TOML configuration
└── pyproject.toml # Python packaging configuration
# Run all tests
pytest tests/
# Run specific test categories
pytest -m unit # Unit tests
pytest -m integration # Integration tests
pytest -m security # Security tests
# Run with coverage
pytest --cov=src/terminal_control_mcp tests/
# Type checking
mypy src/ --ignore-missing-imports
# Linting and formatting
ruff check src/ tests/
black src/ tests/
# Check for dead code
vulture src/
# Install with development dependencies
pip install -e ".[dev]"
# Test basic functionality
python tests/conftest.py
MIT License - see LICENSE file for details.
git checkout -b feature/amazing-feature)ruff check src/ tests/ && mypy src/ --ignore-missing-imports && pytest tests/
git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Terminal Control MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/terminal-control)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.