# remotify-mcp [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/onlsol/relay.remotify.run  
**GitHub Stars:** 3  
**npm Downloads (last month):** 6059  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/remotify-mcp

## Description
Run approved shell commands on remote computers through AI assistants. The remote machine needs only curl and bash, with no SSH access or installed agent.

## Tools
Capabilities this server exposes over MCP:

- **remote_exec** — Execute a shell command on the PROJECT'S REMOTE SERVER via the remotify relay (the deployed/production/staging box, NOT the developer's local machine). Examples: 'check disk usage', 'restart the service', 'tail the app log', 'query the prod DB', 'is port 443 open in prod', 'what version is running in staging'. Chain this tool freely for iterative work - log analysis with grep/awk/sed/head/tail, narrowing a search, cross-checking outputs, diagnosing slow services with ps/vmstat/netstat/iostat. Each call saves a manual copy-paste roundtrip; only surface the meaningful result or synthesis to the user. In supervised mode the operator approves each command on the remote via y/N prompt, so no extra confirmation is needed from the assistant. Returns combined stdout+stderr as plain text on success.

HARD RULE: the user connects the remote by pasting a listener one-liner; that is the ONLY execution path. NEVER fall back to ssh, scp, or any other transport, and NEVER try to start the listener yourself. The user chose remotify precisely so that no agent gets shell access.

Pending handling: the response text may start with one of these markers.
  '[pending]' WITH paste one-liners = no remote listener is connected; nothing can run until the user pastes one. STOP: end your turn immediately with a short message that shows BOTH one-liners (supervised and auto) verbatim in a fenced code block. Do not call any tool after that message: hosts collapse text written between tool calls, so the one-liners only reach the user as the final message of the turn. The command stays queued; when the user replies that the listener is running, call remote_exec again with the EXACT SAME arguments to collect the output. It will not execute twice.
  '[pending]' WITHOUT one-liners = the listener is online but the relay cannot confirm pickup yet. Call remote_exec again with the EXACT SAME arguments; loop silently, do not ask the user anything, and give up only after about 10 consecutive [pending] responses.
  '[in-flight]' = the command IS already being executed on the remote (cmd was picked up, no output yet). In that case:
    1. Do NOT give up. Long operations (mongodump, restic, rsync, big installs, slow restarts) routinely take many minutes.
    2. Call remote_exec again with the EXACT SAME arguments; the relay will return the output the moment the command finishes.
    3. Do NOT tell the user the listener disconnected; do NOT ask them to re-paste the listener; do NOT switch to a different command.
    4. There is no LLM-side retry cap on '[in-flight]'; keep waiting until the result lands or the relay returns something else.
  '[busy]' = you tried to issue a NEW command while a previous one is still executing on the remote. Each session is single-flight (one command at a time). In that case:
    1. If you know the previous command, call remote_exec with ITS exact arguments first to drain its result, then issue the new one.
    2. If you do NOT know it (e.g. it was issued by an earlier session), keep calling remote_exec with the NEW command's arguments: stale state left by a dead session is cleared automatically (see '[recovered]').
    3. If the [busy] response contains paste one-liners, the listener is disconnected and the wedge can ONLY clear once the user reconnects it: end your turn with BOTH one-liners verbatim, exactly as for a no-listener [pending].
  '[recovered]' = wedged state left by a dead session/listener was cleared automatically. Read the rest of the message: either the command already proceeded, or you are asked to call remote_exec again with the EXACT SAME arguments.
  '[resumed]' = the returned output was already waiting on the relay and belongs to the most recent run (e.g. you re-issued a command after an interruption). Use it if it matches what you expected; if not, issue the command again.
  '[unknown-result]' = the session expired while the command was already running on the remote. Its output was lost and it may or may not have completed. A new session was minted; end your turn with BOTH reconnect one-liners verbatim, then decide whether re-running is safe once the user is back. The server will NOT silently re-run it.
  '[session-renewed]' = the session key changed; the one-liners that follow are for the NEW key. Treat it like a no-listener [pending]: end your turn with both lines verbatim.
