šŸ¤– AI Tools
Ā· 5 min read

How to Use Grok Build with Cursor (ACP Integration Guide)


Grok Build and Cursor announced an integration at launch using the Agent Client Protocol (ACP). This means you can use Grok Build’s multi-agent architecture as a backend for Cursor’s IDE experience. You get Cursor’s UI and inline editing with Grok’s reasoning and tool use under the hood.

Here’s how to set it up, what it enables, and when it makes sense over using either tool alone. For Grok Build basics, see the complete guide. For a broader comparison of IDE-based tools, check Claude Code vs Cursor in 2026.

What Is ACP?

The Agent Client Protocol is a standard for connecting AI agent backends to frontend clients. Think of it like LSP (Language Server Protocol) but for AI agents instead of language features.

ACP defines how:

  • A client (Cursor) sends tasks to an agent (Grok Build)
  • The agent reports progress, requests input, and returns results
  • Tool calls are routed and permissions are managed
  • Multiple agents coordinate on complex tasks

Grok Build implements ACP as both a server (other tools can connect to it) and a client (it can connect to other ACP-compatible agents).

Prerequisites

Before starting:

  1. Grok Build installed and authenticated:
curl -fsSL https://x.ai/cli/install.sh | bash
grok auth
  1. Cursor installed (version 0.45+ required for ACP support)

  2. Active subscription: Either SuperGrok ($99/mo) or a valid xAI API key

Setup Steps

Step 1: Enable ACP Server in Grok Build

Start Grok Build in ACP server mode:

grok serve --protocol acp --port 9120

This starts a local ACP server that Cursor can connect to. The server runs in the background and handles requests from Cursor.

To start it automatically when you open a project:

// .grok/config.json
{
  "serve": {
    "autoStart": true,
    "protocol": "acp",
    "port": 9120
  }
}

Step 2: Configure Cursor

Open Cursor settings and add Grok Build as an agent backend:

  1. Open Settings (Cmd+, on macOS, Ctrl+, on Linux)
  2. Navigate to AI > Agent Backends
  3. Click Add Backend
  4. Enter the connection details:
{
  "name": "Grok Build",
  "protocol": "acp",
  "url": "http://localhost:9120",
  "capabilities": ["code", "plan", "ask", "tools"]
}

Step 3: Verify the Connection

In Cursor’s command palette (Cmd+Shift+P):

> Agent: Check Backend Status

You should see ā€œGrok Build: Connectedā€ with the available capabilities listed.

Step 4: Select Grok Build as Your Agent

In Cursor’s AI panel, switch the backend from the default to Grok Build:

  • Click the model selector dropdown
  • Under ā€œAgent Backends,ā€ select Grok Build
  • Choose the mode: Code, Plan, or Ask

How It Works in Practice

Once connected, Cursor routes your AI requests through Grok Build instead of its built-in models. Here’s what changes:

Inline Edits

When you select code and press Cmd+K, the edit request goes to Grok Build. You get Grok’s 256K context window and reasoning capabilities applied to Cursor’s inline edit UI.

Chat Panel

The chat panel becomes a Grok Build session. It has access to your full project context, can spawn subagents for complex tasks, and uses Grok’s native tool calling.

Composer (Multi-file Edits)

This is where the integration shines. Cursor’s Composer mode + Grok Build’s multi-agent architecture means:

  • Grok Build spawns parallel subagents for different files
  • Each subagent handles its portion of the task
  • Results are coordinated and presented in Cursor’s diff view
  • You review and accept/reject changes per file

Terminal Commands

Grok Build can execute terminal commands through Cursor’s integrated terminal. Permission prompts appear in Cursor’s UI rather than a separate terminal window.

Use Cases

When to use Grok Build via Cursor

  • You prefer a visual IDE over terminal-only interaction
  • You want inline code suggestions powered by Grok’s reasoning
  • Multi-file refactoring with visual diffs
  • You’re already a Cursor user and want to try Grok’s models

When to use Grok Build standalone

  • CI/CD automation (headless mode)
  • You prefer terminal workflows
  • You need full control over subagent configuration
  • You’re using hooks and skills that need direct CLI access

When to use Cursor’s built-in models

  • Quick inline completions (lower latency)
  • You don’t need multi-agent orchestration
  • Cost sensitivity (Cursor Pro includes model access)

Advanced Configuration

Custom Model Routing Through Cursor

You can configure which Grok model handles which type of request:

// .grok/config.json
{
  "routing": {
    "inline_edit": "grok-3-fast",
    "chat": "grok-3",
    "composer": "grok-3",
    "ask": "grok-3-mini"
  }
}

This routes quick inline edits to the faster model while using the full model for complex multi-file operations.

Sharing Context Between Cursor and Grok Build

Grok Build reads CLAUDE.md natively (yes, the same file Claude Code uses). If you already have a CLAUDE.md in your project root, Grok Build picks it up automatically and uses it as project context, even when accessed through Cursor.

<!-- CLAUDE.md (also read by Grok Build) -->
# Project Context

- This is a Next.js 15 app with App Router
- We use Drizzle ORM with PostgreSQL
- Tests are in Vitest, not Jest
- All API routes return typed responses using Zod schemas

Permission Handling

When Grok Build needs to perform an action that requires permission (file writes, shell commands), the permission prompt appears in Cursor’s UI as a notification. You can pre-approve actions in your Grok config:

{
  "permissions": {
    "autoApprove": ["read_file", "write_file", "list_directory"],
    "requireConfirmation": ["shell_command", "delete_file"]
  }
}

Troubleshooting

ā€Backend not respondingā€

Check that the Grok Build ACP server is running:

# Check if the process is alive
ps aux | grep "grok serve"

# Restart it
grok serve --protocol acp --port 9120

ā€œCapabilities mismatchā€

Update both Grok Build and Cursor to their latest versions. ACP capability negotiation requires compatible versions.

grok update

High latency on inline edits

Switch inline edits to grok-3-fast in your routing config. The full grok-3 model is overkill for single-line completions.

FAQ

Does this cost extra beyond my Grok Build subscription?

No. The ACP integration uses your existing Grok Build authentication. Token usage counts against your normal limits (SuperGrok plan or API key billing).

Can I use both Cursor’s built-in AI and Grok Build simultaneously?

Yes. You can switch between backends per-request. Use Cursor’s built-in for quick completions and Grok Build for complex multi-file tasks.

Does Grok Build’s ACP server work with other editors?

ACP is an open protocol. Any editor that implements an ACP client can connect to Grok Build’s server. As of May 2026, Cursor is the only editor with official support, but the protocol spec is public.

Is my code sent to xAI’s servers?

Yes. Grok Build processes code on xAI’s infrastructure. The same privacy policy applies whether you use Grok Build via CLI or through Cursor. Code is not used for training by default.

Can I run multiple ACP backends in Cursor?

Yes. You can configure multiple backends and switch between them. For example, use Grok Build for planning and Claude Code’s ACP server for implementation.

Does the Cursor integration support Grok Build’s Plan Mode?

Yes. When you select ā€œPlanā€ mode in the Cursor AI panel, it maps to Grok Build’s plan mode. You get a structured plan in the chat panel that you can approve before execution begins.