Skip to content

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.

Capabilityremote.remote_exec
AreaRemote, rooms and agents
Accesschanges processes, remote
Reachesprocess, network
Rightsrun, ssh
Dry rundry_run, on unless the call turns it off

Arguments

ArgumentTypeDescription
hostrequiredstringHost alias from ~/.ssh/config or [user@]host[:port].
commandrequiredarray of stringProgram and arguments (each passed as one argument, no shell).
cwdstringAbsolute working folder on the host (default: the home folder).
timeoutintegerTime limit in seconds (default 120, at most 600).minimum 0
dry_runbooleanOnly 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.

Terminal window
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"
]
}
}
}