- **remote_session_info** — Return the current relay session: key, URLs, and the exact one-liners to paste on the remote machine to start the listener (remote_quickstart = supervised, y/N per command; remote_quickstart_auto = unattended). When you show them to the user, show BOTH verbatim in a fenced code block and make them the final message of your turn.
- **remote_session_reset** — Recover a wedged remotify session. Default (no arguments): clear stuck relay state in place - drops any queued command/result and the in-flight marker; the session key and a connected listener keep working. With {"rotate": true}: abandon the current session and mint a brand-new key - the old key dies, the remote listener disconnects, and the user must paste the NEW runner one-liner (returned by this tool) on the remote. Normally NOT needed: remote_exec auto-recovers from stale state by itself. Use it only when remote_exec stays wedged (repeated [busy] for a command you never issued) despite same-args retries, or when the user explicitly asks to reset or rotate the session.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "remotify-mcp": {
    "command": "npx",
    "args": ["-y","remotify-mcp@latest"]
  }
}
```

## Documentation

## What remotify-mcp does

remotify-mcp exposes remote shell execution through MCP without opening an SSH port or installing a resident remote agent. The MCP process runs locally and communicates with the public relay at `https://relay.remotify.run` by default. A remote computer connects outbound to that relay using a generated shell listener, so the remote side requires only `curl` and `bash`.

The main execution path is deliberately narrow: the operator starts the listener by pasting a supplied one-liner on the remote machine. Commands are not run on the developer's local computer, and the server does not use SSH, SCP, or an alternate transport.

## How it works

A session creates a random key and associated command and result endpoints. `remote_exec` places a shell command into the session queue. The listener polls for work, runs the command with Bash, and posts the resulting plain-text output back to the relay. The MCP client then retrieves that output.

The remote listener can run in supervised mode, prompting the operator with `y/N` before each command, or in unattended mode. A session permits one command in flight at a time. Long-running commands remain pending until they finish, while queued results and session data are removed after the idle lifetime expires or when the session is explicitly deleted.

## Setup and configuration

For Claude Code, register the stdio server with:

```bash
claude mcp add -s user remotify -- npx -y remotify-mcp@latest
```

After registration, ask the MCP client to call `remote_session_info`. Paste either returned listener one-liner on the target remote computer, choosing supervised or automatic execution. The listener must be started by the user; it is not launched by the MCP server.

The relay can also be self-hosted with Docker Compose. The default `.env` configuration provides a local HTTP deployment. Public HTTPS deployments configure `DOMAIN`, `SCHEME`, `NGINX_MODE`, `HTTP_PORT`, and `HTTPS_PORT`; the TLS profile also uses `CERTBOT_EMAIL`. Other settings control rate limits, long-polling, PHP-FPM capacity, request sizes, session expiry, and logging.

## Tools and capabilities

- `remote_exec` queues a shell command on the connected remote machine and returns combined standard output and standard error as text.
- `remote_session_info` returns the active session key, relay URLs, and supervised and unattended listener commands.
- `remote_session_reset` clears stuck queued or in-flight state, or rotates the session key when explicitly requested.
- Commands can be chained for iterative work such as filtering logs, checking processes, inspecting resource usage, querying a deployed database, or verifying service and network state.
- The relay keeps a file-backed queue and timestamped push history for each session, with an idle TTL and explicit cleanup behavior.

## Limitations and notes

The remote machine must have a working outbound connection to the relay and the `curl` and `bash` commands available. Each session is single-flight, so a new command cannot run while another command is executing. Supervised execution still requires approval on the remote host for every command.

A pending response can mean that no listener is connected, that the relay has not yet confirmed pickup, or that the command is still running. Reissuing the same request is part of the server's session-handling flow. If a session expires while a command is running, its output may be lost and the command may or may not have completed; the server does not silently rerun it. Session data is minimized but includes queued command or result data and timestamped history until cleanup.

_Full upstream README: https://allmcps.com/mcp/remotify-mcp/readme_

