Skip to main content
Glama
Antigravity Codex MCP
by ustc-fyk

Antigravity Codex MCP

オンデマンドでOpenAI CodexがGoogle Antigravity CLIに作業を委任できる、管理されたModel Context Protocolブリッジです。

このブリッジは、ユーザーが明示的にCodexにAGYの使用を依頼するまでアイドル状態を維持します。その後、厳密に現在のプロジェクトのみを承認し、プロジェクト単位の会話を保持し、ユーザーに表示される対話を同期し、生成された実装変更を分離されたコピーに限定します。

これは独立したコミュニティプロジェクトです。GoogleやOpenAIとは提携しておらず、その承認も受けていません。

中文说明

ハイライト

  • 明示的なオプトイン: ユーザーが依頼しない限り、CodexはAGYを有効化または呼び出せません。

  • 厳密なプロジェクト範囲: 広範なルートやシステムディレクトリは拒否されます。

  • デフォルトで読み取り専用の委任: AGYの書き込み権限、コマンド権限、URL権限、MCP権限は一切付与されません。

  • プロジェクト会話: アクティブな会話IDと委任履歴は、新しいCodexタスクをまたいで保持されます。

  • 表示可能なトランスクリプトの同期: AGY CLIを通じて入力されたメッセージは、次の同期時にCodexが利用できるようになります。

  • プライベート推論フィルター: thinking/reasoningフィールド、システムメッセージ、チェックポイントは、永続化またはMCPへの返却の前に除外されます。

  • 分離された実装: 検証済みのファイル全体の置換は、使い捨てのプロジェクトコピーにのみ適用されます。

  • 監査可能な実行: 応答、変更ファイルのマニフェスト、検証出力、サニタイズ済みのツールイベントがローカルに保持されます。

Related MCP server: Antigravity Delegate MCP

要件

Antigravity CLIを認証し、agyが利用可能であることを確認してください:

agy --version
agy -p "Reply exactly: AGY_OK" --output-format json

agyがPATH上にない場合は、MCP設定でAGY_BINにその実行可能ファイルのパスを設定してください。

インストール

git clone https://github.com/ustc-fyk/antigravity-codex-mcp.git
cd antigravity-codex-mcp
npm ci
npm test

サーバーをCodexのconfig.tomlに追加します。例に示すパスを、お使いのマシン上のクローンの絶対パスに置き換えてください:

[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'

macOSまたはLinuxでは、対応する絶対POSIXパスを使用し、agyがPATH上にある場合は通常AGY_BINを省略します。

同梱のCodex Skillをインストールして、Codexがオプトインワークフローに従うようにします:

$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" $skillRoot

MCP設定を変更した後、またはSkillをインストールした後は、Codexを再起動してください。

使用方法

  1. Codexで任意のプロジェクトディレクトリを開きます。

  2. 通常どおり作業します。AGYブリッジはアイドル状態のままです。

  3. 明示的に依頼します: Load AGY and review this project.

  4. Codexはその厳密なプロジェクトへの読み取りアクセスを有効にし、AGYの会話を開始または再利用します。

  5. Codexは、分析、レビュー、継続、または分離された実装を適宜委任します。

  6. Disable AGY for this projectと依頼すると、ローカルの監査履歴を保持したまま、厳密なプロジェクト権限を取り消します。

同じ会話を直接確認したり参加したりするには:

agy --conversation=<conversation_id>

AGY CLIを通じてメッセージを送信した後、Codexにsync the AGY conversationと依頼します。antigravity_continueも、すべてのフォローアップの前後に同期を実行します。同期はオンデマンドであり、ライブプッシュチャネルではないため、CodexとAGY CLIから同時に送信することは避けてください。

MCPツール

領域

ツール

ヘルスとライフサイクル

antigravity_health, antigravity_project_status, antigravity_enable_project, antigravity_disable_project

会話

antigravity_start_session, antigravity_get_active_session, antigravity_list_sessions, antigravity_ask, antigravity_continue, antigravity_review

表示可能なトランスクリプト

antigravity_sync_conversation, antigravity_get_transcript

分離された実装

antigravity_execute, antigravity_list_runs, antigravity_get_run

モデル呼び出しは、start、ask、continue、review、executeの各ツールを通じてのみ発生します。ヘルス、ステータス、履歴、実行の検査、トランスクリプトの同期は、AGYのモデルターンを消費しません。

プロジェクトごとのローカル状態

有効化された各プロジェクトには、無視されるローカル状態ディレクトリが作成されます:

.antigravity-mcp/
├── project.json
├── sessions.jsonl
├── transcripts/
│   └── <conversation-id>.jsonl
└── runs/
    └── <run-id>/
        ├── metadata.json
        ├── events.jsonl
        ├── response.md
        └── workspace/
  • project.jsonはオプトイン状態とアクティブな会話を記録します。

  • sessions.jsonlは委任された呼び出しとトークン使用量を記録します。

  • transcriptsには、表示可能なユーザー/アシスタントの記録とサニタイズ済みのツールトレースのみが含まれます。

  • runsには、分離された実装ワークスペースと監査結果が含まれます。

このディレクトリはソースコピーから除外され、Gitによって無視されます。プライベートなプロジェクトデータや会話データが含まれる可能性があるため、手動でコミットしないでください。

安全モデル

プロジェクトの有効化は、厳密なルートのみをAntigravityのtrustedWorkspacesおよびread_file(...)許可ルールにアトミックに追加します。無効化は、それらの厳密なエントリのみを削除します。

分離された実装は以下を拒否します:

  • 絶対パスと上位ディレクトリへのトラバーサル;

  • ファイルの削除;

  • シークレットファイル、依存関係、ビルド出力、メタデータ、シンボリックリンク;

  • 50を超える変更ファイル;

  • 2,000,000文字を超える置換文字数。

トランスクリプトパイプラインは、プロジェクトミラーを書き込む前に、プライベートな推論フィールドを再帰的に削除し、システム/チェックポイントレコードを除外します。報告のガイダンスと制限については、SECURITY.mdを参照してください。

開発

npm ci
npm test
npm run smoke:mcp

ライブチェックには認証済みのAGY CLIが必要であり、モデルのクォータを消費します:

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は自己完結型です。smoke:mcpはローカルのAGYバイナリもチェックしますが、残りのスモークテストはプロジェクトの承認を変更したり、クォータを消費したりする可能性があります。

ライセンス

MIT

Available Tools

15 tools
antigravity_askDelegate a new analysis to AntigravityA
Read-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 conversationB
Read-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 projectA
Idempotent

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 projectA
Idempotent

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 sessionA
Read-onlyIdempotent

Return the active AGY conversation ID for a project without calling a model.

Inputs: project_root (required).

antigravity_get_runInspect an isolated AGY runA
Read-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 transcriptA
Idempotent

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 bridgeA
Read-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 runsA
Read-onlyIdempotent

List recent isolated execution runs for one project.

Inputs: project_root (required), limit.

antigravity_list_sessionsList project AGY session eventsA
Read-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 statusA
Read-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 reviewB
Read-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 sessionB
Read-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 conversationA
Idempotent

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

    A4/5.0

    Scored across 15 tools

    Disambiguation5/5

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

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness5/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables OpenAI Codex to delegate tasks to Google Antigravity CLI, running them headlessly and polling for results.
      4
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables 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.
      1
      MIT