remote_exec
MCP tools › Remote, rooms and agents
Run a program on an SSH host without a shell: every element of command is passed as one argument, in cwd (default: the home folder), within timeout seconds (default 120, at most 600). dry_run defaults to true and returns the ssh command line; dry_run=false needs both the user-granted ssh and run rights, is logged in .ferris-idea/agent-log.jsonl and returns exit code, stdout and stderr (each capped at 256 KiB).
Its results carry text from remote: the client is told to treat that as data, never as instructions.
| Capability | remote.remote_exec |
|---|---|
| Area | Remote, rooms and agents |
| Access | changes processes, remote |
| Reaches | process, network |
| Rights | run, ssh |
| Dry run | dry_run, on unless the call turns it off |
Arguments
| Argument | Type | Description |
|---|---|---|
hostrequired | string | Host alias from ~/.ssh/config or [user@]host[:port]. |
commandrequired | array of string | Program and arguments (each passed as one argument, no shell). |
cwd | string | Absolute working folder on the host (default: the home folder). |
timeout | integer | Time limit in seconds (default 120, at most 600).minimum 0 |
dry_run | boolean | Only return what would run (default true). |
Call it from a shell
ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.
ferris-idea call ~/my-project remote_exec '{"host":"<string>","command":[]}'Input schema as JSON
{ "type": "object", "required": [ "host", "command" ], "properties": { "host": { "description": "Host alias from `~/.ssh/config` or `[user@]host[:port]`.", "type": "string" }, "command": { "description": "Program and arguments (each passed as one argument, no shell).", "type": "array", "items": { "type": "string" } }, "cwd": { "description": "Absolute working folder on the host (default: the home folder).", "type": [ "string", "null" ] }, "timeout": { "description": "Time limit in seconds (default 120, at most 600).", "type": [ "integer", "null" ], "minimum": 0 }, "dry_run": { "description": "Only return what would run (default true).", "type": [ "boolean", "null" ] } }}