MCP Server providing fully interactive terminal sessions for AI agents - TUI support, keyboard control, screen capture - Cross-platform (Windows, Linux, Mac)
Project description
🖥️ Interactive Terminal MCP Server
A fully interactive terminal MCP server for AI agents with TUI support, keyboard control, and screen capture - Cross-platform (Windows, Linux, Mac).
✨ Features
- 🖥️ Full Terminal Control - Create, manage, and delete terminal sessions
- ⌨️ Keyboard Support - Arrow keys, Ctrl, Alt, F-keys, PageUp/Down, etc.
- 📺 TUI Applications - Works with htop, vim, nano, mc, and more
- 🔄 Auto-Update - Automatically checks and installs updates from PyPI
- 🌍 Cross-Platform - Windows (pywinpty), Linux/Mac (ptyprocess)
📦 Installation
pip install vitjas-interactive-terminal
🚀 Usage
Start the MCP Server
You can start the server in 3 ways:
# Option 1: Entry Point (recommended)
vitjas-interactive-terminal
# Option 2: Python Module
python -m interactive_terminal
# Option 3: Python3 Module (Linux/Mac)
python3 -m interactive_terminal
MCP Configuration
For Claude Desktop / Agent Zero:
Linux/Mac (Option A - Entry Point):
{
"mcpServers": {
"InteractiveTerminal": {
"command": "vitjas-interactive-terminal",
"args": [],
"init_timeout": 30
}
}
}
Linux/Mac (Option B - Python3 Module):
{
"mcpServers": {
"InteractiveTerminal": {
"command": "python3",
"args": ["-m", "interactive_terminal"],
"init_timeout": 30
}
}
}
Windows:
{
"mcpServers": {
"InteractiveTerminal": {
"command": "python",
"args": ["-m", "interactive_terminal"],
"init_timeout": 30
}
}
}
🛠️ Available Tools
| Tool | Description |
|---|---|
create_terminal |
Create a new interactive terminal session |
send_text |
Send text/commands to a terminal |
send_keys |
Send special keys (arrows, Ctrl+C, etc.) |
get_screen |
Read terminal screen content |
list_terminals |
List all active terminals |
delete_terminal |
Delete/close a terminal |
search_buffer |
Search through terminal history |
⌨️ Supported Keys
- Navigation: up, down, left, right, home, end, pageup, pagedown
- Control: ctrl+c, ctrl+d, ctrl+z, ctrl+a, ctrl+e, ctrl+u, ctrl+k, ctrl+w, ctrl+l
- Alt: alt+f, alt+b, alt+d
- Other: enter, escape, tab, backspace, delete, f1-f12
💡 Examples
Navigate htop:
# Create terminal and start htop
create_terminal → send_text("htop\n") → get_screen()
# Navigate with arrow keys
send_keys("down") → send_keys("enter")
# Exit
send_keys("f10") or send_keys("q")
Edit with nano:
# Create and open file
create_terminal → send_text("nano test.txt\n")
# Type content
send_text("Hello World!")
# Save and exit
send_keys("ctrl+x") → send_text("Y") → send_keys("enter")
🔧 Configuration
Disable Auto-Update:
VITJAS_AUTO_UPDATE=false vitjas-interactive-terminal
📋 Requirements
- Python >= 3.10
- Windows: pywinpty >= 2.0.0 (auto-installed)
- Linux/Mac: ptyprocess >= 0.7.0 (auto-installed)
🔗 Links
- PyPI: https://pypi.org/project/vitjas-interactive-terminal/
- GitHub: https://github.com/Vltja/vitjas-interactive-terminal
- Issues: https://github.com/Vltja/vitjas-interactive-terminal/issues
📜 License
MIT License - see LICENSE
👤 Author
Vltja - GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vitjas_interactive_terminal-1.2.2.tar.gz.
File metadata
- Download URL: vitjas_interactive_terminal-1.2.2.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3e608d1f321edfb5a6be2a0547ac89b3039bc66b12ef969b4ccab70856cf2a
|
|
| MD5 |
65352950158e00516a9bfa80a9d89188
|
|
| BLAKE2b-256 |
eec3a5bb754189092f1f0501d6c4d1eeef3f3af725148c3e073a060851924ce9
|
File details
Details for the file vitjas_interactive_terminal-1.2.2-py3-none-any.whl.
File metadata
- Download URL: vitjas_interactive_terminal-1.2.2-py3-none-any.whl
- Upload date:
- Size: 12.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7afb77a4cdbc5cc166920a19d88352fa06cf7188c0aef47c81021de831d1d44d
|
|
| MD5 |
ad1f757798084778320532e2403e9b6c
|
|
| BLAKE2b-256 |
73061f872a3c6d34b1d6a2a9dc41234e9048720bfcb9da6c5220a5af1432f9bc
|