S

Smart Terminal

Persistent PTY-backed MCP terminal sessions with interactive input, output control, retries, diffs, history, and event-based waits.

Install Smart Terminal

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "smart-terminal": {
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp@stable"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command started, but didn't respond the way we expected when we tried to talk to it.

npx -y smart-terminal-mcp@stable

initialize succeeded but no response to tools/list.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 7d ago.

Overview

The smart-terminal MCP server gives AI clients persistent PTY-backed shell sessions with bidirectional input and output. It supports interactive programs, incremental reads, completion detection, pattern waits, retries, output paging, and session cleanup. Use it when agents need terminal state to persist across steps or when ordinary one-shot command execution cannot handle prompts, REPLs, or long-running processes. A safer non-interactive path is available through direct command execution with shell expansion disabled.

Use cases

  • Run interactive installers and REPLs
  • Monitor development servers until a pattern appears
  • Retry flaky commands in a persistent session
  • Page, diff, or revisit large command output
  • Send keystrokes to terminal-based programs

Key features

  • Persistent PTY-backed shell sessions
  • Deterministic command completion
  • Incremental output reads and history
  • Pattern waits and event-based monitoring
  • Paged output, retries, and command diffs
  • Interactive key input and session cleanup

Tools17

What Smart Terminal lets your agent do. Expand a tool for its parameters.

Self-reported~715 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

4/4 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · smart-terminal-mcp@stable (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars12Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.
Install checkInconclusiveStarted but did not complete the MCP handshake in our test.
Tools exposed17Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Smart Terminal works

What the smart-terminal MCP server does

The smart-terminal MCP server exposes persistent pseudo-terminal sessions to MCP-capable AI clients. A session keeps its working directory, environment, and running processes between tool calls, allowing an agent to continue work instead of starting a new shell for every command. PTY behavior is intended for interactive programs such as REPLs, installers, prompts, and editors that may not work correctly with piped standard input.

The server supports Windows, Linux, and macOS shell workflows. Shell selection is automatic: Windows prefers PowerShell Core, then Windows PowerShell, then Command Prompt; Linux and macOS use $SHELL, then Bash, then sh.

How it works

An agent starts a session with terminal_start, then can execute commands, write raw input, send special keys, and read buffered output. terminal_exec adds completion markers so the server can identify when a command finishes and reports the current working directory. For commands that should not use a shell, terminal_run accepts a command and argument list with shell execution disabled.

Output handling is designed for repeated terminal work. terminal_read can return only bytes emitted after a supplied position, while terminal_get_history retrieves earlier output without consuming it. terminal_wait and terminal_watch wait for output patterns or other session events instead of requiring repeated polling. Long-running calls may emit best-effort progress notifications when the MCP client supplies a progress token.

Tools and capabilities

The smart-terminal MCP server provides tools for:

  • Starting, listing, resizing, and stopping named terminal sessions.
  • Executing interactive or one-shot commands.
  • Writing terminal input, sending keys such as Ctrl+C and Tab, and writing files directly.
  • Reading output incrementally, retrieving rolling history, or waiting for patterns and quiet periods.
  • Paging read-only command output, retrying commands, and comparing two command results with a bounded unified diff.
  • Capturing a recent snapshot or saving a full transcript when stopping a session.

Large output from interactive reads and executions is normally reduced to the beginning and end. Paged execution returns a page of lines instead. The meta-tool terminal_extra exposes schemas and calls for less frequently used tools.

Limitations and notes

This server does not compress command output. Its token-related benefits come from returning selected portions of output, reading incrementally, waiting on events, and saving transcripts outside the MCP response. Progress notifications are status updates rather than a full stdout stream, and whether they appear depends on the client.

terminal_run is intended for predictable automation but does not support shell built-ins such as cd or dir. The server supports up to 10 concurrent sessions and includes idle cleanup. On Unix, stopping a session terminates its complete process group to reduce the chance of orphaned child processes. If an AI client already offers a stable interactive, stateful terminal with suitable output handling, this server may not be necessary for basic command execution.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Smart Terminal

smart-terminal is an MCP server that connects AI clients to persistent PTY-backed shell sessions. Its main tools start sessions, execute interactive or direct commands, write input, read output, wait for patterns, retry commands, inspect history, and stop sessions. It supports Windows, Linux, and macOS shell workflows.

It identifies smart-terminal as an MCP server and links to its GitHub repository, but the available documentation excerpt does not specify a package command, transport configuration, or client setup file.

Yes, Cursor is named as an MCP-capable client supported by the documented portable terminal workflow. The material does not provide Cursor-specific installation or configuration instructions.

Use `terminal_run` with a command and separate argument list. It runs with `shell=false`, which makes it the documented choice for predictable one-shot automation, but shell built-ins such as `cd` and `dir` are not supported.

Use `terminal_watch` for trigger patterns, quiet periods, timeouts, or process exit, or use `terminal_wait` to wait for specific output. `terminal_read` with a `since` position can retrieve only newly emitted bytes when incremental inspection is needed.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSmart Terminal AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/smart-terminal?style=directory)](https://allmcps.com/mcp/smart-terminal)
HTML Embed
<a href="https://allmcps.com/mcp/smart-terminal"><img src="https://allmcps.com/api/badge/smart-terminal?style=directory" alt="Smart Terminal on AllMCPs" /></a>