terminal-use
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| --cwd | No | Working directory for new sessions. Defaults to where the server was started. Example: `npx -y terminal-use --cwd /path/to/project` | |
| --cols | No | Terminal width (columns) for new sessions. Default is 120. Example: `npx -y terminal-use --cols 100` | |
| --rows | No | Terminal height (rows) for new sessions. Default is 30. Example: `npx -y terminal-use --rows 40` | |
| --login | No | Start shells as login shells, so your shell profile files (~/.zprofile, ~/.bash_profile, ~/.profile) are read and your PATH is set up. Off by default. Has no effect in PowerShell or cmd.exe. | |
| --shell | No | Shell to run in new sessions. Defaults to `$SHELL` or `/bin/bash`; PowerShell on Windows. Example: `npx -y terminal-use --shell /bin/zsh` | |
| --scrollback | No | Lines of history kept. Default is 5000. Example: `npx -y terminal-use --scrollback 10000` |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
| extensions | {
"io.modelcontextprotocol/skills": {}
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| terminal_batchA | Send a sequence of inputs in one call and get the screen back once at the end — for driving a full-screen program without a round trip per keystroke (open a menu, move down three, press Enter, type a name, confirm). Actions run in order, each given a moment to take effect before the next. Each action is an object with a
The batch is validated before anything is sent. It stops at the first action that fails (a pattern that never appears, a click the program cannot receive, the process exiting) and reports how far it got, with the screen as it stands. Use it when you already know the steps; when you need to look between steps, use the individual tools. |
| terminal_clickA | Deliver a left mouse-button click at a cell in the terminal. Only works when the program currently in the foreground has opted into mouse tracking (vim with Coordinates are 1-indexed and refer to the live screen viewport: col 1, row 1 is the top-left cell, and the bottom-right cell is (terminal width, terminal height) which you can see via PREVIEW MODE (default EXECUTE MODE ( CAVEATS: |
| terminal_createA | Spawn a new terminal session and return its sessionId. You must call this before any per-session tool — there is no shared default session. By default the session is an interactive shell. Pass |
| terminal_destroyA | Kill a session and forget the sessionId entirely. The shell process is terminated and the sessionId is not tombstoned — future calls against it will error with "Unknown sessionId". Use this when you're explicitly done with a session. Tombstones (which auto-respawn on next access) only happen for system-driven terminations: idle-kill, eviction, or shell exit. |
| terminal_listA | List every active session and every tombstoned (recently-killed but reserved) sessionId. Tombstones are reservations: the shell is gone but the sessionId can still be called against — doing so respawns a fresh shell under the same id and surfaces the original termination reason (shell-exit, idle-killed, or evicted). Tombstones expire after 30 days; after that the id is gone. |
| terminal_pressB | Press a single named key or key combination. Examples of supported |
| terminal_readA | Read a window of the terminal buffer. The buffer is the full xterm-emulated state (scrollback + visible viewport) in one contiguous index space. The window is paged from the bottom upward in multiples of |
| terminal_resetA | Wipe the terminal buffer and scrollback. By default the shell process keeps running (env vars, cwd, history all preserved). Pass |
| terminal_resizeA | Change the terminal size. Both |
| terminal_screenshotA | Render a screen-sized window of the terminal to a PNG. Height is always the current screen height ( |
| terminal_scrollA | Turn the mouse wheel over a cell of a full-screen program: scroll a pager, a file list, a log pane. Behaves as a terminal emulator does — programs that track the mouse receive wheel events at that cell (so the pane under it scrolls); full-screen programs that do not (less, man) receive arrow keys instead. At a plain shell prompt there is nothing to scroll and the call fails: earlier output is read with |
| terminal_typeA | Type literal characters into the terminal as if a human were pressing keys. Embedded |
| terminal_waitA | Block until the terminal reaches a state, instead of guessing with sleeps or polling DEFAULT (no
WITH Returns the screen when the condition is met, or when |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| terminal-use | Drive interactive terminal programs through the terminal-use MCP tools (terminal_create, terminal_type, terminal_press, terminal_batch, terminal_wait, terminal_read, terminal_screenshot). Use when a task needs a real terminal rather than a one-shot shell command - full-screen or interactive programs (vim, less, htop, fzf, lazygit, REPLs, debuggers, installers, ssh, git rebase -i), testing a CLI or TUI end to end, or long-running commands and dev servers that have to be watched. |
| terminal-use/references/keys.md | Supporting file of the "terminal-use" skill. |
| terminal-use/references/recipes.md | Supporting file of the "terminal-use" skill. |
| terminal-use/references/troubleshooting.md | Supporting file of the "terminal-use" skill. |
TDQS
Scored across 13 tools
Each tool has a clearly distinct purpose: session lifecycle (create/destroy/list/reset/resize), input (type/press/click/scroll/batch), output (read/screenshot), and synchronization (wait). The main overlap is terminal_batch, which can perform everything type/press/click/scroll do, but descriptions explicitly steer the agent (batch for known sequences, individual tools when you need to look between steps), so confusion is limited.
Every tool follows the same terminal_<verb> snake_case pattern (terminal_create, terminal_read, terminal_wait, etc.), with no deviations in case or verb style. The naming is entirely predictable.
13 tools is comfortably within the ideal 3-15 range for a terminal automation server. Each tool maps to a genuine, non-redundant capability (session management, multiple input modalities, output capture, and blocking waits).
The surface covers the full session lifecycle (create/destroy/list/reset/resize) plus input, output, and synchronization primitives, which is close to complete for driving a terminal. Minor gaps remain, such as no standalone paste tool outside batch and no explicit signal/interrupt tool beyond terminal_press Ctrl+C.