Repository avatar
Other Tools
v4.0.0
active

grok-delegate-mcp

io.github.andreilungeanu/grok-delegate-mcp

Bring the Grok Build CLI into your agent's council for second opinions, plans and edits.

Documentation

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 logo

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.

๐Ÿ› ๏ธ 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, the turn's token counts, and todo progress when Grok tracked todos, 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 6.2 and Grok 4.7 why a repo prints "today 0": three delegate calls run as background tasks, the answers come back one by one, and Claude lists where the models agree and where they differ; Grok then builds the fix in the same session, 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

VS Code โ€” one-click install, or .vscode/mcp.json

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.

JetBrains AI Assistant โ€” Settings โ†’ Tools โ†’ AI Assistant โ†’ MCP

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

Windsurf โ€” ~/.codeium/windsurf/mcp_config.json

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

Visual Studio 2022 / 2026 โ€” %USERPROFILE%\.mcp.json

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 โ€” ~/.config/opencode/opencode.json or project opencode.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
    }
  }
}
Google Antigravity (without the plugin) โ€” ~/.gemini/config/mcp_config.json or workspace .agents/mcp_config.json
{
  "mcpServers": {
    "grok-delegate": {
      "command": "npx",
      "args": ["-y", "grok-delegate-mcp"],
      "timeoutSeconds": 21660,
      "tools": { "delegate": { "background": "always" } }
    }
  }
}
Kiro โ€” .kiro/settings/mcp.json or ~/.kiro/settings/mcp.json

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

Kilo Code โ€” kilo.jsonc (mcp key, not mcpServers)

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