Skip to main content
Glama
mkpvishnu

terminal-mcp

by mkpvishnu

The Problem

Every AI coding tool hits the same wall: no real terminal access.

Claude Code's Bash tool, GitHub Copilot, and Codex all run commands in isolated subprocesses. Each command starts fresh. No state carries over. That means:

  • No SSH sessions - Can't connect to a remote server and run multiple commands

  • No REPLs - Can't use Python, Node, or Ruby interpreters interactively

  • No database CLIs - Can't maintain a psql, mysql, or redis-cli connection

  • No TUI apps - Can't navigate htop, vim, or fzf with arrow keys

  • No long-running processes - Can't monitor builds, watch logs, or run dev servers

Related MCP server: Interactive Terminal MCP Server

The Solution

terminal-mcp gives AI agents a real terminal. Persistent PTY sessions that survive across tool calls. Send commands, read output, press keys, navigate TUIs - exactly like a human at a terminal.

uvx terminal-mcp

One command. Works with Claude Code, Claude Desktop, VS Code, Cursor, and Windsurf.


Quick Start

1. Install (30 seconds)

# No install needed - run directly
uvx terminal-mcp

# Or install globally
pip install terminal-mcp

2. Connect to Your AI Client

Add to ~/.claude.json or project .mcp.json:

{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["terminal-mcp"]
    }
  }
}

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["terminal-mcp"]
    }
  }
}

Click the one-click install badge above, or add to .vscode/mcp.json:

