agyforclaude

theoreticalthread/agyforclaude
0 starsCommunity

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

MCP server enabling delegation of tasks to the Antigravity (Gemini) CLI from any AI client supporting MCP.

README.md

agyforclaude

Universal MCP server + Claude skill for delegating tasks to the Antigravity (Gemini) CLI.

agyforclaude installs an MCP server and a Claude skill into ~/.claude/, making it work with any AI client that supports Model Context Protocol — Claude Code, OpenCode, Cursor, Codex, and more.

Prerequisites

  • Node.js >= 18
  • Antigravity CLI (agy) — install it first

Install

npm install -g agyforclaude@latest

The postinstall hook automatically:

  1. Checks if agy is installed
  2. Configures the MCP server in ~/.claude/mcp.json (Claude Code)
  3. Configures the MCP server in ~/.config/opencode/opencode.json (OpenCode)
  4. Copies the agy skill to ~/.claude/skills/agy/SKILL.md

Then restart your AI agent to pick up the new MCP server.

Other agents (Cursor, Codex, Windsurf, etc.): MCP config is not automated. You'll need to manually add the server entry per your agent's docs. The server binary is at dist/mcp-server.js inside the agyforclaude package — find it with npm root -g.

Usage

Your AI agent now has an agy_delegation tool:

| Param | Type | Default | Description | |---|---|---|---| | prompt | string | (required) | The task to delegate to Gemini | | tier | flash / flash-lo / pro | flash | Model tier | | dir | string[] | [] | Workspace directories to include | | yolo | boolean | false | Auto-approve agy tool permissions | | sandbox | boolean | false | Run agy in sandbox mode | | timeout | number | 300 | Max seconds for agy to complete (30-600). Default matches agy's built-in timeout. Increase for very large tasks. |

Example prompts

  • "Use agy to scaffold a Next.js app with TypeScript and Tailwind"
  • "Delegate to Gemini: generate unit tests for src/utils.ts"
  • "Use agy (pro tier) to review this PR for security issues"

The skill

The installed ~/.claude/skills/agy/SKILL.md reminds your agent:

  • When to delegate (user asks, bulk work, cheap work)
  • Always verify agy's output
  • Never auto-merge

CLI Commands

After install, you also get agyforclaude on your PATH:

agyforclaude setup                  # Re-run setup (e.g. after moving node_modules)
agyforclaude uninstall              # Remove from ~/.claude/ (also runs on npm uninstall)
agyforclaude status                 # Check if everything is properly installed
agyforclaude -p "prompt" [options]  # Delegate a task directly from the command line

Options for Prompt Delegation:

  • -p, --prompt <string>: The task prompt to send to Gemini (required)
  • -t, --tier <tier>: Model tier: flash (default), flash-lo, pro
  • -d, --dir <dir>: Additional workspace directory to include (can be repeated)
  • -y, --yolo: Auto-approve tool permissions (dangerous)
  • -s, --sandbox: Run agy in sandbox mode
  • --timeout <seconds>: Max seconds to wait (default: 300)

How it works

  • MCP Server (dist/mcp-server.js): Receives tool calls via stdio, spawns agy --print with the user's prompt, returns stdout.
  • Skill (~/.claude/skills/agy/SKILL.md): Tells the AI when and how to use the agy_delegation tool.
  • CLI (bin/agyforclaude): Manages installation/uninstallation of the above.

Dependencies

  • @modelcontextprotocol/sdk — MCP server SDK
  • agy (external) — The Antigravity CLI (must be installed separately)

License

MIT

Related MCP servers

Browse all →