Run Grok
grok_runRun a prompt through Grok in JSON mode for foreground results or streaming-json for background jobs. Configure working directory, model, and other parameters.
Instructions
Run a Grok prompt in foreground JSON mode or background streaming-json mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory for Grok. Defaults to the MCP server cwd. | |
| model | No | Grok model ID to pass with -m/--model. | |
| prompt | Yes | Prompt to send to Grok. Put task text here; do not ask Grok to read Codex private runtime paths such as ~/.codex unless explicitly authorized. | |
| grokBin | No | Explicit Grok binary path. Defaults to GROK_BIN, ~/.grok/bin/grok, ~/.local/bin/grok, Homebrew paths, then PATH. | |
| maxTurns | No | Pass --max-turns. | |
| timeoutMs | No | ||
| background | No | Run as a background job using --output-format streaming-json. | |
| noSubagents | No | Pass --no-subagents. | |
| alwaysApprove | No | Pass --always-approve only when explicitly true. | |
| reasoningEffort | No | Pass --reasoning-effort only for non-default models where the plugin does not know it is unsupported. | |
| disableWebSearch | No | Pass --disable-web-search. | |
| allowCodexPrivatePaths | No | Allow prompts that mention Codex private runtime paths such as ~/.codex. Default false. |