Skip to main content

Claude-to-Antigravity MCP Bridge.

Project description

claude-to-agy

CI codecov

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, grep
  • Web lookups - documentation, external knowledge
  • Adversarial review / plan critique - always delegated

Claude sends a prompt + file paths → the bridge runs agy CLI → returns the result.

Requirements

Installation

# 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.md

That'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.md per project, add the rules to ~/.claude/CLAUDE.md instead.

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.md

Note: 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
AGY_CONNECT_TIMEOUT 60 Seconds to start the agy process
AGY_TOTAL_TIMEOUT 1200 Hard timeout for entire execution

How It Works

User → Claude Code → MCP bridge (FastMCP) → agy CLI → Gemini API
                   ←                      ←         ←
  1. CLAUDE.md instructs Claude when to delegate
  2. Claude calls delegate_to_agy(prompt, cwd, files?) via MCP
  3. bridge.py prepends file paths to the prompt
  4. Runs agy --dangerously-skip-permissions --add-dir <cwd> -p "<prompt>"
  5. 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 install

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_to_agy-1.1.0.tar.gz (125.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_to_agy-1.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file claude_to_agy-1.1.0.tar.gz.

File metadata

  • Download URL: claude_to_agy-1.1.0.tar.gz
  • Upload date:
  • Size: 125.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for claude_to_agy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 83c48c4746a98bf16b5e22f803acb820a5df47bffd16901bcfd7e1bcd555d74b
MD5 9a5e7661213d5f2977eae2a39919e331
BLAKE2b-256 695163443339816da28d420fc9f4ae9b5c03e0bc61fcfb1dccbff479ac631ba5

See more details on using hashes here.

File details

Details for the file claude_to_agy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: claude_to_agy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"CachyOS Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for claude_to_agy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e80baf4ce0d9b7e7b48a8747004e529045257c0eb1873d13ff2d230650ca68d
MD5 137325b040f3278e05599220efd70e7f
BLAKE2b-256 098195803ef688dc90dacdc6f7dc1e5456f82892e3d920a8204a49384560b26e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page