# Claude To Agy

> A lightweight MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI - saving context window and tokens for what matters.

- **Type:** MCP server
- **Install:** `agentstack add mcp-rauls-kjarners-claude-to-agy`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [rauls-kjarners](https://agentstack.voostack.com/s/rauls-kjarners)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [rauls-kjarners](https://github.com/rauls-kjarners)
- **Source:** https://github.com/rauls-kjarners/claude-to-agy

## Install

```sh
agentstack add mcp-rauls-kjarners-claude-to-agy
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# claude-to-agy

[](https://github.com/rauls-kjarners/claude-to-agy/actions/workflows/ci.yml)
[](https://github.com/rauls-kjarners/claude-to-agy/actions/workflows/codeql.yml)
[](https://codecov.io/github/rauls-kjarners/claude-to-agy)
[](https://badge.fury.io/py/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`, `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

- Python 3.10+
- [`agy` CLI](https://antigravity.google/docs/cli-getting-started) installed and authenticated
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code)

## Installation

> **Note:** The command below uses [`uvx`](https://docs.astral.sh/uv/guides/scripts/#running-tools) to run the server without manual installation. If you don't have `uv` installed, you can substitute `uvx` with `npx -y` or `pipx run`.

```bash
# 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`:

```bash
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  -p ""`
5. Returns the text output cleanly or raises an exception natively handled by [FastMCP](https://github.com/jlowin/fastmcp)

## Development

```bash
# 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

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [rauls-kjarners](https://github.com/rauls-kjarners)
- **Source:** [rauls-kjarners/claude-to-agy](https://github.com/rauls-kjarners/claude-to-agy)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-rauls-kjarners-claude-to-agy
- Seller: https://agentstack.voostack.com/s/rauls-kjarners
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
