Skip to content
, ,

Grok Build Guide (2026): Install, Commands, MCP, Privacy and vs Claude Code

10–16 minutes
Smiling woman in a green blazer winking in a bright cosy living room, holding a GROK card, hook v1.0.77 Grok Build guide

Grok Build is xAI’s coding agent for the terminal, and it now ships updates almost daily. Version 1.0.77 landed on November 5, 2026, with fixes for MCP servers and the context meter.

This guide covers everything in one place: install, sign-in, plans, commands, MCP, settings, privacy and how it stacks up against Claude Code and Codex.

TLDR

  • What: a terminal coding agent with a fullscreen TUI, a headless mode for scripts, and Agent Client Protocol (ACP) support.
  • Install: one curl command on macOS and Linux, one PowerShell command on Windows. Then run grok.
  • Sign-in: browser login with your Grok account, or an XAI_API_KEY billed per token.
  • Extras: plan mode, subagents, worktrees, skills, hooks, and MCP servers out of the box.
  • Privacy: run /privacy to check retention, and turn on a sandbox for untrusted repos.

What Is Grok Build?

xAI launched Grok Build as an early beta on May 25, 2026. It calls it “a powerful new coding agent for professional software engineering and complex coding work.”

The name can confuse people, because Grok Build is also the vibe-coding app builder inside the Grok web and mobile apps. This guide is about the terminal agent, the grok command you install on your own machine.

According to xAI’s docs, you can run it in three ways:

  • Interactive TUI: a fullscreen terminal app where you chat, approve plans and review diffs.
  • Headless mode: grok -p "..." runs a task in scripts, CI jobs or bots.
  • ACP: the Agent Client Protocol lets other apps and editors drive Grok Build as an agent.

It reads your repo’s AGENTS.md, plugins, hooks, skills and MCP servers automatically. If you already use these with other agents, see our AGENTS.md guide for how that file works.

What Is New in v1.0.77

Grok Build moves fast. Here are the releases from the last three weeks, based on the changelog entries tracked for each version.

Version Date Key changes
1.0.77 Nov 5, 2026 MCP servers no longer restart on reloads or updates. Context meter fixed after a rewind. New kitty_keyboard setting for Shift+Enter.
1.0.76 Nov 4, 2026 Ctrl+L redraws without flashing. Shell startup functions with special characters work.
1.0.75 Nov 4, 2026 Warnings for invalid permission rules or settings files. New prompt cursor shortcuts.
1.0.74 Nov 2, 2026 /mcps shows a copyable sign-in link when no browser opens. Lower memory and CPU in long sessions.
1.0.73 Oct 28, 2026 Auto-updates skip a version that fails to start. Gruvbox dark theme added.
1.0.72 Oct 27, 2026 Clickable file paths and PR numbers. /delete now defaults to Cancel.

Note: Release trackers also list a v1.0.78 build on November 6. Type /release-notes inside Grok Build to see what your installed version changed.

How to Install Grok Build

Installation is one command. You do not need Node or Python first.

  1. Open a terminal. Use Terminal on macOS, any shell on Linux, or PowerShell on Windows.
  2. Run the installer. Paste the command for your system from the code block below.
  3. Open your project. cd into the folder you want to work on, ideally a Git repo.
  4. Start the agent. Type grok. On first launch, it opens your browser to sign in.
  5. Check the setup. Run grok inspect to see which rules, skills, plugins, hooks and MCP servers it found.
# macOS and Linux
curl -fsSL https://x.ai/cli/install.sh | bash

# Windows (PowerShell)
irm https://x.ai/cli/install.ps1 | iex

To update later, run grok update. Add --check to only check, or --version with a number to install a specific build.

Tip: Coming from Claude Code? Run /import-claude inside the TUI, or grok import from the shell. Grok Build also reads MCP servers from ~/.claude.json and accepts several Claude Code flag names.

Sign-In, Plans and Costs

You can sign in two ways. Pick the one that matches how you pay.

  • Browser login: the default. Run grok or grok login and sign in with your Grok account. Usage comes from your Grok subscription.
  • Device code: on a remote server with no browser, run grok login with the --device-auth flag.
  • API key: set XAI_API_KEY in your environment. You then pay per token at xAI API rates.
export XAI_API_KEY="xai-your-key-here"

Which plans include it

At launch, the beta was for SuperGrok and X Premium Plus subscribers. xAI’s pricing page now lists Build on every paid plan, starting with Plus at $8 a month. Paid tiers draw from a shared usage pool that refreshes weekly.

Plan (x.ai/pricing) Price / month Usage vs Plus
Free $0 Build not listed
Plus $8 Base
Premium $30 4x
Super $100 15x
Ultra $200 50x

xAI does not publish exact Build limits for each plan. Type /usage in the TUI to see your credit usage or manage billing. Our Grok pricing guide covers the plans in more detail.

