Skip to main content
Glama

Grok Delegate

Turn your coding agent into a council. Bring Composer and Grok into the conversation, then hand them the work.

npm version npm downloads MCP Registry grok-delegate-mcp MCP server node license: MIT tests

Grok Delegate is the MCP bridge to the Grok Build CLI. From Claude Code, ChatGPT/Codex, Copilot or any MCP client, your agent can ask Composer or Grok for a second opinion, put one question to several models at once, or hand Grok a plan to build, and get a structured result back from each call.

A terminal recording of Claude Code asking Grok 4.7 why a repo prints "today 0": in ask mode Grok finds that commits are bucketed by UTC while the grid uses local dates; Grok then builds the fix with a test that fails on the old code, and Claude checks the result, sees all four tests pass, and flags that the new test would pass on the old code on a machine set to UTC

🧠 Get a second opinion

Ask Grok what it thinks about moving the session store to SQLite.

Grok reads the repo and answers in ask mode, and your agent sets that answer beside its own. You see where the two disagree before you choose a direction.

Ask several at once, and your agent sends each the same brief in parallel, compares the answers, and checks the claims that matter:

Ask Composer and Grok whether we should split this service, and tell me where they disagree.

With Codex Delegate or Antigravity Delegate installed too, the same prompt reaches GPT or Gemini models.

Related MCP server: cursor-mcp-server

πŸ› οΈ Hand off the work

Delegate to Grok: migrate src/api from callbacks to async/await and update the tests. Plan it first.

Your agent writes the brief, Grok edits the files, and your agent reads the diff and runs the tests before it reports back.

  • πŸ“‹ Plan, approve, build β€” plan mode returns Grok's plan; once you approve, the same session implements it.

  • πŸ’¬ No stalled runs β€” when Grok needs a decision, it ends the turn and returns the question as a normal result. Your agent answers by resuming the same session.

  • 🧡 Resume, even on another model β€” follow up in the same session with resumeSessionId; effectiveModel tells you when a different model served the turn.

You and your agent plan and review; the MCP delegate tool hands the brief to Grok Build (Grok models), which implements and edits your workspace; a clean result comes back with what changed, which files, and the plan, for your agent to review

Features

  • πŸ“¦ Clean, named results β€” final answer and session id, plus the files the edit tools reported, and todo progress when work is left unfinished, returned as one compact JSON payload. Nothing to scrape.

  • ⏳ Runs in the background, with MCP Tasks β€” delegate serves the MCP Tasks extension (io.modelcontextprotocol/tasks), so a host that speaks it gets a task back once Grok has the prompt and the result when Grok finishes. In the main session of the interactive Claude Code CLI, you keep working and the result arrives as a task notification; calls from subagents wait for the result.

  • πŸ–ΌοΈ Attach what prose can't point at β€” contextFiles sends screenshots, mockups and other files along with the brief.

  • πŸ”‹ Runs on Grok's usage pool β€” Grok models draw from your Grok plan's weekly usage (plans and usage), separate from your host's chat quota.

  • 🀝 Native plugins β€” install into Claude Code, ChatGPT/Codex, Google Antigravity, or GitHub Copilot CLI and just say "ask Grok" or "delegate this to Grok". The shared skill teaches your agent to write the brief and review the result.

  • 🩺 Self-diagnosing β€” a doctor tool that tells you exactly what's missing if setup isn't right.

  • πŸ”Œ Portable β€” plain stdio MCP, so it runs anywhere: VS Code, JetBrains, Windsurf, Visual Studio, OpenCode, Antigravity, and more.

workspace is the agent's working directory, not a limit, and the CLI narrows what ask and plan may do β€” Security and the delegate reference spell out what the bridge enforces and what it reports back.

Delegate result payload

Your agent and its peers

Each plugin works on its own, and they are built to work together. Install the ones your subscriptions cover, and the agent you already use can bring Gemini 4 Neon, Carbon or Hydrogen, GPT-6.2 Sol or Astra, and Grok 4.7 or Composer 2.5 into the same conversation as peers. One question goes to all of them in parallel, and your agent sets their answers beside its own.

Ask Gemini Neon, Codex Sol and Grok 4.7 how they would restructure the auth module, then tell me where they agree.

A terminal recording of Claude Code asking Gemini Neon, Codex Sol and Grok 4.7 why a repo prints "today 0": three delegate calls run as background tasks, the answers come back, and Claude lists where the models agree and where they differ; Codex then builds the chosen fix on the same thread, and Claude confirms the new test fails on the old code and all four tests pass

  • Codex Delegate β€” the OpenAI Codex CLI: GPT-6.2 Sol, GPT-6.2 Astra and the other Codex models

  • Grok Delegate (this one) β€” the Grok Build CLI: Grok 4.7, Composer 2.5

  • Antigravity Delegate β€” Google Antigravity's CLI: Gemini 4 Neon, Carbon and Hydrogen

Model names are examples; each CLI offers what your account includes.

Install

You need Node.js 20+ and Grok Build, signed in (grok login).