{
  "servers": {
    "terminal-mcp": {
      "command": "uvx",
      "args": ["terminal-mcp"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["terminal-mcp"]
    }
  }
}

3. Verify

session_exec  exec="echo hello from terminal-mcp"

What Can You Do With It?

SSH Into Remote Servers

session_create   command="ssh user@prod-server.com"   label="prod"
session_interact session_id="a1b2c3d4"  input="df -h"  wait_for="\$"
session_interact session_id="a1b2c3d4"  input="docker ps"  wait_for="\$"
session_close    session_id="a1b2c3d4"

Run Interactive REPLs

session_create   command="python3"  label="python"
session_interact session_id="e5f6g7h8"  input="import pandas as pd"  wait_for=">>>"
session_interact session_id="e5f6g7h8"  input="df = pd.read_csv('data.csv')"  wait_for=">>>"
session_interact session_id="e5f6g7h8"  input="df.describe()"  wait_for=">>>"
session_close    session_id="e5f6g7h8"

Query Databases

session_create   command="psql -U admin mydb"  label="db"
session_interact session_id="x1y2z3w4"  input="SELECT count(*) FROM users;"  wait_for="row"
session_interact session_id="x1y2z3w4"  input="\dt"  wait_for="#"
session_close    session_id="x1y2z3w4"

Navigate TUI Apps

session_create   command="htop"  label="monitor"
session_read     session_id="a1b2c3d4"
# Auto-detects TUI, returns screen snapshot

session_send     session_id="a1b2c3d4"  key="F6"
session_read     session_id="a1b2c3d4"  mode="diff"
# Returns only changed lines - saves tokens

session_send     session_id="a1b2c3d4"  key="F10"
session_close    session_id="a1b2c3d4"

Monitor Long-Running Builds

session_create   command="bash"  label="build"
session_send     session_id="a1b2c3d4"  input="npm run build"
session_wait_for session_id="a1b2c3d4"  pattern="Build complete|ERROR"  timeout=120

Run One-Off Commands

session_exec  exec="git log --oneline -10"
session_exec  exec="docker compose ps"  timeout=10

Features at a Glance

Feature

What It Does

Persistent Sessions

Real PTY sessions that survive across tool calls

Send + Read in One Call

session_interact halves LLM round trips

Pattern-Based Reads

wait_for blocks until regex matches - no guessing timeouts

Auto TUI Detection

Detects htop, vim, etc. and auto-switches to screen snapshot mode

Output Diff Mode

Returns only changed screen lines - minimizes tokens

Special Keys

Arrow keys, Tab, F1-F12, Home/End, Page Up/Down

Control Characters

Ctrl-C, Ctrl-D, Ctrl-Z, Ctrl-L, telnet escape

Dangerous Command Gate

Blocks rm -rf, DROP TABLE, curl|sh - requires confirmation

OSC 133 Shell Integration

Auto-detects command boundaries and exit codes

Smart Truncation

Four strategies to prevent context overflow

Secret Input

Send passwords without logging

Dynamic Resize

Resize terminal on the fly with SIGWINCH

Idle Cleanup

Auto-closes idle sessions

Cross-Platform

Linux, macOS, and Windows support


Tools Reference

terminal-mcp exposes 9 MCP tools. Full details in docs/tools.md.

Tool

Purpose

session_create

Spawn a persistent terminal session

session_send

Send text, keys, or control characters

session_read

Read output (stream, snapshot, auto, diff modes)

session_interact

Send + read in one call

session_wait_for

Wait for regex pattern in output

session_exec

One-shot command execution

session_close

Close a session gracefully

session_resize

Resize terminal dimensions

session_list

List active sessions


Architecture

flowchart LR
    Client[AI Client] -->|MCP JSON-RPC| Server[terminal-mcp]
    Server --> SM[Session Manager]
    SM --> S1[PTY 1: bash]
    SM --> S2[PTY 2: python3]
    SM --> S3[PTY 3: ssh user@host]
    S1 & S2 & S3 -.->|PTY output| Reader[Reader Thread]
    Reader -.->|buffer| Server

Each session is backed by a real PTY via pexpect.spawn (or PopenSpawn on Windows). For full architecture details, see docs/architecture.md.


Configuration

All settings configurable via TERMINAL_MCP_* environment variables. Full reference in docs/configuration.md.

Setting

Env Var

Default

Max sessions

TERMINAL_MCP_MAX_SESSIONS

10

Idle timeout

TERMINAL_MCP_IDLE_TIMEOUT

1800 (30 min)

Safety gate

TERMINAL_MCP_SAFETY_GATE

on

Buffer cap

TERMINAL_MCP_MAX_BUFFER_BYTES

1000000 (1MB)

Truncation

TERMINAL_MCP_TRUNCATION_MODE

tail

Example with custom settings:

{
  "mcpServers": {
    "terminal": {
      "command": "uvx",
      "args": ["terminal-mcp"],
      "env": {
        "TERMINAL_MCP_MAX_SESSIONS": "20",
        "TERMINAL_MCP_IDLE_TIMEOUT": "3600",
        "TERMINAL_MCP_TRUNCATION_MODE": "head_tail"
      }
    }
  }
}

Documentation

Document

Description

Tools Reference

Complete API for all 9 MCP tools

Architecture

How terminal-mcp works under the hood

Configuration

All settings and environment variables

Safety & Security

Dangerous command detection and safety gate

Use Cases & Examples

Real-world recipes and patterns

Changelog

Version history and release notes

Contributing

How to contribute


Supported Clients

Client

Status

Install

Claude Code (CLI)

Supported

~/.claude.json or .mcp.json

Claude Desktop

Supported

One-click install

VS Code (Copilot Chat)

Supported

One-click install or .vscode/mcp.json

Cursor

Supported

One-click install or Settings

Windsurf

Supported

~/.codeium/windsurf/mcp_config.json


Running Tests

pip install -e ".[dev]"
pytest tests/ -v

Contributing

Contributions welcome! See docs/contributing.md for guidelines.

License

MIT

Available Tools

9 tools
session_closeA

Terminate a session gracefully. Sends EOF, then SIGHUP, then SIGKILL.

ParametersJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID to close

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It explicitly discloses the escalation strategy (sends EOF, then SIGHUP, then SIGKILL), which goes beyond a simple 'terminate' and informs the agent about potential forceful behavior. This is valuable context for an AI agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—two sentences, no filler. Every word serves a purpose, and the critical behavioral detail is front-loaded. It achieves maximum clarity with minimal text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one required parameter and no output schema, the description adequately covers the core behavior. A minor gap is the lack of information about the return value or error states, but given the tool's simplicity, it is substantially complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; the schema already describes the only parameter ('Session ID to close'). The description adds no additional meaning or usage constraints for this parameter, so a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Terminate') and the resource ('a session'). The details on the termination sequence (EOF, SIGHUP, SIGKILL) differentiate it from sibling tools like session_resize, session_list, etc., making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., session_interact, session_exec). There is no mention of prerequisites or conditions under which closing is appropriate. The description only states what it does, not when to choose it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_createA

