grok-delegate
This server acts as an MCP bridge to delegate coding tasks to the Grok CLI, saving host tokens. You can:
Delegate coding goals: Use
grok_delegatefor synchronous worktree execution (returns branch + diffstat),grok_delegate_planfor read-only planning, andgrok_delegate_startfor background tasks (poll withgrok_delegate_poll).Manage agent sessions: Start typed tasks with
grok_agent_start(roles: consult, execute, review, fix) and poll/cancel/check status. Dedicated shortcuts:grok_agent_consult,grok_agent_review,grok_agent_execute,grok_agent_fix.Diagnose and inspect:
grok_delegate_statusfor server health,grok_delegate_doctorfor Grok diagnostics,grok_delegate_modelsto list models,grok_delegate_inspectto inspect allowlisted roots.Configure tasks: Set reasoning effort, sandbox profile, max turns, lane, structured output schema, and disable web search. Sessions support resume/fork/continue by UUID.
Security: Worktree changes are never pushed/merged; access is gated by
GROK_DELEGATE_ALLOWED_ROOTS.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@grok-delegateImplement pagination for the users list"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
grok-delegate (MCP)
⚡ Host loop (Session v1.2)
Unofficial bridge. Save host tokens:
grok_agent_session_begin({"goal":"…","host_budget":"small"})Loop
grok_agent_session_next→ do onlycard(host_cmd|mcp_tool|end)Stop when
done=true
Skill grok-mcp v1.0 enforces this. No OAuth in MCP config — CLI login only.
Claude / Cursor orchestrate → Grok CLI codes (worktrees, receipts, token economy).
Unofficial community project — not xAI, Grok, Anthropic, or OpenAI.
Auth = localgrok loginonly. Never put OAuth/API keys in MCP config.
Related MCP server: Grok Plugin Codex
Install (one command)
curl -fsSL https://raw.githubusercontent.com/zai-one/grok-mcp/main/scripts/install.sh \
| bash -s -- --project "$HOME/code/my-project"Windows: irm https://raw.githubusercontent.com/zai-one/grok-mcp/main/scripts/install.ps1 | iex
Then:
grok login
~/.local/share/grok-mcp/.venv/bin/python -m grok_delegate --self-testMerge ~/.config/grok-mcp/mcp/claude_desktop.snippet.json into Claude/Cursor → restart → grok_agent_status.
Claude Code, on this repository
A project-scoped .mcp.json ships in the repo, so opening it in Claude
Code wires grok-delegate with no install step — the package has no runtime
dependencies. The entry resolves the package from CLAUDE_PROJECT_DIR, which Claude
Code sets in the server's environment, so it does not depend on the working directory
the host happens to use.
The command defaults to the Windows py launcher. Elsewhere, point it at your
interpreter:
export GROK_MCP_PYTHON=python3This path skips the installer, so nothing writes the env file for you. Read-only
tools such as grok_agent_status work immediately; anything that touches a
repository fails closed until you grant an exact root, because the allowlist is
empty by design:
export GROK_DELEGATE_ALLOWED_ROOTS=/path/to/project # ';' separates several
export GROK_DELEGATE_LANES_PARENT=/path/to/.grok-mcp-lanesSet them where the host will inherit them, then restart it. grok_agent_status
reports what was actually granted under roots.allowed. A child of an
allowlisted root is not implicitly trusted.
Letting the host grant the current project
Maintaining that list by hand gets old once you work across several projects.
The host already knows which directory you opened — Claude Code exports it to
the server as CLAUDE_PROJECT_DIR — so the server can take the allowlist from
there:
export GROK_DELEGATE_TRUST_HOST_ROOTS=1With it set, the directory the session was launched in joins the allowlist and
no longer needs to be listed. It widens the list rather than replacing it:
anything in GROK_DELEGATE_ALLOWED_ROOTS stays granted, and exact-equality
membership is unchanged — a sibling or a child of the session directory is still
refused.
Off by default, and deliberately. Granting a root because the host named it
means the operator's explicit list is no longer the whole answer; that is a fair
trade when the host is your own editor, but it is yours to make. grok_agent_status
shows roots.host_root_trusted and roots.host_root so a root you never typed
is traceable.
Hosts that do not set CLAUDE_PROJECT_DIR are unaffected — the flag then grants
nothing. Reading the host's roots over MCP roots/list, which would also cover
--add-dir directories and non-Claude hosts, needs a bidirectional stdio loop
this server does not have yet.
Skill (router): grok-mcp — see docs/SKILLS.md
Full easy guide: docs/EASY.md
Language | Page |
Easy (canonical) | |
EN / RU / 中文 / ES | docs/install/ (short pointers) |
What it is
Host | Claude, Cursor, Codex, … (stdio MCP) |
Worker | Grok CLI on the same machine or VPS |
Why | Save host tokens — long coding loop runs on Grok |
Economy |
|
Optional
# day-to-day
grok-mcp # launcher from installer
# or
python -m grok_delegate.serverMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
AlicenseAqualityCmaintenanceStdio bridge for editors to connect to the GenieOS MCP server, enabling AI agents to interact with GenieOS via Streamable HTTP transport.6410MIT- AlicenseBqualityCmaintenanceAn MCP server that exposes the local Grok CLI to Codex for bounded repo work, reviews, rescue analysis, adversarial checks, session listing/export, and background job management while keeping Codex hidden context out of scope.12MIT
- Alicense-qualityBmaintenanceProvides a stdio MCP bridge for coding agents to query and record engineering knowledge locally, preserving debugging history, failed attempts, and verified solutions.1MIT
- Alicense-qualityBmaintenanceA stdio MCP server that lets Codex Desktop/CLI delegate implementation tasks to Claude Code CLI with workspace validation, Git status checks, and session resume capabilities.4MIT
Related MCP Connectors
User-owned memory for AI agents, Copilot, Claude, IDEs, CLIs, and chat apps over remote MCP.
Turn a GitHub repo or docs site into agent-ready context: pack it or search it, over MCP.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zai-one/grok-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server