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:
- Checks if
agyis installed - Configures the MCP server in
~/.claude/mcp.json(Claude Code) - Configures the MCP server in
~/.config/opencode/opencode.json(OpenCode) - Copies the
agyskill 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.jsinside the agyforclaude package — find it withnpm 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, spawnsagy --printwith the user's prompt, returns stdout. - Skill (
~/.claude/skills/agy/SKILL.md): Tells the AI when and how to use theagy_delegationtool. - CLI (
bin/agyforclaude): Manages installation/uninstallation of the above.
Dependencies
@modelcontextprotocol/sdk— MCP server SDKagy(external) — The Antigravity CLI (must be installed separately)
License
MIT






