Back to Examples

Grok Build Setup (AGENTS.md + reused MCP servers)

Get xAI's Grok Build productive in a repo in two minutes — it reuses the same AGENTS.md and MCP servers as Claude Code and Codex.

Agent SetupBeginnerbash
Example Code
# 1. Install Grok Build (xAI's terminal coding agent)
curl -fsSL https://x.ai/cli/install.sh | bash

# 2. Start it in your project — it auto-reads AGENTS.md from the git root down
cd your-project
grok

# 3. Grok Build is MCP-native: servers you already use just work.
#    The same AGENTS.md, skills, and MCP servers carry over from
#    Claude Code / Codex — no reconfiguration.

# Plan Mode is on by default: Grok writes a file-by-file plan and
# waits for approval before editing. It can run up to 8 subagents in
# parallel, each in its own git worktree.

# Per-directory override for local-only tweaks (not committed):
#   AGENTS.override.md   # wins over AGENTS.md in that directory

# The model is grok-build-0.1 (256K context). Everything below is the
# same AGENTS.md you'd use with any other runner:
#
#   ## Commands
#   - Test: pnpm test
#   - Lint + typecheck: pnpm lint && pnpm exec tsc --noEmit
#   ## Conventions
#   - Never use `any`; use `unknown` + type guards

When to use this

Get xAI's Grok Build productive in a repo in two minutes — it reuses the same AGENTS.md and MCP servers as Claude Code and Codex.