loading…
Search for a command to run...
loading…
A lightweight MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI - saving context window and tokens for what matters.
A lightweight MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI - saving context window and tokens for what matters.
A lightweight MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) - saving context window and tokens for what matters.
Registers a delegate_to_agy MCP tool that Claude automatically uses when it encounters:
git log, git diff, grepClaude sends a prompt + file paths → the bridge runs agy CLI → returns the result.
# 1. Clone anywhere on your machine
git clone https://github.com/rauls-kjarners/claude-to-agy.git ~/.claude-to-agy
# 2. Register the MCP server (global - works in any project)
claude mcp add -s user claude-to-agy python3 ~/.claude-to-agy/src/bridge.py
# 3. Copy the rules file into any project where you want delegation
cp ~/.claude-to-agy/CLAUDE.md /path/to/your/project/CLAUDE.md
# 4. (Optional) Add the PreToolUse hook to enforce delegation for subagents
Then merge the following into your ~/.claude/settings.json (or per-project .claude/settings.json):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 ~/.claude-to-agy/src/hooks/block-direct-commands.py",
"onError": "block"
}
]
}
]
}
}
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.mdper project, add the rules to~/.claude/CLAUDE.mdinstead.
CLAUDE.md rules only apply to the main Claude agent. Subagents (spawned via run_subagent or similar) do not read CLAUDE.md and will run grep -r, git diff, etc. directly — wasting tokens and defeating the purpose of delegation.
The PreToolUse hook runs at the Claude Code platform level for all agents (main + sub), mechanically blocking banned commands before they execute.
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 ~/.claude-to-agy/SKILL.md
Note: You still need the MCP server registered (step 2 above). The skill provides the rules, MCP provides the tool.
All settings are optional environment variables:
| Variable | Default | Description |
|---|---|---|
AGY_CONNECT_TIMEOUT |
60 |
Seconds to start the agy process |
AGY_TOTAL_TIMEOUT |
600 |
Hard timeout for entire execution |
User → Claude Code → MCP bridge (bridge.py) → agy CLI → Gemini API
← ← ←
CLAUDE.md instructs Claude when to delegatedelegate_to_agy(prompt, cwd, files?) via MCPbridge.py prepends file paths to the promptagy --dangerously-skip-permissions --add-dir <cwd> -p "<prompt>"{"success": true, "response": "..."} or {"success": false, "error": "..."} back to Claudepython -m pytest tests/ -v
Apache 2.0
Выполни в терминале:
claude mcp add claude-to-agy -- npx PRs, issues, code search, CI status
автор: GitHubDatabase, auth and storage
автор: SupabaseSecure file operations with configurable access controls.
Reference / test server with prompts, resources, and tools.
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development