Skip to main content

MCP server for persistent interactive terminal orchestration

Project description

i4z-terminal-mcp

MCP server for persistent interactive terminal sessions with a browser UI.

Features

  • Persistent PTY-backed bash shells
  • Concurrent terminal sessions
  • Incremental output reads
  • History log for input/output events
  • Searchable output history
  • Session env profiles and startup hooks
  • Workspace profiles and groups
  • Output alerts with global/session patterns
  • Health summary for sessions, alerts, and persistence
  • Session checkpoints and export/import bundles
  • Frontend panels for profiles, workspaces, alerts, checkpoints, and snapshots
  • Create/delete sessions from the web UI
  • Dark/light theme toggle

Requirements

  • Python 3.11+
  • Linux or macOS

Install

From PyPI:

pip install i4z-terminal-mcp

From source:

pip install -e .

Build

Build a distributable wheel/sdist from source:

uv build
# or
python -m build

Run

Direct:

i4z-terminal-mcp

Or with a fixed frontend port:

I4Z_TERMINAL_WEB_PORT=9020 i4z-terminal-mcp

With OpenCode:

{
  "mcp": {
    "terminal": {
      "type": "local",
      "command": ["i4z-terminal-mcp"],
      "environment": {
        "I4Z_TERMINAL_WEB_PORT": "9020"
      },
      "enabled": true
    }
  }
}

Frontend

The server prints the web UI URL on startup:

Web UI: http://127.0.0.1:9020

Open that URL in a browser to:

  • create terminal sessions
  • delete terminal sessions
  • send commands
  • view live terminal output
  • filter command/history entries
  • search output history
  • switch between dark and light theme

If no port is configured, the server chooses a free localhost port and prints it.

MCP tools

Tool Description
create_terminal Create a persistent terminal session
list_terminals List active and historical sessions
terminal_status Get PID, cwd, alive state, timestamps
terminal_profile Get stored env vars and startup commands
configure_terminal Update env vars or startup hooks
create_workspace Create a workspace profile
list_workspaces List workspace profiles
workspace_status Get workspace members and profile
configure_workspace Update a workspace profile
add_terminal_to_workspace Add a terminal to a workspace
remove_terminal_from_workspace Remove a terminal from a workspace
apply_workspace Apply a workspace profile to terminals
send_input Send text/commands to stdin
read_output Read incremental PTY output
send_signal Send SIGINT, SIGTERM, or SIGKILL
kill_terminal Destroy a session
wait_for_output Wait for a substring in output
search_output Search terminal output history
add_output_alert Register a global or session alert pattern
list_output_alerts List registered alert patterns
remove_output_alert Remove an alert pattern
list_alert_events List alert matches that fired
health_report Get session, alert, and DB health
add_checkpoint Mark a named checkpoint
list_checkpoints List checkpoints
remove_checkpoint Remove a checkpoint
export_session Export a session bundle
import_session Restore a session bundle
web_url Get the frontend URL

Usage notes

  • send_input accepts commands with or without a trailing newline.
  • Terminal names must be at least 1 character and cannot be empty.
  • Dead sessions remain visible in the UI if they have history.
  • create_terminal accepts optional env and startup_commands fields.
  • configure_terminal can add/remove env vars on a live session.

Configuration

Env var Default Description
I4Z_TERMINAL_WEB_PORT random free port Web UI listen port
I4Z_TERMINAL_STATE_DIR ~/.local/share/i4z-terminal-mcp SQLite history directory

License

MIT

Project details


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.5.tar.gz (69.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

i4z_terminal_mcp-0.5.5-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file i4z_terminal_mcp-0.5.5.tar.gz.

File metadata

  • Download URL: i4z_terminal_mcp-0.5.5.tar.gz
  • Upload date:
  • Size: 69.7 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

Hashes for i4z_terminal_mcp-0.5.5.tar.gz
Algorithm Hash digest
SHA256 f5a569476e96660154c47472e656f7061b0e923c1b56f118bfacca11d4fd9390
MD5 03e59d25efa7d07eb90ba8e67e7db299
BLAKE2b-256 2748a442b86e98c154131afa087ca2d35a966d489fff0f3aa961cb87d1533f35

See more details on using hashes here.

File details

Details for the file i4z_terminal_mcp-0.5.5-py3-none-any.whl.

File metadata

  • Download URL: i4z_terminal_mcp-0.5.5-py3-none-any.whl
  • Upload date:
  • Size: 28.0 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

Hashes for i4z_terminal_mcp-0.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 f97017203001f75ab0f0756fa3aeee9703dfa88817b833fe1af006c559579191
MD5 a09325d8a5a1c81ffd0f24494eab1a46
BLAKE2b-256 dcf54813ffe446eeb3acb9208cd33854cf552589d8886664f637cd22affc108e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page