claude-gemini-mcp
Uses Google AI Pro license through Antigravity CLI (agy) as the Gemini worker that implements tasks — the server drives Gemini via agy -p to write code, commit and run checks in an isolated worktree.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-gemini-mcp delegate to Gemini: add pagination to /users with tests"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-gemini-mcp
Servidor MCP local para que Claude Code sea el arquitecto (piensa, decide, define criterios de aceptación y aprueba) y Gemini sea el obrero (implementa) mediante Antigravity CLI (agy) con tu licencia Google AI Pro. Objetivo: ahorrar cuota de Claude sin perder control de calidad.
Claude ──create_task(spec + ACs)──► servidor ──► worktree aislado (rama gemini/T-000N)
│
├─ loop interno (sin Claude): agy -p → commit → checks (ACs command) → reintento
│
Claude ◄──── reporte compacto (≤3.000 chars) ◄┘
Claude ──submit_review(approve | revise + feedback | reject)──► nueva ronda o cierre
Claude ──finish_task(merge | keep | discard)Por qué existe
Se investigaron proyectos open source (nov-2026). Ninguno cubría a la vez Claude-arquitecto + Gemini-obrero + loop con criterios de aceptación:
VKirill/antigravity-for-claude-code: roles correctos, pero archivado (jun-2026) y dependiente de tmux.
shinpr/Galley: loop con ACs con ID y veredictos, sin Gemini.
Este proyecto toma la división de roles del primero y el loop con ACs del segundo. Diseño completo: docs/superpowers/specs/2026-11-30-claude-gemini-orchestra-design.md.
Related MCP server: relevo
Requisitos
Windows 11 (también funciona en Linux/macOS), Python ≥ 3.11, git ≥ 2.30, Git Bash (para ACs con sintaxis bash).
Antigravity CLI (
agy) instalado y con sesión iniciada con tu cuenta AI Pro. Desde 2026-06-18 Gemini CLI dejó de servir cuentas personales/AI Pro;agyes el reemplazo oficial.
Instalación
.\scripts\install.ps1Crea .venv, instala el paquete, copia la skill gemini-architect a ~/.claude/skills/ y una config de ejemplo a ~/.claude-gemini-mcp/config.toml. Después registra el MCP (el script imprime la ruta exacta):
claude mcp add gemini-worker -s user -- "C:\ruta\a\claude-gemini-mcp\.venv\Scripts\python.exe" -m claude_gemini_mcpReinicia Claude Code y pide, por ejemplo: "delega a Gemini: añade paginación al endpoint /users con tests".
Herramientas MCP
Tool | Uso |
| Crea la tarea: spec, ACs ( |
| Ejecuta el loop interno y espera (devuelve |
| Detalle bajo demanda (diff por archivo, cola del log de Gemini) |
|
|
|
|
| Estado de las tareas |
Configuración (~/.claude-gemini-mcp/config.toml)
Ver config.example.toml. Claves: agy_path, agy_args (placeholders {prompt_file}, {model}), model, agy_timeout_s, ac_shell, bash_path, report_max_chars, prompt_template. Variables de entorno: CGM_DATA_DIR, CGM_CONFIG.
El prompt completo para Gemini se escribe en <worktree>/.cgm/prompt.md y agy recibe una instrucción corta que apunta a ese archivo (evita el límite de longitud de línea de comandos de Windows). Plantilla editable: src/claude_gemini_mcp/prompts/worker.md.
Timeouts de Claude Code: run_task espera hasta 540 s por defecto. Si tu Claude Code corta antes las llamadas MCP, baja wait_seconds o sube MCP_TOOL_TIMEOUT.
Garantías
Tu rama y tu árbol de trabajo no se tocan hasta
finish_task(merge), que exige árbol limpio y estar en la rama base.Solo los checks deterministas marcan ACs
commandcomo pass; solo Claude aprueba.Archivos protegidos (y
seed_files) modificados por Gemini se revierten y se reportan.copy_untracked(p. ej..env) y lo que creesetup_commandnunca se commitean.Presupuestos: 3 iteraciones internas × 3 rondas por defecto.
Varias sesiones de Claude Code pueden compartir el estado: cada tarea en curso registra el PID de su sesión, y las demás no la interrumpen ni la relanzan. Los IDs se reservan de forma atómica.
En Windows,
agyy los checks corren dentro de un Job Object: si el servidor muere (aunque sea forzado), sus procesos hijos mueren con él.
Seguridad
agy ejecuta comandos en tu máquina con tus permisos. El worktree aísla el código, no el sistema. Usa el modo de permisos de agy más restrictivo que te funcione (p. ej. --mode auto con sandbox, vía agy_args). Las transcripciones quedan locales en ~/.claude-gemini-mcp/runs/.
Desarrollo
.\.venv\Scripts\python -m pytest -qLas pruebas usan un agy falso (tests/fake_agy.py); no gastan cuota.
Estado verificado
Suite automatizada con
agysimulado: verde (incluye una prueba sobre el transporte stdio real).Prueba real (2026-11-30, Windows 11,
agy1.5.20, cuenta AI Pro, flags por defecto): tarea fizzbuzz con un test de aceptación sembrado y un AC de revisión. Gemini implementó en 1 iteración (~110 s), AC-1 pasó, reporte de 460 caracteres,approve+mergeprodujo un único commit squash enmainy limpió worktree y rama.Con
agy1.5.20 los argumentos por defecto (-p "<instrucción>") bastan: en modo printagyedita archivos y ejecuta comandos sin pedir confirmación. Para más aislamiento puedes añadir"--sandbox"aagy_args.
Available Tools
8 toolscreate_taskB
Create a Gemini task in an isolated git worktree/branch (gemini/) from the repo's HEAD. seed_files {path: content} are your acceptance tests: committed first and protected from Gemini. copy_untracked (e.g. ['.env']) are copied but never committed. setup_command runs once (e.g. venv + deps).
Inputs: spec (required), title (required), repo_path (required), acceptance_criteria (required), +7 more. Returns: result
finish_taskA
merge: squash into the base branch (approved only; user's tree must be clean). keep: leave the branch. discard: delete worktree and branch. Ask the user before merge.
Inputs: action (required), task_id (required). Returns: result
get_diffC
Diff of Gemini's changes (optionally one file). Request only what you need to review.
Inputs: task_id (required), path, max_lines. Returns: result
get_logA
Tail of Gemini's raw transcript for one iteration. Use only to diagnose agent_error.
Inputs: round (required), task_id (required), iteration (required), tail_lines. Returns: result
list_tasksC
List tasks (id, status, round, title).
Inputs: repo_path. Returns: result
run_taskB
Start the automatic inner loop (Gemini works → command checks → retry) and wait up to wait_seconds. Returns the compact report, or 'running' (then call wait_task).
Inputs: task_id (required), wait_seconds. Returns: result
submit_reviewA
Your verdict. ac_results marks type=review ACs. approve requires every AC = pass. revise sends feedback to Gemini and runs a new round (returns its report). reject closes the task.
Inputs: task_id (required), verdict (required), feedback, ac_results, +2 more. Returns: result
wait_taskB
Keep waiting for a running task; returns the compact report when it stops.
Inputs: task_id (required), wait_seconds. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool maps to a distinct phase of the task lifecycle: create, run, wait, inspect diff, inspect log, review, finish, list. The only borderline pair is run_task and wait_task, but descriptions make the boundary clear (run_task starts the loop and waits up to wait_seconds; wait_task resumes waiting on an already-running task). get_diff vs get_log are also clearly separated by purpose (review changes vs diagnose errors).
All eight tools follow a strict verb_noun snake_case pattern (create_task, run_task, wait_task, get_diff, get_log, submit_review, finish_task, list_tasks). Verbs are used consistently for their semantic class (create/run/wait/get/submit/finish/list), with no camelCase or stylistic mixing.
Eight tools is well within the ideal 3-15 range and each tool covers a necessary lifecycle stage with no filler. The set is tightly scoped to orchestration of Gemini tasks in git worktrees, with no redundant or trivial entries.
The surface covers the full lifecycle: create, execute, wait, inspect (diff and log), review with approve/revise/reject, finalize with merge/keep/discard, and list. Minor gaps exist, such as no explicit way to cancel/abort a running task or fetch full task details beyond the compact list entry, but agents can work around these via finish_task discard and wait_task.
Maintenance
Related MCP Connectors
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Your AI mind directs coding agents; work reviewed against your memories: Claude Code, Codex, Cursor
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate implementation tasks to Antigravity CLI and OpenCode, run them fully autonomously, and then review and gate the results.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude Code and Gemini (Antigravity CLI) to collaborate as a team using your own subscriptions, with joint planning, task division, mutual code review, and shared memory.MIT
- AlicenseBqualityBmaintenanceEnables Claude Code to hand individual plan tasks to Gemini 3.8 Flash through the Antigravity CLI, running each in an isolated git worktree with contract tests, tool-call gating, and protected paths. Verifies the returned work server-side and merges only branches that pass the configured test suite, tracking jobs, progress, and lessons learned.424 npm8MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Code to delegate heavy coding and image-generation work to Gemini through the Antigravity CLI using a Google AI Pro subscription instead of an API key, while Claude writes briefs, reviews results, and sends corrections. It runs jobs asynchronously in a guarded work folder, continues the same Gemini conversation for fixes, and reports status, output, and token usage back to the caller.MIT