Spawn a persistent PTY terminal session. Returns a session_id used by all other session_* tools. Supports interactive shells, SSH, REPLs, and database CLIs. Snapshot mode is always available.

ParametersJSON Schema
NameRequiredDescriptionDefault
colsNoTerminal width in columns
rowsNoTerminal height in rows
labelNoHuman-readable label for the session
commandYesShell command to run (e.g. 'bash', 'python3', 'ssh user@host')
idle_timeoutNoSeconds before auto-closing idle session
enable_snapshotNoDeprecated: snapshot is now always enabled. Kept for backward compatibility.
scrollback_linesNoNumber of scrollback history lines to keep

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the persistent nature of the session and that snapshot mode is always available, which are key behavioral traits. It could add details about resource usage or cleanup requirements, but the disclosed info is sufficient for safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise at two sentences, but the second sentence could be streamlined (e.g., 'Supports interactive shells, SSH, REPLs, and database CLIs.' is a bit broad). Overall, every sentence contributes meaning without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the tool (7 parameters, no output schema) and the lack of annotations, the description provides a solid understanding of what the tool does and the returned session_id. It could be more complete by noting that the session persists until explicitly closed or the idle_timeout expires, and that commands are executed in a new terminal environment. However, the given info is mostly adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 7 parameters thoroughly. The description adds value by explaining that 'enable_snapshot' is deprecated (though kept for backward compatibility) and clarifies that snapshot is always enabled. This extra context goes beyond what the schema provides, justifying a score above the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool spawns a persistent PTY terminal session and returns a session_id, which is the core purpose. It explicitly distinguishes itself from sibling tools by noting that the returned session_id is used by all other session_* tools, making the relationship to siblings clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage with examples (interactive shells, SSH, REPLs, database CLIs) and notes the session_id is used by sibling tools, implying this is the first tool to call. However, it does not explicitly state when NOT to use it (e.g., for non-interactive scripts) or mention alternatives beyond the sibling set.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_execB

Execute a command in a temporary session and return the output. The session is automatically cleaned up after execution.

ParametersJSON Schema
NameRequiredDescriptionDefault
colsNoTerminal width in columns
execYesCommand to execute in the session
rowsNoTerminal height in rows
commandNoShell to use (default: bash)bash
timeoutNoSeconds to wait for command output
truncationNoTruncation mode for output

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It states that the session is 'temporary' and 'automatically cleaned up after execution,' which tells the agent the session has a short lifecycle. However, it omits important behaviors: what happens on timeout (partial output vs. error), how truncation affects returned data, whether state is preserved between executions, or that cleanup means the session cannot be reused. Given zero annotations, more behavioral context is expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two sentences, totaling 20 words. It immediately states the core action and outcome, then adds one critical piece of lifecycle information. Every word earns its place with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters including enums, no output schema), the description is too sparse. An agent needs to know: what happens on timeout, the format of returned output, whether stderr is captured, and how truncation modes differ. Since there is no output schema, the description should compensate by summarizing return behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so each parameter already has a description in the schema. The tool description adds no additional semantic context beyond what the schema provides. The baseline of 3 is appropriate because the description does not explain how parameters interact (e.g., how truncation modes affect output, or that cols/rows are only meaningful for interactive programs).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute a command in a temporary session and return the output,' which specifies the action (execute), the resource (temporary session), and the result (return output). This differentiates it from sibling tools like session_send (which sends input without returning final output) and session_read (which reads existing output). The addition of 'temporary' and 'automatically cleaned up' adds valuable distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like session_interact, session_send, or session_read. It doesn't explain that this is a one-shot execution tool suitable for quick commands, while session_interact is for ongoing interaction. No prerequisites, when-not-to-use, or behavior for long-running commands is mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_interactA

