terminal-mcp
El problema
Todas las herramientas de codificación con IA se topan con el mismo muro: no tienen acceso real a una terminal.
La herramienta Bash de Claude Code, GitHub Copilot y Codex ejecutan comandos en subprocesos aislados. Cada comando comienza desde cero. No se conserva ningún estado. Eso significa:
Sin sesiones SSH – No se puede conectar a un servidor remoto y ejecutar múltiples comandos.
Sin REPLs – No se puede usar intérpretes interactivos de Python, Node o Ruby.
Sin CLIs de bases de datos – No se puede mantener una conexión de psql, mysql o redis-cli.
Sin aplicaciones TUI – No se puede navegar htop, vim o fzf con las teclas de flecha.
Sin procesos de larga duración – No se puede monitorear compilaciones, ver logs o ejecutar servidores de desarrollo.
Related MCP server: Interactive Terminal MCP Server
La solución
terminal-mcp les da a los agentes de IA una terminal real. Sesiones PTY persistentes que sobreviven entre llamadas a herramientas. Envía comandos, lee la salida, presiona teclas, navega TUIs – exactamente como un humano en una terminal.
uvx terminal-mcpUn solo comando. Funciona con Claude Code, Claude Desktop, VS Code, Cursor y Windsurf.
Inicio rápido
1. Instalación (30 segundos)
# No install needed - run directly
uvx terminal-mcp
# Or install globally
pip install terminal-mcp2. Conéctate a tu cliente de IA
Añade a ~/.claude.json o .mcp.json del proyecto:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}Añade a claude_desktop_config.json:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}Haz clic en la insignia de instalación con un clic de arriba, o añade a .vscode/mcp.json:
{
"servers": {
"terminal-mcp": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}Añade a ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"]
}
}
}3. Verificación
session_exec exec="echo hello from terminal-mcp"¿Qué puedes hacer con esto?
Conectarte por SSH a servidores remotos
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"Ejecutar REPLs interactivos
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"Consultar bases de datos
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"Navegar aplicaciones TUI
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"Monitorear compilaciones de larga duración
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=120Ejecutar comandos puntuales
session_exec exec="git log --oneline -10"
session_exec exec="docker compose ps" timeout=10Características de un vistazo
Característica | Qué hace |
Sesiones persistentes | Sesiones PTY reales que sobreviven entre llamadas a herramientas |
Enviar y leer en una llamada |
|
Lecturas basadas en patrones |
|
Detección automática de TUI | Detecta htop, vim, etc. y cambia automáticamente al modo de captura de pantalla |
Modo de diferencias de salida | Devuelve solo las líneas de pantalla cambiadas – minimiza los tokens |
Teclas especiales | Flechas, Tab, F1-F12, Inicio/Fin, RePág/AvPág |
Caracteres de control | Ctrl-C, Ctrl-D, Ctrl-Z, Ctrl-L, escape de telnet |
Puerta de comandos peligrosos | Bloquea |
Integración de shell OSC 133 | Detecta automáticamente los límites de comandos y códigos de salida |
Truncamiento inteligente | Cuatro estrategias para evitar el desbordamiento de contexto |
Entrada secreta | Envía contraseñas sin que queden registradas |
Redimensionamiento dinámico | Redimensiona la terminal sobre la marcha con SIGWINCH |
Limpieza por inactividad | Cierra automáticamente sesiones inactivas |
Multiplataforma | Soporte para Linux, macOS y Windows |
Referencia de herramientas
terminal-mcp expone 9 herramientas MCP. Detalles completos en docs/tools.md.
Herramienta | Propósito |
Crear una sesión de terminal persistente | |
Enviar texto, teclas o caracteres de control | |
Leer la salida (modos: flujo, instantánea, auto, diferencias) | |
Enviar + leer en una sola llamada | |
Esperar un patrón regex en la salida | |
Ejecución de comando único | |
Cerrar una sesión de forma ordenada | |
Redimensionar las dimensiones de la terminal | |
Listar sesiones activas |
Arquitectura
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| ServerCada sesión está respaldada por un PTY real mediante pexpect.spawn (o PopenSpawn en Windows). Para más detalles sobre la arquitectura, consulta docs/architecture.md.
Configuración
Todos los ajustes son configurables mediante variables de entorno TERMINAL_MCP_*. Referencia completa en docs/configuration.md.
Ajuste | Variable de entorno | Valor por defecto |
Máx. sesiones |
|
|
Tiempo de inactividad |
|
|
Puerta de seguridad |
|
|
Límite de búfer |
|
|
Truncamiento |
|
|
Ejemplo con ajustes personalizados:
{
"mcpServers": {
"terminal": {
"command": "uvx",
"args": ["terminal-mcp"],
"env": {
"TERMINAL_MCP_MAX_SESSIONS": "20",
"TERMINAL_MCP_IDLE_TIMEOUT": "3600",
"TERMINAL_MCP_TRUNCATION_MODE": "head_tail"
}
}
}
}Documentación
Documento | Descripción |
API completa de las 9 herramientas MCP | |
Cómo funciona terminal-mcp por dentro | |
Todos los ajustes y variables de entorno | |
Detección de comandos peligrosos y puerta de seguridad | |
Recetas y patrones del mundo real | |
Historial de versiones y notas de lanzamiento | |
Cómo contribuir |
Clientes compatibles
Cliente | Estado | Instalación |
Claude Code (CLI) | Compatible |
|
Claude Desktop | Compatible | |
VS Code (Copilot Chat) | Compatible | Instalación con un clic o |
Cursor | Compatible | Instalación con un clic o Configuración |
Windsurf | Compatible |
|
Ejecutar pruebas
pip install -e ".[dev]"
pytest tests/ -vContribuir
¡Las contribuciones son bienvenidas! Consulta docs/contributing.md para conocer las pautas.
Licencia
Available Tools
9 toolssession_closeA
Terminate a session gracefully. Sends EOF, then SIGHUP, then SIGKILL.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID to close |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| cols | No | Terminal width in columns | |
| rows | No | Terminal height in rows | |
| label | No | Human-readable label for the session | |
| command | Yes | Shell command to run (e.g. 'bash', 'python3', 'ssh user@host') | |
| idle_timeout | No | Seconds before auto-closing idle session | |
| enable_snapshot | No | Deprecated: snapshot is now always enabled. Kept for backward compatibility. | |
| scrollback_lines | No | Number of scrollback history lines to keep |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| cols | No | Terminal width in columns | |
| exec | Yes | Command to execute in the session | |
| rows | No | Terminal height in rows | |
| command | No | Shell to use (default: bash) | bash |
| timeout | No | Seconds to wait for command output | |
| truncation | No | Truncation mode for output |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Special key | |
| input | No | Text to send | |
| timeout | No | Seconds to wait for output | |
| password | No | Secret input (not logged) | |
| wait_for | No | Regex pattern to wait for in output | |
| confirmed | No | Set to true to bypass dangerous command gate | |
| read_mode | No | Read mode for output: 'stream' (default), 'snapshot', 'auto', 'diff' | |
| session_id | Yes | Session ID | |
| strip_ansi | No | Strip ANSI sequences | |
| truncation | No | Truncation mode for output | |
| press_enter | No | Append carriage return | |
| control_char | No | Control character |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Read mode: 'auto' (default, auto-selects stream/snapshot), 'stream', 'snapshot', or 'diff' | auto |
| timeout | No | Settle timeout in seconds (stream mode) | |
| scrollback | No | Lines of scrollback history to include (snapshot mode only) | |
| session_id | Yes | Session ID returned by session_create | |
| strip_ansi | No | Strip ANSI escape sequences from output | |
| truncation | No | Truncation mode: 'tail' (keep beginning), 'head_tail' (keep beginning+end), 'tail_only' (keep end), 'none' (no truncation) |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| cols | Yes | New terminal width in columns | |
| rows | Yes | New terminal height in rows | |
| session_id | Yes | Session ID returned by session_create |
TDQS
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.
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.
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.
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.
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.
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').
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Special key to send (arrow keys, function keys, etc.) | |
| input | No | Text to send to the session | |
| password | No | Password or secret to send (will not be logged) | |
| confirmed | No | Set to true to bypass dangerous command gate | |
| session_id | Yes | Session ID returned by session_create | |
| press_enter | No | Append carriage return after input | |
| control_char | No | Control character to send: 'c' (SIGINT), 'd' (EOF), 'z' (SIGTSTP), 'l' (clear), ']' (telnet) |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | Regex pattern to wait for in output | |
| timeout | No | Max seconds to wait | |
| session_id | Yes | Session ID | |
| strip_ansi | No | Strip ANSI escape sequences | |
| truncation | No | Truncation mode for output |
TDQS
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.
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.
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.
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.
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.
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.
9 tool updates
v0.4.7- First observed
session_close - First observed
session_create - First observed
session_exec - First observed
session_interact - First observed
session_list - First observed
session_read - First observed
session_resize - First observed
session_send - First observed
session_wait_for
TDQS
Scored across 9 tools
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.
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.
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.
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
Related MCP Connectors
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Persistent Linux computers for AI agents: desktop, signed-in browser, vault, apps and shell.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides stateful, interactive terminal access for LLMs to spawn and maintain persistent processes like SSH sessions, debuggers, and REPLs with continuous input/output interaction across commands.8-
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with fully interactive terminal sessions, including TUI support, keyboard control, and screen capture across Windows, Linux, and Mac.MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to have persistent, fully interactive SSH sessions into remote hosts, behaving like a local terminal.14 npm2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely execute terminal commands with persistent sessions, async jobs, and mission control, while providing a live dashboard for human oversight.4Apache 2.0