local-terminal-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Local Terminal MCP gives you persistent shell sessions on the machine that runs this server.
Typical workflow:
terminal_spawn - open a session (optional name, shell, cwd). Reuse it for related commands.
terminal_exec - run a command inside a session and get the output plus its exit code. Shell state (cwd, env vars) persists between calls.
terminal_read - fetch more output later, optionally only new output via the "since" cursor.
terminal_write - type raw input into a session, for REPLs and interactive prompts.
terminal_run - run a single command in a throwaway shell and get stdout, stderr and the exit code.
terminal_list / terminal_signal / terminal_close - manage sessions.
Notes:
Sessions are real local shells. They can read, write and delete files and run any program the server user can run.
Do not run two commands in the same session at the same time. Output interleaves; use separate sessions instead.
terminal_exec waits for the command to finish and returns "completed" plus the command exit code. If completed is false, it is still running or waiting for input; poll with terminal_read using the returned nextSince value.
Sessions normally live in a per-user background daemon. If this MCP server is restarted, terminal_list and terminal_read still find the sessions (unless the server was started with --no-daemon).
For interactive programs or commands that read stdin, use terminal_write, or terminal_exec with waitForCompletion: false.
Prefer terminal_run for short one-off commands and terminal_spawn + terminal_exec for anything stateful.
Close sessions you no longer need.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| terminal_spawnA | Open a new persistent local shell session. The session keeps its working directory and environment between commands. Returns the session id used by the other terminal tools. |
| terminal_listA | List all terminal sessions with their id, name, shell, initial working directory, process id, status, exit code and buffer size. |
| terminal_readA | Read buffered output from a session. Without "since", returns the last "lines" lines. Pass the previously returned nextSince value to get only new output since that point. |
| terminal_writeA | Write raw input to a running session. By default a newline is appended so the shell executes it. Set wait to true to also return the output produced by this write. |
| terminal_execA | Type a command into an existing session, wait for it to finish and return its output and exit code. The session keeps its working directory and environment, so use this for multi-step work. Waits up to 2 minutes by default. Set waitForCompletion to false for interactive programs or long-running servers. |
| terminal_runA | Run a command in a fresh non-interactive shell and wait for it to finish. Returns stdout, stderr, exit code and duration. Use this for short commands when no persistent session state is needed. |
| terminal_signalA | Send a POSIX signal to the session process group. Use SIGINT to interrupt a running command, SIGTERM to ask it to stop, or SIGKILL to force it. On Windows the process tree is terminated. |
| terminal_closeA | Terminate a session and remove it from the session list. Running child processes in its process group are stopped too. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 8 tools
Most tools have clearly distinct roles: spawn/list/read/close/signal/write are unambiguous. However, terminal_write with wait=true, terminal_exec, and terminal_run all execute commands and return output, so their boundaries overlap somewhat; the descriptions do clarify the differences (raw input vs. existing session vs. fresh shell), preventing serious confusion.
All eight tools follow a strict terminal_<verb> snake_case pattern: spawn, list, read, close, signal, write, exec, run. The naming is predictable and consistent throughout.
Eight tools is well-scoped for a persistent terminal session manager. Each tool covers a distinct lifecycle operation or interaction mode, and none feels redundant or missing.
The surface covers the full session lifecycle: creation, listing, output reading with incremental streaming, input writing, command execution, signals, and termination. Combined with terminal_run for one-off commands, there are no obvious dead ends for terminal automation workflows.