Send input and read output in a single call. Combines session_send + session_read to halve round trips. Optionally waits for a regex pattern in the output.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyNoSpecial key
inputNoText to send
timeoutNoSeconds to wait for output
passwordNoSecret input (not logged)
wait_forNoRegex pattern to wait for in output
confirmedNoSet to true to bypass dangerous command gate
read_modeNoRead mode for output: 'stream' (default), 'snapshot', 'auto', 'diff'
session_idYesSession ID
strip_ansiNoStrip ANSI sequences
truncationNoTruncation mode for output
press_enterNoAppend carriage return
control_charNoControl character

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses the combined send+read behavior and optional wait_for, but omits key behavioral traits: the effect of the 'confirmed' parameter for bypassing dangerous command gates, how input/key/control_char interact, error handling, or what happens on timeout. The mention of halving round trips is a performance note, not a behavioral trait. The description is adequate but incomplete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core purpose, no filler. Every word earns its place. The structure is efficient and to the point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 12 parameters, 9 sibling tools, no output schema, and no annotations, the description is far too minimal. It does not explain parameter interactions, what the output looks like, how it relates to siblings like session_send, session_read, or session_exec, or how to handle the 'confirmed' gate. A tool of this complexity requires more context to be fully usable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description adds no new meaning to individual parameters—'Optionally waits for a regex pattern' restates the wait_for schema description. It does not explain inter-parameter relationships (e.g., input vs. key vs. control_char mutual exclusivity) or the implications of confirmed, read_mode, or truncation. No additional value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Send input and read output'), resource ('call' on a session), and distinguishes from siblings by noting it combines session_send and session_Read, halving round trips. This meets the 'specific verb+resource' criterion and differentiates from sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use this tool (when you need both send and read in one call to halve round trips) and mentions optional regex waiting, suggesting an alternative to using separate session_send, session_read, and session_wait_for. However, it does not explicitly state when not to use it or list exclusion cases, which keeps it from a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_listA

List all active terminal sessions with their status and idle time.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and clearly states the tool is read-only ('List all active terminal sessions') and specifies the output fields (status, idle time). This is sufficient for a simple listing operation, though it omits potential details like permissions or whether the list is real-time.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence of 10 words with no filler. Every word adds value: the verb, the resource, and the output specifics are all present. This is an example of ideal conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no output schema, and no annotations, the description adequately covers its purpose and return content. There are no missing pieces for the agent to understand its basic function.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters and 100% coverage, so the baseline is 4. The description adds no parameter information because none is needed; it simply describes what the tool returns without requiring any input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('List') and resource ('active terminal sessions') along with the output details ('status and idle time'). This clearly distinguishes it from sibling tools like session_create, session_send, or session_read, which perform actions on individual sessions rather than merely listing them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description implies that this tool is used to obtain a list of active sessions (e.g., before acting on a session), it does not explicitly state when to use it versus alternatives, nor does it provide cues such as 'use this to get session IDs for other tools'. The guidance is purely implicit from the tool name and sibling context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_readA

