Run shell command
run_commandExecute shell commands on macOS with captured stdout/stderr, optional streaming output, configurable timeout, and working directory restrictions.
Instructions
Run a command with the user shell. stdout and stderr are captured separately. stream=true sends MCP progress notifications as output arrives. cwd must be inside an allowed root unless DESKTOP_BRIDGE_RESTRICT_SHELL_CWD=false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory; defaults to the first allowed root | |
| stream | No | Emit progress notifications while the process runs | |
| command | Yes | Shell command string, including pipes and redirects | |
| timeoutMs | No | Timeout in ms; defaults to DESKTOP_BRIDGE_COMMAND_TIMEOUT_MS |