MCP server for persistent interactive terminal orchestration
Project description
i4z-terminal-mcp
MCP server that enables AI agents to manage multiple persistent terminal sessions concurrently.
Features
- Persistent PTY-backed bash shells
- 9 MCP tools for full terminal lifecycle management
- Concurrent terminals with isolated async background readers
- Incremental cursor-based output reads
- Pattern-based output waiting
- Signal support (SIGINT, SIGTERM, SIGKILL)
- Web UI — view terminals live at
http://127.0.0.1:9020(xterm.js)
Install
uv tool install i4z-terminal-mcp
# or
pip install i4z-terminal-mcp
# or from source
uv pip install -e .
Usage
With OpenCode, add to opencode.json:
{
"mcp": {
"terminal": {
"type": "local",
"command": ["uvx", "i4z-terminal-mcp"],
"enabled": true
}
}
}
Or directly:
i4z-terminal-mcp
Tools
| Tool | Description |
|---|---|
create_terminal |
Spawn a persistent bash shell |
list_terminals |
List all active sessions |
terminal_status |
Get PID, CWD, alive, timestamps |
send_input |
Write text/commands to stdin |
read_output |
Incremental read via cursor |
send_signal |
Send SIGINT/SIGTERM/SIGKILL |
kill_terminal |
Destroy session and free resources |
wait_for_output |
Block until pattern appears |
search_output |
Search output history buffer |
Requirements
- Python 3.11+
- Linux or macOS (pexpect PTY support)
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
i4z_terminal_mcp-0.5.1.tar.gz
(12.8 kB
view details)
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 i4z_terminal_mcp-0.5.1.tar.gz.
File metadata
- Download URL: i4z_terminal_mcp-0.5.1.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d5ca4b2c9f75cc701753ddb47e8d8ed16699acf93ee0a5dfffe69a443ab05f9
|
|
| MD5 |
97f215b8009a7fadafc6d5db275b8766
|
|
| BLAKE2b-256 |
36c0554333feb8d2ec1233130de5988d19298974761a6405776ae530743be2ec
|
File details
Details for the file i4z_terminal_mcp-0.5.1-py3-none-any.whl.
File metadata
- Download URL: i4z_terminal_mcp-0.5.1-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fec79c7a16d10f037903672345c64854a070a5d76d76bd02dc7a91819f21a3b
|
|
| MD5 |
f71969b80e44da57100aa87a77299c1b
|
|
| BLAKE2b-256 |
4c9f544f6dff5c69c2b4463eaf9563a3f206e86f297f52ba788e662521768eae
|