Read output from a session. Mode 'auto' (default) auto-detects TUI applications and switches between stream and snapshot. 'diff' returns only changed screen lines.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoRead mode: 'auto' (default, auto-selects stream/snapshot), 'stream', 'snapshot', or 'diff'auto
timeoutNoSettle timeout in seconds (stream mode)
scrollbackNoLines of scrollback history to include (snapshot mode only)
session_idYesSession ID returned by session_create
strip_ansiNoStrip ANSI escape sequences from output
truncationNoTruncation mode: 'tail' (keep beginning), 'head_tail' (keep beginning+end), 'tail_only' (keep end), 'none' (no truncation)

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Given no annotations, the description partially discloses behavior by explaining mode auto-detection for TUI applications and diff mode returning only changed lines. However, it does not explicitly state that this is a read-only operation (non-destructive) or mention any side effects, rate limits, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose, and every clause contributes meaning. No redundant or vague phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 6 parameters (some mode-specific) and no output schema, the description is too sparse. It does not explain parameter interactions (e.g., timeout only in stream mode, scrollback only in snapshot), truncation, or return format. More detail is needed to fully guide correct usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds value by explaining that 'auto' auto-detects TUI applications and that 'diff' returns only changed screen lines, which is not fully detailed in the schema's parameter descriptions. It does not cover other parameters but that is acceptable given schema completeness.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Read' and resource 'output from a session', defining the tool's core function. It also explains key modes ('auto', 'diff') that distinguish it from sibling tools like session_send or session_create, which handle other session operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use session_read versus alternative tools (e.g., session_list, session_interact). It only describes internal mode behavior, leaving the selection context implicit. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_resizeA

Resize the terminal window of an active session. Sends SIGWINCH to the process.

ParametersJSON Schema
NameRequiredDescriptionDefault
colsYesNew terminal width in columns
rowsYesNew terminal height in rows
session_idYesSession ID returned by session_create

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the SIGWINCH signal sent to the process, which is a critical behavioral detail not evident from the schema. It does not mention other potential effects (e.g., screen refresh) or prerequisites, but the information given is valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at two short sentences. The first sentence clearly states the main action, and the second sentence adds a key behavioral detail. There is no wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple resize operation with well-documented parameters and no output schema, the description is nearly complete. It covers purpose, parameter usage (via schema), and adds the signal behavior. Minor gaps like error conditions or size limits do not significantly impair an agent's ability to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with clear parameter descriptions (e.g., 'New terminal width in columns'). The tool description only restates the overall purpose and does not add additional meaning or constraints to the parameters beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Resize' and the specific resource 'terminal window of an active session', and uniquely identifies the operation among sibling tools like session_create, session_send, etc. The additional detail about sending SIGWINCH further clarifies the mechanism.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when needing to adjust terminal dimensions of an active session, but provides no explicit guidance on when to use this tool versus alternatives or when not to use it. However, siblings are sufficiently distinct that confusion is unlikely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_sendA

Send input text, a control character, or a special key to an active session. Use control_char for signals (e.g. 'c' for Ctrl-C). Use key for special keys (e.g. 'up', 'tab', 'f1').

ParametersJSON Schema
NameRequiredDescriptionDefault
keyNoSpecial key to send (arrow keys, function keys, etc.)
inputNoText to send to the session
passwordNoPassword or secret to send (will not be logged)
confirmedNoSet to true to bypass dangerous command gate
session_idYesSession ID returned by session_create
press_enterNoAppend carriage return after input
control_charNoControl character to send: 'c' (SIGINT), 'd' (EOF), 'z' (SIGTSTP), 'l' (clear), ']' (telnet)

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It explains the modes of input but does not disclose critical behavioral traits such as whether sending certain inputs is destructive, what happens if the session is inactive, or the implications of the 'confirmed' parameter bypassing a dangerous command gate. The password parameter's logging note is a minor positive, but overall transparency is low.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with no wasted words. The first sentence states the core purpose, and the second provides concrete usage examples for the two parameter families. Excellent front-loading of essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 7 parameters and no output schema, the description is relatively lean. It covers the three input modes but lacks explanation of the 'confirmed' parameter's role, the 'press_enter' default behavior, return value, or error conditions. While adequate for straightforward use, more details would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3. The description adds value by mapping control_char values to signals (e.g., 'c' for Ctrl-C) and key enum values to special keys, which clarifies intent beyond the schema's enum lists. This extra context justifies a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool sends input text, control characters, or special keys to an active session. It uses a specific verb-resource pair and distinguishes the action from sibling tools like session_read or session_exec, which handle output or command execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides guidance on how to use the parameters (e.g., 'Use control_char for signals... Use key for special keys...') but does not specify when to choose this tool over alternatives like session_exec or session_interact. No explicit when-not-to-use or context for excluding other tools is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

