claude-to-agy
This server acts as a bridge, allowing Claude Code to delegate heavy or complex tasks to the Antigravity CLI (agy), saving Claude's context window and tokens.
What you can delegate to agy:
Large file analysis — offload processing of large files (logs, dumps, generated code)
Multi-file analysis — analyze more than 3 files at once without consuming Claude's context
Deep searches — run
git log,git diff,grep, and similar expensive operationsWeb lookups — retrieve external documentation or knowledge
Adversarial review / plan critique — route plan critiques or adversarial reviews to
agy
How it works:
Provide a prompt, a working directory, and an optional list of absolute file paths
The server executes
agy --dangerously-skip-permissions --add-dir <cwd> -p "<prompt>", optionally prepending file contents to the promptReturns the clean text output from
agy, or raises an exception handled natively by FastMCPTimeouts are configurable via
AGY_CONNECT_TIMEOUT(default 60s) andAGY_TOTAL_TIMEOUT(default 1200s)
Allows delegation of heavy tasks (large files, multi-file analysis, deep searches, web lookups) to the Antigravity CLI which leverages Google's Gemini API for processing.
claude-to-agy
A lightweight MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) - saving context window and tokens for what matters.
What It Does
Registers a delegate_to_agy MCP tool that Claude automatically uses when it encounters:
Large files (>200 lines) - logs, dumps, generated code
Multi-file analysis (>3 files at once)
Deep searches -
git log,git diff,grepWeb lookups - documentation, external knowledge
Adversarial review / plan critique - always delegated
Claude sends a prompt + file paths → the bridge runs agy CLI → returns the result.
Related MCP server: claudecode-mcp
Requirements
Python 3.10+
Installation
Note: The command below uses
uvxto run the server without manual installation. If you don't haveuvinstalled, you can substituteuvxwithnpx -yorpipx run.
# 1. Register the MCP server globally via uvx
claude mcp add -s user claude-to-agy uvx claude-to-agy
# 2. Download the delegation rules into your current project
curl -o CLAUDE.md https://raw.githubusercontent.com/rauls-kjarners/claude-to-agy/main/CLAUDE.mdThat's it. Claude will now automatically delegate heavy tasks to Antigravity CLI in any project that has the CLAUDE.md file.
Tip: To enable globally without copying
CLAUDE.mdper project, add the rules to~/.claude/CLAUDE.mdinstead.
Using as a Skill
This project also includes a SKILL.md file, which is the standard format for reusable Claude Code skills. If your setup supports skills, you can use it instead of manually copying CLAUDE.md:
claude skill add https://raw.githubusercontent.com/rauls-kjarners/claude-to-agy/main/SKILL.mdNote: You still need the MCP server registered (step 1 above). The skill provides the rules, MCP provides the tool.
Configuration
All settings are optional environment variables:
Variable | Default | Description |
|
| Seconds to start the agy process |
|
| Hard timeout for entire execution |
How It Works
User → Claude Code → MCP bridge (FastMCP) → agy CLI → Gemini API
← ← ←CLAUDE.mdinstructs Claude when to delegateClaude calls
delegate_to_agy(prompt, cwd, files?)via MCPbridge.pyprepends file paths to the promptRuns
agy --dangerously-skip-permissions --add-dir <cwd> -p "<prompt>"Returns the text output cleanly or raises an exception natively handled by FastMCP
Development
# Linting & Formatting
uv run ruff check .
uv run ruff format .
# Type Checking
uv run pyright
# Tests
uv run pytest
# Pre-commit Hooks (Run before committing)
uv run pre-commit installLicense
MIT
Maintenance
Tools
Latest Blog Posts
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/rauls-kjarners/claude-to-agy'
If you have feedback or need assistance with the MCP directory API, please join our Discord server