setup

setup is a command for coding agents from jarrodwatts/claude-delegator. It costs 18 tokens per session (1,667 once invoked), scanned A, original, MIT.

A setup command for connecting Claude Code to Codex or Gemini, so they can act as specialist assistants through MCP, a standard way for tools to communicate.

In plain words
What is it for?
Use it to check whether Codex or Gemini is installed and configure either provider as an expert assistant in Claude Code.
Why use it?
It removes the manual work of checking command-line tools, signing in, and registering the required connections.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the claude-delegator plugin — 2 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/jarrodwatts/claude-delegator/setup
Clone the repo
git clone --depth 1 https://github.com/jarrodwatts/claude-delegator

Or install claude-delegator, the plugin that ships this one along with the rest of its 2 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/jarrodwatts/claude-delegator/setup.svg)](https://agentmods.dev/commands/jarrodwatts/claude-delegator/setup)
Your own site
<a href="https://agentmods.dev/commands/jarrodwatts/claude-delegator/setup"><img src="https://agentmods.dev/badge/commands/jarrodwatts/claude-delegator/setup.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00018 $0.01667
Opus 5 $0.00009 $0.00834
Sonnet 5 $0.00004 $0.00333
Haiku 4.5 $0.00002 $0.00167

Measured 5d ago against content hash 83bf8fc2f6ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/setup.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup

Configure GPT (via Codex) or Gemini as specialized expert subagents via native MCP. Five domain experts that can advise OR implement.

Step 1: Check CLI Dependencies

Codex (GPT)

which codex 2>/dev/null && codex --version 2>&1 | head -1 || echo "CODEX_MISSING"

Gemini

which gemini 2>/dev/null && gemini --version 2>&1 | head -1 || echo "GEMINI_MISSING"

If Missing

Codex Missing:

Codex CLI not found.
Install with: npm install -g @openai/codex
Then authenticate: codex login

Gemini Missing:

Gemini CLI not found.
Install with: npm install -g @google/gemini-cli
Then authenticate: launch `gemini` once and complete sign-in (or set `GOOGLE_API_KEY`)

STOP here if no providers are installed.

Step 2: Configure MCP Servers

Register your preferred provider(s) as MCP servers using Claude Code's native command:

Codex (GPT)

# Idempotent: safe to rerun setup
claude mcp remove codex >/dev/null 2>&1 || true
claude mcp add --transport stdio --scope user codex -- codex -m gpt-5.3-codex mcp-server

Gemini

# Idempotent: safe to rerun setup
claude mcp remove gemini >/dev/null 2>&1 || true
claude mcp add --transport stdio --scope user gemini -- node ${CLAUDE_PLUGIN_ROOT}/server/gemini/index.js

This registers the MCP servers at user scope (available across all projects).

Note: To customise Codex behaviour, add CLI flags before mcp-server.

  • For Codex: -p nosandbox

Step 3: Install Orchestration Rules

mkdir -p ~/.claude/rules/delegator && cp ${CLAUDE_PLUGIN_ROOT}/rules/*.md ~/.claude/rules/delegator/

Step 4: Verify Installation

Run these checks and report results:

# Check 1: CLI versions
codex --version 2>&1 | head -1 || echo "Not installed"
gemini --version 2>&1 | head -1 || echo "Not installed"

# Check 2: Codex MCP server
CODEX_CONFIG=$(claude mcp get codex 2>/dev/null)
if echo "$CODEX_CONFIG" | grep -q "codex"; then
  MODEL=$(echo "$CODEX_CONFIG" | grep -oE 'gpt-[0-9]+\.[0-9]+-?[a-z]*' | head -1)
  echo "Codex: OK (model: ${MODEL:-unknown})"
else
  echo "Codex: NOT CONFIGURED"
fi

# Check 3: Gemini MCP server
GEMINI_CONFIG=$(claude mcp get gemini 2>/dev/null)
if echo "$GEMINI_CONFIG" | grep -q "server/gemini/index.js"; then
  echo "Gemini: OK"
else
  echo "Gemini: NOT CONFIGURED"
fi

# Check 4: Gemini bridge health (initialize handshake)
if echo "$GEMINI_CONFIG" | grep -q "server/gemini/index.js"; then
  BRIDGE_HEALTH=$(printf '{"jsonrpc":"2.0","id":"health","method":"initialize","params":{}}\n' \
    | node "${CLAUDE_PLUGIN_ROOT}/server/gemini/index.js" 2>/dev/null \
    | grep -q '"id":"health"' && echo "Gemini Bridge: HEALTHY" || echo "Gemini Bridge: UNHEALTHY")
  echo "$BRIDGE_HEALTH"
else
  echo "Gemini Bridge: SKIPPED (Gemini MCP not configured)"
fi

# Check 5: Rules installed (count files)
ls ~/.claude/rules/delegator/*.md 2>/dev/null | wc -l

# Check 6: Codex auth status
codex login status 2>&1 | head -1 || echo "Codex: Run 'codex login'"

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 190 lines · 18 tokens per session scan A 83bf8fc2f6ee

Subscribe to this mod's changes

setup is a command published in the GitHub repository jarrodwatts/claude-delegator (996 stars, last pushed 5mo ago), licensed MIT. It adds 18 tokens to every session and 1,667 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.