session_wait_forA

Read output from a session until a regex pattern matches or timeout expires. Use this instead of session_read when you know what output to expect.

ParametersJSON Schema
NameRequiredDescriptionDefault
patternYesRegex pattern to wait for in output
timeoutNoMax seconds to wait
session_idYesSession ID
strip_ansiNoStrip ANSI escape sequences
truncationNoTruncation mode for output

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must fully disclose behavior. It does state the core mechanism (reading output, waiting for pattern or timeout). However, it lacks details on what happens on timeout (e.g., error vs partial output), whether output is returned in full or incrementally, and how parameters like truncation and strip_ansi affect the behavior. The baseline is adequate but leaves gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loading the core purpose and then adding usage guidance. Every word is informative and necessary. No redundancy or verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters, no output schema, and no annotations, the description is moderately complete. It explains the tool's function and when to use it, but does not describe return values or behavior in edge cases (e.g., timeout, truncation effects). Without an output schema, the description should provide more details on what the agent can expect as output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description adds no extra semantic information about parameters—such as pattern format, timeout units, or truncation modes. It provides no value beyond the schema, meeting the baseline but not exceeding it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool reads output from a session until a regex matches or timeout expires. It also explicitly distinguishes from session_read by specifying when to use this alternative, making the purpose and differentiation very clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives direct usage guidance: 'Use this instead of session_read when you know what output to expect.' This implies the appropriate context. However, it does not explicitly mention when NOT to use (e.g., for continuous reading without a pattern) or provide scenarios for alternatives beyond session_read.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 9 tool updatesv0.4.7
    • First observedsession_close
    • First observedsession_create
    • First observedsession_exec
    • First observedsession_interact
    • First observedsession_list
    • First observedsession_read
    • First observedsession_resize
    • First observedsession_send
    • First observedsession_wait_for

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: create/list/resize/send/read/wait/interact/exec/close. Overlaps like session_read vs session_wait_for are well-differentiated by their descriptions (reading vs waiting for a pattern). No two tools could be easily confused.

Naming Consistency5/5

All tools follow a consistent 'session_verb' pattern using snake_case. Verbs are descriptive (create, list, resize, send, read, wait_for, interact, exec, close). No mixing of styles or vague names.

Tool Count5/5

Nine tools is an ideal size for a terminal session manager. Each tool serves a necessary operation without being too few or too many, covering creation, manipulation, reading, and destruction of sessions.

Completeness5/5

The tool set provides a full lifecycle for interactive terminal sessions: creation (session_create), querying (session_list), resizing, input sending (session_send), output reading (session_read, session_wait_for), combined interaction (session_interact), one-shot execution (session_exec), and cleanup (session_close). No obvious gaps.

Maintenance

ActivityMaintained
ResponsivenessSlow

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI agents with fully interactive terminal sessions, including TUI support, keyboard control, and screen capture across Windows, Linux, and Mac.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to have persistent, fully interactive SSH sessions into remote hosts, behaving like a local terminal.
    23
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to spawn persistent terminal sessions, send keystrokes, read screen state, and assert output, allowing them to interact with stateful terminal applications like vim, htop, and gdb.
    41
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mkpvishnu/terminal-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server