Skip to content
MCP server

Smart Terminal

Persistent interactive terminal sessions for AI agents, with strong Windows support

Runs locally

Smart Terminal is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Windows, macOS
Runs
Locally
What it can do
Can change data (5 tools)
Version
1.2.42
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add smart-terminal -- npx -y smart-terminal-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "smart-terminal": {
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "smart-terminal": {
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "smart-terminal": {
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "smart-terminal": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add smart-terminal -- npx -y smart-terminal-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.smart-terminal]
command = "npx"
args = ["-y", "smart-terminal-mcp"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "smart-terminal": {
      "command": "npx",
      "args": [
        "-y",
        "smart-terminal-mcp"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user smart-terminal npx -- -y smart-terminal-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "smart-terminal": {
          "command": "npx",
          "args": [
            "-y",
            "smart-terminal-mcp"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About Smart Terminal

Smart Terminal gives an agent a long-lived PTY shell via node-pty, so the working directory, environment and running processes carry from one step to the next. That matters for tools that hang on piped stdin, such as vim, npm prompts, REPLs and installers, and it supports Ctrl+C and arrow keys without hand-built escape sequences.

The tool set is built around keeping output manageable. terminal_exec uses unique completion markers and can exit early when output goes quiet; terminal_read takes a since position for incremental reads; terminal_wait and terminal_watch block until a pattern appears; terminal_retry reruns flaky commands with backoff; terminal_run_paged returns large read-only output a page at a time; terminal_diff compares two results; terminal_get_history revisits earlier output. terminal_run executes a binary directly with shell=false for predictable one-shot calls.

It supports up to 10 named sessions with readable IDs, detects PowerShell, cmd, bash or sh automatically and kills whole process groups on stop. The README is candid that a client with a good built-in terminal may not need it; the pitch is a consistent workflow across Claude Code, Cursor and others. Installs from npm.

Tools this server provides (11)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 5 of 11 tools change data; 4 names don't say.

From the server's own tool labels and tool names; not verified by us.

terminal_execName suggests: changes
Run a command with deterministic completion markers
terminal_writeName suggests: changes
Send input or keystrokes to the session
terminal_readName suggests: reads
Read output, incrementally by position
terminal_wait
Wait for a pattern to appear
terminal_watch
Event-driven watch for trigger patterns
terminal_retry
Re-run flaky commands with bounded backoff
terminal_runName suggests: changes
Run a binary directly with shell disabled
terminal_run_pagedName suggests: changes
Page through large read-only output
terminal_diff
Unified diff of two command results
terminal_get_historyName suggests: reads
Revisit earlier session output
terminal_stopName suggests: changes
Stop a session, optionally saving a transcript

What it does

Persistent PTY sessions
Shell state survives across steps.
Pattern waiting
Wait or watch for text instead of polling.
Incremental reads
Fetch only output since the last position.
Paged and diffed output
Page large results or diff two runs.
Direct one-shot runs
Execute binaries with shell=false.
Windows support
Auto-detects pwsh, PowerShell or cmd.

Good for

  • Run an interactive installer through an agent
  • Watch a dev server log for a ready message
  • Retry a flaky command with backoff
  • Keep one shell open across a long debugging session
  • Compare outputs of two builds

Pricing

Open source

Free npm package

Smart Terminal FAQ

How many sessions can I run?

Up to 10 concurrent named sessions.

How does Smart Terminal avoid hanging on prompts?

It uses a real pseudo-terminal instead of piped stdin.

Does Smart Terminal save tokens?

The README says targeted reads can reduce context use, without guaranteeing runtime savings.

Which shells are detected?

pwsh, PowerShell or cmd on Windows; $SHELL, bash or sh elsewhere.

Is Smart Terminal free?

Yes. Smart Terminal is open source, so you can use and self-host it for free.

How do I add Smart Terminal to Claude Code?

Run this command in your terminal: claude mcp add smart-terminal -- npx -y smart-terminal-mcp

What are the best alternatives to Smart Terminal?

The closest alternatives to Smart Terminal are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers