Antigravity MCP Bridge
Black Gravity is a local MCP server that delegates programming tasks to Google Antigravity's agy CLI in isolated project copies, then lets you monitor, review, test, and integrate results.
Check
agyinstallation, authentication, capabilities, models, selected default model, and observed token usage.List project files eligible for copying and start Antigravity tasks in isolated copies with prompts, modes, roles, models, paths, timeouts, worktrees, and acceptance criteria.
Resume sessions, inspect task status, stream events, read results in chunks, cancel tasks, and list persisted tasks/sessions.
Preview isolated changes (file statuses, stats, patch, SHA-256, test evidence), read patches/results by offset, and verify acceptance criteria against artifacts and quoted review evidence.
Run exact commands through the native
agytest sandbox with optional retries, or record client-run test evidence.Integrate a reviewed patch only after human confirmation via MCP form elicitation, discard isolated copies, and clean expired copies.
Allows delegating programming tasks to Google Antigravity via the official agy CLI, enabling task start, event tracking, result retrieval, and cancellation.
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., "@Antigravity MCP Bridge Use Antigravity to add input validation to the signup endpoint and preview the diff"
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.
🌍 English / Português
Black Gravity
Black Gravity is a local MCP server that delegates programming tasks to Google Antigravity through its official agy CLI. It gives Codex tools to start tasks in isolated project copies, follow their progress, and review the results before applying changes. Black Gravity is independent of Google and OpenAI.
Installation
Use one registration method per harness to avoid duplicate tools. Commands run from the repository root. A harness is Supported when its own command registered the build in this repository and listed it, without calling a model, or when the maintainer confirmed it working with the configuration shown. Anything else is marked Not verified.
Harness | Status | What was checked |
Codex plugin | Supported | Listed by |
Codex, MCP only | Supported | Listed by |
Claude Code, MCP only | Supported | Shown as Connected by |
Claude Code plugin with skill | Planned | Not available yet |
Claude Desktop | Supported | Confirmed by the maintainer with the configuration below |
OpenCode | Supported | Confirmed by the maintainer with the configuration below |
agy | Not verified |
|
Other MCP clients (stdio) | Partial | The server answered |
Linux commands | Supported | Listed by |
macOS commands | Not verified | No test machine |
Codex plugin
Supported. Run these commands with the Codex CLI, then open a new conversation.
codex plugin marketplace add Zythenth/black-gravity
codex plugin add black-gravity@black-gravityCodex, MCP only
Supported.
$server = (Resolve-Path .\plugin\server.mjs).Path
codex mcp add black-gravity -- node $server
codex mcp listClaude Code, MCP only
Supported.
$server = (Resolve-Path .\plugin\server.mjs).Path
claude mcp add --scope user black-gravity -- node $server
claude mcp listClaude Code plugin with skill
Planned. There is no plugin for Claude Code yet. Use the MCP-only registration above.
Claude Desktop
Supported. Add the server to claude_desktop_config.json with the absolute path to plugin/server.mjs, then restart the app. The file is in %APPDATA%\Claude on Windows and in ~/Library/Application Support/Claude on macOS; Settings > Developer > Edit Config opens it.
{
"mcpServers": {
"black-gravity": {
"command": "node",
"args": ["<absolute path to plugin/server.mjs>"]
}
}
}OpenCode
Supported. Add the server under mcp in opencode.json, either in the project root or in ~/.config/opencode/opencode.json for every project, with the absolute path to plugin/server.mjs, then restart OpenCode.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"black-gravity": {
"type": "local",
"command": ["node", "<absolute path to plugin/server.mjs>"],
"enabled": true
}
}
}agy
Not verified.
$server = (Resolve-Path .\plugin\server.mjs).Path
agy mcp add black-gravity -- node $server
agy mcp listOther MCP clients
Partial. Only the server side was checked. Start node <absolute path to plugin/server.mjs> as a stdio server. The process reserves stdout for JSON-RPC.
Linux and macOS
Supported on Linux for the Codex and Claude Code lines, checked on Ubuntu 26.04 by a user without root; the agy line is not verified. Not verified on macOS. These commands are the same registrations without PowerShell syntax. If claude is not on PATH, run the Claude Code CLI by its absolute path, as the check did.
server="$PWD/plugin/server.mjs"
codex mcp add black-gravity -- node "$server"
codex mcp list
claude mcp add --scope user black-gravity -- node "$server"
claude mcp list
agy mcp add black-gravity -- node "$server"OpenCode as a delegated write executor
OpenCode 2.4.3 can remove Git worktrees through its file-edit permission. The bridge denies edits to the worktree root and requires OS containment for writes. Use Linux with Bubblewrap that supports --overlay, working unprivileged user namespaces, and a kernel and filesystems that can mount the overlay. Windows and macOS support read-only delegation; agy remains available for writes there and when Linux containment is unavailable.
The bridge uses private configuration with fixed file-tool rules, without project/global MCP servers or plugins. Native account connections stored by OpenCode can be reused. A provider defined only in the user's global OpenCode configuration is unavailable to delegated writes. An explicit, saved or resumed model must be listed by the contained models --standalone catalog before the task is admitted (MODEL_NOT_AVAILABLE if absent).
Keep the project, bridge state, and native data in separate directories. The native opencode data directory and its SQLite files must belong to the current user, with no group/other write permissions; the files must be regular and have no aliases or extra links. The bridge mounts the native data as a read-only lower layer. The private writable upper layer can contain the database, session history and credentials; retained tasks keep it until discard. A task does not write a credential change back to the native store.
OPENCODE_WRITE_UNCONTAINED: unsupported platform, unavailable Bubblewrap, or unsafe path overlap/alias. Use a supported Linux setup or separate the affected paths, as indicated.OPENCODE_WRITE_RUNTIME_UNAVAILABLE: the private overlay or native data could not be prepared. Check the mount requirements and the location, owner and types of the database files.OPENCODE_NATIVE_DATA_UNSAFE_MODEidentifies group/other writability specifically; verify the owner and group before applying the suggested permission change.OPENCODE_CONFIG_REFUSED: the bridge could not verify that the effective configuration excludes inherited MCP servers and plugins.OPENCODE_WRITE_RUNTIME_CLEANUP_FAILEDmeans the bridge could not remove the private overlay storage.OPENCODE_COPY_DAMAGED: the damaged copy cannot be previewed, integrated, reused, or removed by retention. Useblack_gravity_discardfor manual removal. If process cleanup is unverified,PROCESS_CLEANUP_UNVERIFIEDcan also block copy operations.openCodeCredentialCheckreportsunchanged,changedwith counts and available original account labels, orunavailablewhen the comparison could not be verified. Labels are bounded and filtered; a new connection without an original account cannot be identified, and legacy account rows may lack a provider. Affected connections may need a new login outside the task.
Linux Bubblewrap test executor (linux-bwrap)
When BRIDGE_TEST_EXECUTOR is unset on Linux, black_gravity_test uses linux-bwrap only if startup detection finds bwrap and passes the user-namespace probe; otherwise it stays on agy (also selectable explicitly with BRIDGE_TEST_EXECUTOR=agy).
Use a distribution package if it supplies a usable Bubblewrap. For OpenCode writes, use the commands below only if the resulting version supports overlay mounts and the host can mount them. A version or --help check alone does not establish mount support. Without working Bubblewrap, black_gravity_test stays on agy when BRIDGE_TEST_EXECUTOR is unset.
sudo apt install bubblewrap # Debian / Ubuntu
sudo dnf install bubblewrap # Fedora / RHEL
sudo pacman -S bubblewrap # Arch LinuxThen check, without root, whether Bubblewrap can create a user namespace:
bwrap --unshare-user --ro-bind / / true && echo okIf it prints ok, skip the next step. On the verified Ubuntu 26.04.1 server, the apparmor package ships and loads a bwrap profile (/etc/apparmor.d/bwrap-userns-restrict) that allows user namespaces and confines the processes started by bwrap. Do not add the profile below where such a profile is loaded: apparmor_parser -r replaces any loaded profile with the same name, whatever the file name.
Where AppArmor restricts unprivileged user namespaces and no suitable profile is loaded, an administrator can grant userns specifically to /usr/bin/bwrap. This profile uses flags=(unconfined), so it does not add AppArmor confinement to bwrap or its children. It leaves the system-wide user-namespace policy in place:
sudo tee /etc/apparmor.d/bwrap >/dev/null <<'EOF'
abi <abi/4.0>,
include <tunables/global>
profile bwrap /usr/bin/bwrap flags=(unconfined) {
userns,
include if exists <local/bwrap>
}
EOF
sudo apparmor_parser -r /etc/apparmor.d/bwrapThe mounts, seccomp filter, FIFO checks, refusals and threat model of the executor are described in Linux Bubblewrap test executor.
Build from source
git clone https://github.com/Zythenth/black-gravity.git
cd black-gravity
npm.cmd ci
npm.cmd run build:pluginThe PowerShell examples use npm.cmd. Use npm on other platforms. See installation and migration for standalone MCP registration, local tarballs, and upgrades. The published legacy package antigravity-mcp-bridge uses antigravity_* tools. See available versions for the Black Gravity names. If you use Windows LPAC, see portable Node setup.
Related MCP server: antigravity-plugin-codex
First use
In a new Codex conversation, try:
Use
$black-gravityto inspect the selected files and report findings in read-only mode.
The skill guides model selection, waiting, and review. For a standalone MCP setup, call black_gravity_health to check the CLI, tool profile, and approval mode, then call black_gravity_list_models before choosing a model. See task management and review and integration.
Managed agy tasks can create and reuse a project even when the Antigravity app has unrelated records named like owner/repo. Those names cannot be selected through BRIDGE_AGY_PROJECTS, but the records still count in ID and folder conflict checks. The bridge reads the registry without editing it and never falls back to the default project. See Antigravity project setup.
Requirements
Node.js 24 or newer, with npm. Windows LPAC has additional runtime requirements.
Git 2.32 or newer on an absolute
PATHentry.The official Antigravity CLI on
PATHor configured by absoluteAGY_PATH, with authentication completed inagy.
Black Gravity disables automatic updates only for agy processes it starts. To update the CLI outside the bridge, open agy directly in your terminal or run agy update.
Host permissions
black-gravity permissions prints host rules to review and merge into the host configuration. From the source checkout:
node plugin/server.mjs permissions --host claude-code
node plugin/server.mjs permissions --host codexHost approval and the bridge’s BRIDGE_APPROVAL_MODE apply independently. The default auto mode applies verified patches without a bridge confirmation form. Set BRIDGE_APPROVAL_MODE=ask to require the form. See host permissions for presets, placement, and the verification limit for per-tool Codex approvals.
Links
Available Tools
23 toolsantigravity_cancelCancel Antigravity taskA
Cancel a queued task or terminate its local agy process.
Inputs: taskId (required). Returns: task, error
antigravity_cleanupClean expired isolated copiesADestructive
Remove finished copies older than COPY_RETENTION_HOURS. Active copies are preserved.
Inputs: no named parameters. Returns: error, discardedTaskIds
antigravity_discardDiscard an isolated copyADestructive
Delete the copy and baseline of a finished task, including resumed tasks sharing that copy. Active copies are refused. The source project is preserved.
Inputs: taskId (required). Returns: task, error
antigravity_eventsRead Antigravity eventsBRead-only
Read live normalized agy events after a sequence cursor. Includes original agy event payloads.
Inputs: taskId (required), after, limit. Returns: error, events, truncated, nextCursor, +1 more
antigravity_get_modelGet selected modelARead-only
Return the default model selected for subsequent bridge tasks. Null means agy chooses its own default.
Inputs: no named parameters. Returns: error, model
antigravity_healthCheck Antigravity CLIBRead-only
Inspect installed agy version, authentication and supported capabilities.
Inputs: no named parameters. Returns: path, error, version, installed, +3 more
antigravity_integrateIntegrate reviewed changesADestructive
Request human confirmation through MCP form elicitation, then apply the reviewed patch. Requires the SHA-256 from antigravity_preview. Clients without form elicitation cannot integrate; no tool argument substitutes for user confirmation.
Inputs: taskId (required), expectedSha256 (required). Returns: error, files, patch, sha256, +4 more
antigravity_list_modelsList Antigravity modelsBRead-only
List model IDs actually returned by agy models for this account.
Inputs: no named parameters. Returns: error, models
antigravity_list_project_filesList files eligible for a project copyBRead-only
List tracked and untracked files excluding Git ignore and local exclude matches.
Inputs: workingDirectory (required). Returns: error, files
antigravity_previewPreview isolated changesCRead-only
Return A/M/D files, per-file line statistics, totals, binary markers, patch, SHA-256 and client-reported test evidence with stale markers. Requires a finished task.
Inputs: taskId (required), includePatch. Returns: error, files, patch, tests, +7 more
antigravity_read_patchRead patch by file or chunkARead-only
Read at most 50000 UTF-16 units of the current patch, optionally selecting a changed path. Bind every read to the full preview hash. Follow nextOffset until hasMore is false. Use preview with includePatch false for metadata.
Inputs: taskId (required), expectedSha256 (required), path, limit, +1 more. Returns: path, text, error, length, +8 more
antigravity_read_resultRead result in chunksARead-only
Read the final CLI result serialized as JSON in bounded chunks. Returns ready false while active. Keep contentSha256 for subsequent requests and reconstruct the JSON by concatenating text.
Inputs: taskId (required), limit, offset, expectedContentSha256. Returns: text, error, ready, length, +8 more
antigravity_record_testRecord review test evidenceA
Record a test already executed by the client in the isolated copy. Bind command, exit code and output to the reviewed patch. These are client-reported results; the bridge does not execute or independently verify the command. Do not include secrets in output.
Inputs: taskId (required), command (required), exitCode (required), expectedSha256 (required), +1 more. Returns: error, output, sha256, source, +10 more
antigravity_resultGet Antigravity resultARead-only
Return terminal result, usage and error once the task finishes. Use antigravity_preview for the patch.
Inputs: taskId (required), includeResult. Returns: task, error, ready, reportAvailable, +2 more
antigravity_resumeResume Antigravity conversationCDestructive
Continue a completed session in its existing isolated copy.
Inputs: prompt (required), sessionId (required), workingDirectory (required), mode, +6 more. Returns: task, error
antigravity_runRun Antigravity taskBDestructive
Copy non-ignored project files to a temporary directory and run agy --sandbox there. includePaths narrows copied files or folders. Returns a taskId; source is unchanged.
Inputs: prompt (required), workingDirectory (required), mode, role, +6 more. Returns: task, error
antigravity_sessionsList known Antigravity sessionsARead-only
List conversation IDs recovered from local persisted tasks. agy does not advertise a session-list command.
Inputs: no named parameters. Returns: error, scope, sessions
antigravity_set_modelSelect Antigravity modelA
Persist an exact model ID from agy models as the bridge default. Null persists Auto (agy default), overriding BRIDGE_DEFAULT_MODEL. Does not alter agy global settings.
Inputs: model (required). Returns: error, model
antigravity_statusGet Antigravity task statusBRead-only
Return task metadata, status, process ID and isolated copy path when available.
Inputs: taskId (required). Returns: task, error
antigravity_tasksList persisted tasksARead-only
Recover task IDs and metadata from local bridge state, including tasks from earlier server processes.
Inputs: no named parameters. Returns: error, tasks
antigravity_testRun tests in the native agy sandboxADestructive
Start an asynchronous continuation that executes an exact command through agy run_command. Captures actual output, exit status and file fingerprints. Optionally permits up to three repair retries. No Docker or host execution fallback. Use the returned taskId for events, result, review and integration.
Inputs: taskId (required), command (required), expectedSha256 (required), retries, +1 more. Returns: task, error
antigravity_usageRead observed token usageARead-only
Consolidate final CLI usage by retained task, session and requested model. Resumed task counters are session deltas, not repeated cumulative totals. Missing counters stay null. This does not report account quota or billing; disclose partial or unavailable usage to the user.
Inputs: model, taskId, sessionId. Returns: error, scope, byTask, byModel, +4 more
antigravity_verifyVerify task acceptance criteriaB
Check actual artifacts and ground Codex review quotes in file lines. Requires criteria defined before the task. A CLI SUCCESS or unsupported claim is not verification; client review remains client-reported.
Inputs: taskId (required), expectedSha256 (required), reviews. Returns: error, checks, review, sha256, +3 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 23 tools
Tools generally target distinct lifecycle stages (run/resume/cancel, preview/read_patch/read_result, test/verify/integrate), but several reading/status tools have adjacent purposes. The descriptions help separate result vs read_result and preview vs read_patch, though an agent could still confuse them.
All tools consistently use the antigravity_ prefix with snake_case, which makes the set predictable. Most names are verb_noun or verb_noun-phrase, but some are noun-only query tools (usage, status, tasks, events, result, sessions), a minor deviation from a strict pattern.
23 tools is heavy for a single MCP server and sits in the borderline 16-25 range. The domain is complex, but several output-reading and status tools could be consolidated, making the surface feel somewhat over-scoped.
The surface covers model selection, task lifecycle, file listing, patch/result reading, testing, verification, integration, and cleanup. Minor gaps exist, such as no explicit authentication/login tool or direct source-file read outside task artifacts, but core workflows are covered.
Maintenance
Related MCP Connectors
Task management your AI agents can actually run. One line becomes a context-ready task over MCP.
Start and manage Reason cloud coding agents, projects and sessions from any MCP client.
A task list shared by you and your coding agents (Claude Code, Cursor, Codex and any MCP client). Agents plan each task into steps, report live progress to a board, and block on questions you answer from your phone.
Hosted coding agent: start, follow up on and stop tasks that can open GitHub pull requests.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI clients to run Google Antigravity coding sub-agents as MCP tools, with synchronous and asynchronous execution, task polling, and sandboxed Docker workspace isolation.-
- AlicenseBqualityCmaintenanceEnables a local Codex chat to ask a second opinion, review staged, unstaged, or revision-based diffs, and delegate coding tasks to the Antigravity CLI running in isolated or disposable workspaces. Supports starting, polling, retrieving, and cancelling tasks with returned answers, diffs, changed-file lists, exit codes, and time/output limits, while never auto-applying returned patches.81MIT
- AlicenseBqualityBmaintenanceBridges any MCP client to the official Antigravity agy CLI, letting users delegate tasks, analyze files, search code, look up docs, and request adversarial reviews from their own Antigravity subscription models. Supports dynamic model discovery, multi-turn session follow-up, and async long-running tasks without replacing the client's main model.101MIT
- AlicenseBqualityCmaintenanceEnables MCP clients such as Claude Code and Cursor to delegate long multi-step coding tasks to Google Antigravity CLI, generate read-only plans and code reviews, digest large codebases, and manage background sessions in isolated git worktrees.15152 npm2MIT