API key prices

With an API key, you pay xAI’s token rates. These are per million tokens from xAI’s pricing docs.

Model Input Cached input Output
grok-4.7 (under 200K) $2.00 $0.50 $6.00
grok-4.7 Fast (under 200K) $4.00 $1.00 $12.00
grok-build-0.1 (short context) $1.00 $0.20 $2.00

xAI says grok-4.7 Fast is for Cursor and Grok Build only and is not on the public API. To call Grok from your own code instead, see our Grok API Python tutorial.

Modes and Slash Commands

Press Shift+Tab to cycle between session modes. Each one changes how much Grok Build asks before acting.

  • Plan: Grok writes a plan first and can only edit the plan file until you approve. Enter with /plan.
  • Ask (default): it prompts before any tool call that is not already allowed.
  • Auto: a classifier approves safe tools. Risky ones may still prompt. Toggle with /auto when enabled.
  • Always-approve: skips prompts, but deny rules and hooks still apply. Start with grok --always-approve.

The commands you will use most

Command What it does
/plan [description] Enter plan mode and draft a plan
/model <name> Switch model
/effort Set reasoning effort
/context and /compact View context use and compact history
/resume and /fork Reopen a past session or branch the current one
/rewind Go back to an earlier turn (changes files on disk)
/tasks List background tasks, subagents and scheduled tasks
/goal <objective> Keep working until a goal is verified done
/btw <question> Ask a side question without stopping the task
/mcps, /skills, /hooks Open the extensions panel
/share Share the session through a URL
/privacy Show or toggle privacy and retention status
/usage View credit usage or manage billing

Any skill you install also appears as its own slash command. For bigger jobs, Grok Build hands work to subagents that run in parallel, and each can run in its own Git worktree.

Headless Mode and CLI Flags

Headless mode is how you use Grok Build in scripts and CI. Pass a prompt with -p and it runs, prints the result and exits.

grok -p "Add unit tests for utils/date.py"
grok -p "Summarize open TODOs" -m grok-4.7
grok -p "Fix the lint errors" --output-format streaming-json

These are the flags worth knowing from xAI’s CLI reference:

  • -m, --model: pick the model for this run.
  • -c, --continue: continue the latest session in this folder.
  • -r, --resume: resume a session by ID, or the most recent one.
  • -w, --worktree: start in a fresh Git worktree, so your main checkout stays clean.
  • --max-turns: cap how many agent turns a run can take.
  • --allow and --deny: add permission rules for one run.
  • --sandbox: choose a sandbox profile, such as workspace or strict.

Warning: --always-approve (alias --yolo) runs every tool call without asking. Pair it with deny rules and a sandbox, and never use it on a repo you do not trust.

How to Add MCP Servers

MCP servers give Grok Build new tools, such as a database, an issue tracker or docs search. You can add them from the shell or in config.

  1. Add a local (stdio) server. Everything after the double dash is the command that starts the server.
  2. Add a remote server. Use the HTTP transport. OAuth sign-in opens in your browser on first use.
  3. Pick a scope. Add --scope project to save it in the repo’s .grok/config.toml instead of your user config.
  4. Check it works. Run grok mcp list, then grok mcp doctor if a server fails.
  5. Toggle in the TUI. Type /mcps. Press Space to toggle a server and i to sign in to OAuth servers.
# local stdio server
grok mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir

# remote HTTP server (OAuth handled automatically)
grok mcp add --transport http linear https://mcp.linear.app/mcp

# manage servers
grok mcp list
grok mcp remove <name>
grok mcp doctor

You can also declare servers in ~/.grok/config.toml. Grok expands ${VAR} values at load time, so secrets can stay in your environment.

