Create an interactive terminal session
terminal_createCreate persistent interactive tmux sessions that survive server restarts for REPLs, SSH, TUI programs, and prompts. Use terminal_write to send input and terminal_read to capture output.
Instructions
Create a persistent interactive shell in tmux. Sessions survive termux-mcp restarts and can run REPLs, SSH, TUI programs and prompts. The shell defaults to $SHELL (Termux bash if unset); when bash is selected, startup files are skipped by default because a custom .bashrc can break Enter handling. Set use_rc=true or terminal.useShellRc in the config to load them. Use terminal_write to type and terminal_read to capture output.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Default $HOME. | |
| env | No | Extra environment variables. | |
| cols | No | Terminal width. Default 100. | |
| name | No | Session name. Defaults to term-<timestamp>. | |
| rows | No | Terminal height. Default 30. | |
| shell | No | Shell or executable path. Default $SHELL or Termux bash. | |
| use_rc | No | Load the shell startup files (.bashrc). Default false. | |
| shell_args | No | Extra shell arguments. |