Skip to main content
Glama
pmboxbiz

mcp-ssh-live

by pmboxbiz

ssh_run_persistent

Run remote commands that persist after connection loss, with logged output and process monitoring.

Instructions

Run a command on the remote host that SURVIVES MCP disconnect, Zed restart, or any interruption to the current session. The process runs via nohup in the background; its stdout and stderr are saved to log files on the remote server.

Returns immediately with the remote PID and log file paths. Check progress later with ssh_persistent_status or manually: ssh_exec('tail -n 50 /tmp/mcp-persistent//out.log') ssh_exec('ps -p -o pid,stat,etime,cmd --no-headers || echo DEAD')

WHEN TO USE THIS (not ssh_spawn):

  • Multi-hour or overnight tasks (training runs, large parsers, database migrations, long builds).

  • Any task where losing the MCP connection would be catastrophic.

  • Tasks you want to start now and check on later.

WHEN TO USE ssh_spawn INSTEAD:

  • You need real-time streaming output in chat.

  • The task takes under ~10 minutes and you will stay connected.

NOTE: logs are NOT auto-deleted. Clean up manually with: ssh_exec('rm -rf /tmp/mcp-persistent/')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe shell command to run. Passed to ``bash -c``. Compound commands (``&&``, ``|``, subshells) work normally.
hostNoAlias of the configured host, or its raw address. If omitted, the default host is used.
labelNoOptional human-readable tag stored in the log dir alongside the command for future reference.
work_dirNoBase directory on the remote where per-job subdirectories are created. Default ``/tmp/mcp-persistent``. Use a path outside ``/tmp`` for jobs that must survive a server reboot./tmp/mcp-persistent
envNoOptional environment variables set before the command. Names must match ``[A-Za-z_][A-Za-z0-9_]*``.
cwdNoOptional remote working directory (``cd`` before running).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations exist, so description fully covers behavior: nohup background execution, log files, immediate PID return, no auto-deletion, manual cleanup instructions. Includes example commands for status checks.

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?

Well-structured with sections and bullets, no fluff. Every sentence serves a purpose, balancing thoroughness with 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 tool complexity, description covers purpose, usage, behavior, all parameters, and cleanup. Output schema exists, so return values are already documented.

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?

Input schema coverage is 100%, so baseline is 3. Description adds some context (e.g., work_dir for reboot survival) but does not significantly enhance meaning beyond schema descriptions.

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 runs a command that survives disconnects, using specific verbs ('Run') and resources ('remote host'). It distinguishes from sibling ssh_spawn by targeting long-running tasks.

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

Usage Guidelines5/5

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

Explicit 'WHEN TO USE THIS' and 'WHEN TO USE ssh_spawn INSTEAD' sections provide clear context, including examples (multi-hour tasks, streaming needs).

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

Install Server

Other Tools

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/pmboxbiz/mcp-ssh-live'

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