[mcp_servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
env = { API_KEY = "${MY_API_KEY}" }
startup_timeout_sec = 30

Grok Build also loads MCP configs from ~/.claude.json, .cursor/mcp.json and project .mcp.json files. Need ideas? Our best MCP servers list is a good place to start.

Settings, Permissions and Sandbox

All settings live in TOML files. Many UI options are also in the /settings panel inside the TUI.

  • User config: ~/.grok/config.toml (on Windows, %USERPROFILE%\.grok\config.toml).
  • Project config: .grok/config.toml in the repo, limited to MCP servers, plugins and permission rules.
  • Managed config: files under /etc/grok/ that companies use to pin defaults.
  • Environment: GROK_* variables for one session or CI.

Permission rules

Rules decide which tool calls run without asking. A deny rule always beats an allow rule.

[ui]
permission_mode = "ask"   # or "auto" | "always-approve"

[permission]
rules = [
  { action = "allow", tool = "bash", pattern = "git *" },
  { action = "allow", tool = "read" },
  { action = "deny",  tool = "bash", pattern = "rm -rf *" },
]

Sandbox profiles

The sandbox is off by default. Turn it on with grok --sandbox workspace or [sandbox] profile = "workspace" in config.

Profile Writes allowed Network for child processes Use it for
workspace Current folder, ~/.grok, temp Allowed Normal development
read-only ~/.grok and temp only Blocked (Linux) Code review
strict Current folder, ~/.grok, temp Blocked (Linux) Untrusted repos

The sandbox uses Landlock on Linux and Seatbelt on macOS. xAI notes that network blocking for child processes is enforced on Linux only.

Sharing and Privacy

Grok Build saves every conversation locally under ~/.grok/sessions/. That includes prompts, replies, tool calls and file snapshots. Delete one with grok sessions delete and the session ID.

The July repo upload episode

In July 2026, a researcher found that an early CLI build uploaded whole tracked Git repositories, history included, to xAI cloud storage. The Hacker News reported that xAI switched this off on the server side on July 13.

  • xAI’s response: zero data retention (ZDR) enterprise teams never have code or trace data stored. Consumers can run /privacy to disable retention and delete synced data.
  • The catch: turning off “Improve the model” only controls training use, not whether code leaves your machine.
  • What to do: run /privacy, rotate any secrets that sit in tracked files or Git history, and keep .env files untracked.

Sharing sessions and apps

The /share command shares a session through a URL. Treat a link like a public post, since anyone who gets it may see your code and prompts.

The same lesson came up with web apps built in Grok’s app builder. A November report found 35,578 published apps open to anyone with the link. Read how to check and lock your Grok Build sharing if you publish apps there too.

Quick answer: before you use Grok Build on work code, run /privacy, add a sandbox profile, keep secrets out of Git, and avoid /share on private repos.

Grok Build vs Claude Code vs Codex

All three are terminal coding agents with plan modes, MCP support and headless runs. The differences are mostly in models, pricing and ecosystem.

Feature Grok Build Claude Code OpenAI Codex CLI
Maker xAI Anthropic OpenAI
Command grok claude codex
Models Grok 4.7 family Claude models OpenAI models
Headless grok -p claude -p codex exec
Project rules file AGENTS.md CLAUDE.md AGENTS.md
MCP Yes, plus imports Claude and Cursor configs Yes Yes
Pay with Grok plan or xAI API key Claude plan or Anthropic API key ChatGPT plan or OpenAI API key

If you already pay for SuperGrok or a Grok plan, Grok Build lets you try an agent with no extra subscription. Its Claude import tools make switching low effort.

Claude Code has the most mature ecosystem of hooks, skills and docs. Codex fits best if you live in ChatGPT. For a deeper head-to-head, read Codex vs Claude Code and our Claude Code pricing guide.

Troubleshooting: Common Problems and Fixes

  • “grok: command not found”: the installer’s folder is not on your PATH yet. Open a new terminal, or add the install folder to PATH.
  • Sign-in page never opens: you are on a remote machine. Use grok login with --device-auth, or set XAI_API_KEY.
  • MCP server will not connect: run grok mcp doctor. For stdio servers, check ~/.grok/logs/mcp/<server>.stderr.log.
  • npx servers time out on first start: the package is still downloading. Raise startup_timeout_sec in config.
  • Settings seem ignored: since v1.0.75, invalid rules or settings files show a warning when a session opens. Run grok inspect to see which files loaded.
  • Headless run hangs: update to the latest build. v1.0.67 fixed grok -p runs that did not exit when done.
  • Shift+Enter sends instead of adding a newline: update to v1.0.77 and turn on the kitty_keyboard setting, or run /terminal-setup.

Frequently Asked Questions

Is Grok Build free?

xAI’s pricing page lists Build on paid plans, starting with Plus at $8 a month. You can also use it with an xAI API key and pay per token instead.

What is the latest version of Grok Build?

Version 1.0.77 shipped on November 5, 2026, and trackers list a 1.0.78 build on November 6. Run grok update to get the newest build.

Does Grok Build work on Windows?

Yes. Install it in PowerShell with irm https://x.ai/cli/install.ps1 | iex. Note that the sandbox docs only mention Linux and macOS.

Can Grok Build use MCP servers?

Yes. Add them with grok mcp add or in ~/.grok/config.toml. It also reads MCP configs from Claude and Cursor files.

Does Grok Build upload my code?

It sends what the agent needs to the model. After the July repo upload report, xAI said consumers can run /privacy to disable retention and delete synced data.

Can I use Grok Build in CI?

Yes. Use headless mode with grok -p, sign in with XAI_API_KEY, and add permission rules or a sandbox profile to limit what it can do.

Can I move my Claude Code setup to Grok Build?

Yes. Use /import-claude in the TUI or grok import to bring in sessions and settings. It also accepts Claude Code flag aliases like --append-system-prompt.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Smiling woman in a green blazer winking in a bright cosy living room, holding a GROK card, hook v1.0.77 Grok Build guide