Antigravity Codex MCP
Antigravity Codex MCP
Eine kontrollierte Model Context Protocol-Brücke, die es OpenAI Codex ermöglicht, Arbeiten bei Bedarf an Google Antigravity CLI zu delegieren.
Die Brücke bleibt inaktiv, bis ein Benutzer Codex ausdrücklich bittet, AGY zu verwenden. Sie autorisiert dann nur exakt das aktuelle Projekt, führt eine auf das Projekt begrenzte Konversation, synchronisiert den für Benutzer sichtbaren Dialog und beschränkt generierte Implementierungsänderungen auf eine isolierte Kopie.
Dies ist ein unabhängiges Community-Projekt. Es ist weder mit Google noch mit OpenAI verbunden und wird von keinem der beiden unterstützt oder befürwortet.
Highlights
Ausdrückliches Opt-in: Codex kann AGY nur aktivieren oder aufrufen, wenn der Benutzer darum bittet.
Exakter Projektbereich: zu weit gefasste Wurzelverzeichnisse und Systemverzeichnisse werden abgelehnt.
Standardmäßig schreibgeschützte Delegation: Es werden keine AGY-Schreib-, Befehls-, URL- oder MCP-Berechtigungen erteilt.
Projektkonversationen: Aktive Konversations-IDs und der Delegationsverlauf bleiben über neue Codex-Aufgaben hinweg erhalten.
Sichtbare Transkript-Synchronisierung: Über die AGY CLI eingegebene Nachrichten werden Codex bei der nächsten Synchronisierung verfügbar gemacht.
Private-Reasoning-Filter: Denk-/Reasoning-Felder, Systemnachrichten und Checkpoints werden vor der Persistierung oder der MCP-Rückgabe ausgeschlossen.
Isolierte Implementierung: Validierte Ganzdatei-Ersetzungen werden nur auf eine Wegwerf-Projektkopie angewendet.
Prüfbare Läufe: Antworten, Manifeste geänderter Dateien, Verifizierungsausgaben und bereinigte Tool-Ereignisse werden lokal aufbewahrt.
Related MCP server: Antigravity Delegate MCP
Voraussetzungen
Node.js 20 oder neuer
Authentifizieren Sie die Antigravity CLI und stellen Sie sicher, dass agy verfügbar ist:
agy --version
agy -p "Reply exactly: AGY_OK" --output-format jsonWenn sich agy nicht im PATH befindet, setzen Sie AGY_BIN in der MCP-Konfiguration auf den Pfad zur ausführbaren Datei.
Installation
git clone https://github.com/ustc-fyk/antigravity-codex-mcp.git
cd antigravity-codex-mcp
npm ci
npm testFügen Sie den Server zur config.toml Ihres Codex hinzu. Ersetzen Sie die Beispielpfade durch den absoluten Klonpfad auf Ihrem Rechner:
[mcp_servers.antigravity]
command = 'node'
args = ['C:\path\to\antigravity-codex-mcp\src\index.js']
cwd = 'C:\path\to\antigravity-codex-mcp'
enabled = true
required = false
startup_timeout_sec = 20
tool_timeout_sec = 900
default_tools_approval_mode = 'prompt'
enabled_tools = [
'antigravity_health',
'antigravity_project_status',
'antigravity_enable_project',
'antigravity_disable_project',
'antigravity_start_session',
'antigravity_get_active_session',
'antigravity_list_sessions',
'antigravity_sync_conversation',
'antigravity_get_transcript',
'antigravity_ask',
'antigravity_continue',
'antigravity_review',
'antigravity_execute',
'antigravity_list_runs',
'antigravity_get_run',
]
# Optional when agy is not available on PATH:
[mcp_servers.antigravity.env]
AGY_BIN = 'C:\path\to\agy.exe'Verwenden Sie unter macOS oder Linux die entsprechenden absoluten POSIX-Pfade und lassen Sie AGY_BIN normalerweise weg, wenn sich agy im PATH befindet.
Installieren Sie den enthaltenen Codex-Skill, damit Codex dem Opt-in-Workflow folgt:
$skillRoot = Join-Path $env:USERPROFILE ".codex\skills\agy-project-assistant"
New-Item -ItemType Directory -Force $skillRoot | Out-Null
Copy-Item ".\skills\agy-project-assistant\SKILL.md" $skillRootStarten Sie Codex neu, nachdem Sie die MCP-Konfiguration geändert oder den Skill installiert haben.
Verwendung
Öffnen Sie ein beliebiges Projektverzeichnis in Codex.
Arbeiten Sie normal weiter; die AGY-Brücke bleibt inaktiv.
Bitten Sie ausdrücklich:
Load AGY and review this project.Codex aktiviert den Lesezugriff für genau dieses Projekt und startet dessen AGY-Konversation oder verwendet sie erneut.
Codex delegiert Analyse, Review, Fortsetzung oder isolierte Implementierung, je nach Bedarf.
Bitten Sie Codex:
Disable AGY for this project, um die exakte Projektberechtigung zu entziehen, während der lokale Audit-Verlauf erhalten bleibt.
Um dieselbe Konversation direkt einzusehen oder daran teilzunehmen:
agy --conversation=<conversation_id>Nachdem Sie Nachrichten über die AGY CLI gesendet haben, bitten Sie Codex, sync the AGY conversation auszuführen. antigravity_continue synchronisiert ebenfalls vor und nach jeder Folgeanfrage. Die Synchronisierung erfolgt bei Bedarf und ist kein Live-Push-Kanal. Vermeiden Sie daher gleichzeitiges Senden von Codex und AGY CLI.
MCP-Tools
Bereich | Tools |
Gesundheit und Lebenszyklus |
|
Konversationen |
|
Sichtbare Transkripte |
|
Isolierte Implementierung |
|
Modellaufrufe erfolgen nur über die Tools start, ask, continue, review und execute. Gesundheit, Status, Verlauf, Laufprüfung und Transkript-Synchronisierung verbrauchen keinen AGY-Modell-Turn.
Projektlokaler Zustand
Jedes aktivierte Projekt erhält ein ignoriertes lokales Zustandsverzeichnis:
.antigravity-mcp/
├── project.json
├── sessions.jsonl
├── transcripts/
│ └── <conversation-id>.jsonl
└── runs/
└── <run-id>/
├── metadata.json
├── events.jsonl
├── response.md
└── workspace/project.jsonzeichnet den Opt-in-Status und die aktive Konversation auf.sessions.jsonlzeichnet delegierte Aufrufe und die Token-Nutzung auf.transcriptsenthält nur sichtbare Benutzer-/Assistenten-Datensätze und bereinigte Tool-Spuren.runsenthält isolierte Implementierungs-Arbeitsbereiche und Audit-Ergebnisse.
Dieses Verzeichnis ist von der Quellkopie ausgeschlossen und wird von Git ignoriert. Committen Sie es nicht manuell, da es private Projekt- oder Konversationsdaten enthalten kann.
Sicherheitsmodell
Die Projektaktivierung fügt atomar nur exakt das Wurzelverzeichnis zu den trustedWorkspaces- und read_file(...)-Erlaubnisregeln von Antigravity hinzu. Die Deaktivierung entfernt nur genau diese Einträge.
Die isolierte Implementierung lehnt ab:
absolute Pfade und Parent-Traversal;
das Löschen von Dateien;
geheime Dateien, Abhängigkeiten, Build-Ausgaben, Metadaten und symbolische Links;
mehr als 50 geänderte Dateien;
mehr als 2.000.000 Ersetzungszeichen.
Die Transkript-Pipeline entfernt rekursiv private Reasoning-Felder und schließt System-/Checkpoint-Datensätze aus, bevor sie den Projektspiegel schreibt. Siehe SECURITY.md für Hinweise zur Meldung und zu Einschränkungen.
Entwicklung
npm ci
npm test
npm run smoke:mcpLive-Prüfungen erfordern eine authentifizierte AGY CLI und verbrauchen Modellkontingent:
npm run smoke:live
npm run smoke:execute
npm run smoke:project -- "/absolute/path/to/disposable-project"
npm run smoke:continue -- "/absolute/path/to/enabled-project"
npm run smoke:transcript -- "/absolute/path/to/enabled-project"npm test ist in sich geschlossen. smoke:mcp prüft außerdem die lokale AGY-Binärdatei, während die übrigen Smoke-Tests die Projektautorisierung ändern oder Kontingent verbrauchen können.
Lizenz
Available Tools
15 toolsantigravity_askDelegate a new analysis to AntigravityARead-only
Start a new read-only AGY analysis conversation for an enabled project and persist it as active.
Inputs: prompt (required), project_root (required), model, effort, +2 more.
antigravity_continueContinue a project AGY conversationBRead-only
Continue a specified conversation or the project's active AGY conversation and persist the result.
Inputs: prompt (required), project_root (required), model, effort, +3 more.
antigravity_disable_projectDisable AGY for one projectAIdempotent
Remove only one project's exact Antigravity trusted workspace and read_file rule, mark it disabled, and preserve all local session and run history.
Inputs: project_root (required).
antigravity_enable_projectEnable AGY for one projectAIdempotent
Initialize .antigravity-mcp in one exact project root and atomically add only that root to Antigravity trustedWorkspaces and read_file allow rules. Call only after the user explicitly requests AGY. Does not call a model.
Inputs: project_root (required).
antigravity_executeExecute a task in an isolated AGY workspaceA
For an enabled project, ask AGY for schema-validated file replacements, apply only validated paths to a disposable copy, optionally run one fixed verification, and never merge into source.
Inputs: task (required), project_root (required), model, effort, +4 more.
antigravity_get_active_sessionGet active project AGY sessionARead-onlyIdempotent
Return the active AGY conversation ID for a project without calling a model.
Inputs: project_root (required).
antigravity_get_runInspect an isolated AGY runARead-onlyIdempotent
Read one project's run response, token usage, verification output, changed-file manifest, and optional external events.
Inputs: run_id (required), project_root (required), max_events, include_events.
antigravity_get_transcriptRead a visible AGY transcriptAIdempotent
Refresh and return the bounded project-local user/assistant/tool transcript for a registered AGY conversation. Internal thinking, system messages, and checkpoints are never returned.
Inputs: project_root (required), refresh, max_chars, max_records, +1 more.
antigravity_healthCheck Antigravity bridgeARead-onlyIdempotent
Check the configured agy binary and bridge version without enabling a project or consuming a model turn.
Inputs: no named parameters.
antigravity_list_runsList isolated AGY runsARead-onlyIdempotent
List recent isolated execution runs for one project.
Inputs: project_root (required), limit.
antigravity_list_sessionsList project AGY session eventsARead-onlyIdempotent
List recent persisted AGY delegation and conversation events for one project without calling a model.
Inputs: project_root (required), limit.
antigravity_project_statusCheck AGY project statusARead-onlyIdempotent
Check whether one exact project root is initialized, trusted, read-authorized, and linked to an active AGY conversation. Does not call a model.
Inputs: project_root (required).
antigravity_reviewRequest an independent Antigravity reviewBRead-only
Start a read-only evidence-oriented review for an enabled project and persist the conversation.
Inputs: target (required), project_root (required), focus, model, +3 more.
antigravity_start_sessionStart a project AGY sessionBRead-only
Create a new AGY conversation for an enabled project, save it as active, and return its conversation ID. Consumes one Antigravity model turn.
Inputs: project_root (required), model, effort, prompt, +2 more.
antigravity_sync_conversationSync an AGY conversationAIdempotent
Read the official AGY transcript for a conversation registered to this project, filter internal thinking/system/checkpoint records, and update the project-local visible transcript mirror. Does not call a model.
Inputs: project_root (required), max_chars, include_all, max_records, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool has a clearly distinct purpose: project lifecycle (enable, disable, status), session management (start, get active, sync, transcript), conversation actions (ask, continue, review), and execution (execute, get run). No two tools appear to perform the same function; even the conversation-related tools are differentiated by mode (read-only analysis, continuation, review).
All tools follow a consistent verb_noun pattern with the 'antigravity_' prefix (e.g., list_sessions, enable_project, get_transcript). The naming is uniform and predictable, making it easy for an agent to infer tool purpose from the name alone.
15 tools is well-scoped for a server that manages AGY sessions, project configuration, transcripts, and executions. Each tool covers a distinct operational need without redundancy, and the count is within the ideal range for a feature-complete MCP server.
The tool surface covers the full lifecycle: project enable/disable/status, session creation and retrieval, transcript syncing and retrieval, conversation actions (ask, continue, review), and execution management (execute and get_run). No obvious gaps exist—both administrative and interactive workflows are supported.
Maintenance
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Share one project context across ChatGPT, Claude, Telegram and any MCP client.
A paid remote MCP for OpenAI Codex memory MCP, built to return verdicts, receipts, usage logs, and a
Related MCP Servers
- AlicenseBqualityBmaintenanceAn MCP bridge that lets Codex delegate long-running agent work to the Antigravity CLI, providing observable and resumable tool-based execution with project scoping.14249 PyPI17MIT
- AlicenseNot gradedqualityCmaintenanceA local-STDIO MCP server that lets Codex invoke the Antigravity CLI from any project, with project-owned routing guidance and enforceable policies.MIT
- AlicenseAqualityDmaintenanceEnables OpenAI Codex to delegate tasks to Google Antigravity CLI, running them headlessly and polling for results.41MIT
- AlicenseNot gradedqualityBmaintenanceEnables Codex users to delegate engineering, refactoring, auditing, and test execution tasks to Google Antigravity CLI as a persistent autonomous subagent, with tools for managing sessions and running prompts.1MIT