Claude Code

/plugin marketplace add andreilungeanu/grok-delegate-mcp
/plugin install grok-delegate@grok-delegate-mcp

Then just ask:

Delegate to Grok: migrate src/api from callbacks to async/await and update the tests, then walk me through what changed.

That's the whole loop β€” Claude writes the brief, Grok grinds through the files, Claude walks you through the diff.

ChatGPT desktop / Codex

codex plugin marketplace add andreilungeanu/grok-delegate-mcp
codex plugin add grok-delegate@grok-delegate-mcp

Google Antigravity

agy plugin install https://github.com/andreilungeanu/grok-delegate-mcp

Restart the Antigravity app to load it. If you added grok-delegate to mcp_config.json by hand, remove that entry.

Without the CLI, use the manual config under Client-specific config locations.

GitHub Copilot CLI

copilot plugin marketplace add andreilungeanu/grok-delegate-mcp
copilot plugin install grok-delegate@grok-delegate-mcp

Any other MCP client

{
  "mcpServers": {
    "grok-delegate": {
      "command": "npx",
      "args": ["-y", "grok-delegate-mcp"]
    }
  }
}

Client-specific config locations

Install in VS Code Install in VS Code Insiders

Or add it manually:

{
  "servers": {
    "grok-delegate": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "grok-delegate-mcp"]
    }
  }
}

Or run Chat: Install Plugin From Source with this repository's URL.

Under Settings β†’ Tools β†’ AI Assistant β†’ Model Context Protocol (MCP), add a server with command npx and arguments -y grok-delegate-mcp.

Same mcpServers block as the generic snippet above. Cascade caps you at 100 tools across all servers.

Same servers + type: "stdio" shape as VS Code. Requires Visual Studio 2026, or 2022 17.14+. Note the top-level key is servers, not mcpServers. Visual Studio also discovers .mcp.json next to the solution, plus .vscode/mcp.json.

OpenCode does not use mcpServers. Local servers go under mcp, with type: "local" and command as one array:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "grok-delegate": {
      "type": "local",
      "command": ["npx", "-y", "grok-delegate-mcp"],
      "enabled": true
    }
  }
}
{
  "mcpServers": {
    "grok-delegate": {
      "command": "npx",
      "args": ["-y", "grok-delegate-mcp"],
      "timeoutSeconds": 21660,
      "tools": { "delegate": { "background": "always" } }
    }
  }
}

Same mcpServers block as the generic snippet above. Workspace file wins when both exist.

Same shape as OpenCode: type: "local" and command as one array. In the VS Code extension: Settings β†’ MCP β†’ Add Server β†’ Local (stdio). On Windows, if npx is not found, use command cmd with arguments /c, npx, -y, grok-delegate-mcp.

License

MIT Β© Andrei Lungeanu

Technical reference Β· Security Β· Privacy Β· Terms Β· Changelog

Available Tools

3 tools
cancelCancel Grok delegationA
DestructiveIdempotent

Best-effort cancel of an in-flight delegation by sessionId. session/cancel is advisory β€” the agent may finish the turn anyway, and the delegate result then carries cancelRequested. Status: cancelled, killed (agent process observed to exit), not-running (turn already ended, still resumable), not-found (id not in this process's session history).

Inputs: sessionId (required), force.

delegateDelegate coding task to GrokA
Destructive

Ask Grok Build a question or delegate coding work to it over ACP. Never shell out to grok β€” use this tool only. mode ask gives a second opinion; parallel calls with the same brief compare views. Auto-approves every permission the agent requests, in any mode and anywhere on disk. The agent's clarifying questions arrive in questions, or as prose in result β€” resume with resumeSessionId, the same mode and the answers in spec. Leave model (grok-4.7 where the account has it), fast, effort and context unset unless the user explicitly asks. If the delegate skill is installed, load it before handing off implementation.

Inputs: spec (required), workspace (required), fast, mode, +5 more.

doctorDiagnose Grok delegation setupA
Read-onlyIdempotent

Diagnose the grok CLI, login, plan and workspace (default: server cwd); warnings lists what needs action. Run when delegation fails.

Inputs: deep, workspace.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a distinct purpose: delegate starts or resumes an external coding session, cancel stops an in-flight session, and doctor diagnoses the environment. There is no meaningful overlap between these actions, so an agent can select the right tool reliably.

    Naming Consistency4/5

    The names delegate, cancel, and doctor are all concise single-word verbs/commands with a consistent style. They do not follow a verb_noun pattern, but there is no mixed naming convention or casing inconsistency.

    Tool Count5/5

    Three tools are enough for the server's focused delegation purpose: one to start/resume work, one to cancel, and one to diagnose failures. Each tool earns its place, and there are no unnecessary additions.

    Completeness4/5

    The core delegation lifecycle is covered: start/resume via delegate, cancel via sessionId, and troubleshoot via doctor. A minor gap is the lack of a session listing or status-inspection tool beyond cancel outcomes, but most workflows can be handled with the existing surface.

    Maintenance

    ActivityActive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers