Agy Headless Bridge logo

Agy Headless Bridge

Runs Google Antigravity CLI prompts through a fresh pseudo-terminal and exposes cleaned output as Python, CLI, and MCP interfaces.

Install Agy Headless Bridge

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for agy-headless-bridge, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

agy-headless-bridge MCP server runs Google Antigravity CLI (agy) prompts from non-TTY environments and returns usable text instead of empty output. It allocates ConPTY on Windows or the POSIX pty module, starts agy with a terminal-like stream, then removes ANSI and TUI artifacts. The package offers Python, command-line, and MCP entry points, including agy_ask and agy_research. Reach for it when subprocesses, CI jobs, coding agents, or MCP clients need to invoke an installed and authenticated agy binary.

Use cases

  • Invoke agy from a CI job without a terminal
  • Call Antigravity from a Python subprocess wrapper
  • Expose agy prompts as tools to an MCP client
  • Run coding requests against a project workspace
  • Capture cleaned agy output in shell scripts

Key features

  • Windows ConPTY and POSIX pty execution
  • ANSI and TUI output cleanup
  • Python, CLI, and MCP entry points
  • agy_ask and agy_research tools
  • Typed exit, quota, timeout, and not-found errors
  • Workspace and permission controls

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars19Stargazers on the source repository.
Last commit4d agoMost recent push to the default branch.

How Agy Headless Bridge works

What agy-headless-bridge does

agy-headless-bridge addresses an Antigravity CLI behavior where agy -p can produce no stdout when its output is connected to a pipe or another non-terminal caller. The bridge gives each invocation a newly allocated pseudo-terminal, allowing agy to follow its terminal output path while the caller remains headless.

It is available in three forms:

  • Python library: from agy_headless_bridge import run
  • Command-line wrapper: agy-bridge "prompt"
  • MCP server: python -m agy_headless_bridge.mcp_server

The package does not install or authenticate agy and does not include credentials. The Antigravity CLI must already be installed, authenticated, and usable in a normal terminal.

How it works

The bridge locates the agy executable using AGY_PATH, then the system PATH, followed by operating-system default locations. On Windows it uses pywinpty and ConPTY. On Linux and macOS it uses Python's standard pty support with os.openpty and subprocess.Popen.

Raw terminal output is passed through cleanup that removes ANSI control sequences, reduces carriage-return redraws, and drops spinner-related glyphs. The result is returned as plain text. The package also preserves partial output when a run stops and exposes typed errors for missing binaries, failed exits, quota exhaustion, and timeouts.

Setup and configuration

Install Python 3.9 or newer, the Antigravity CLI, and the package:

Terminal
pip install agy-headless-bridge

Windows installs pywinpty as a dependency; POSIX platforms use the standard library pty implementation. To use the source tree, clone the repository and run pip install -e ..

Authenticate agy interactively or provide ANTIGRAVITY_API_KEY. Set AGY_PATH when the executable is not discoverable through the normal lookup order. The MCP server can be started with python -m agy_headless_bridge.mcp_server.

The repository also includes a Claude Code plugin. It runs a local stdio server from the plugin source using uv, so uv must be available on PATH. The plugin requires an installed and authenticated agy binary.

Tools and capabilities

The MCP interface provides two tools:

  • agy_ask sends a prompt to agy. By default, the server adds its working directory as agy's workspace; use workspace: "none" to disable that behavior.
  • agy_research sends research-oriented requests through agy.

agy_ask can be permitted to edit files or run commands only when the call uses skip_permissions: true and the server starts with AGY_BRIDGE_ALLOW_SKIP_PERMISSIONS=1. The Claude Code plugin does not enable that variable by default.

The Python library is a lower-level primitive and does not automatically add a workspace. The CLI and MCP layers provide their own workspace behavior.

Limitations and notes

The real agy round trip has been verified on Windows with ConPTY. POSIX pty mechanics are tested on Linux using a stub, while real agy behavior on bare-metal Linux and macOS remains less established.

The bridge depends on the agy installation and its authentication state. It does not bundle credentials, install agy, or open network ports. Calls ultimately use the agy process on the host, which communicates with Google's Antigravity service.

Local MCP servers load in Claude Code and local Cowork sessions; claude.ai chat does not load them. Newer agy releases may already emit output through pipes, but the bridge still supplies timeout handling, partial-output retention, typed failures, output cleanup, and the MCP interface.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agy Headless Bridge

agy-headless-bridge is an MCP server that connects MCP clients to the Google Antigravity CLI (agy) through a fresh pseudo-terminal. Its main tools are agy_ask for prompts and agy_research for research requests, returning cleaned text while supporting workspace selection and controlled permission handling.

Install it with `pip install agy-headless-bridge` using Python 3.9 or newer, then start it with `python -m agy_headless_bridge.mcp_server`. You must separately install and authenticate the Antigravity CLI. Windows installs pywinpty automatically; POSIX systems use Python's standard pty module.

Yes, agy-headless-bridge includes a Claude Code plugin that registers a local stdio MCP server named `antigravity`. The plugin uses `uv` to create its environment and requires an authenticated agy executable on the same computer.

It starts agy inside a newly allocated pseudo-terminal instead of connecting it directly to a pipe. This makes agy see terminal output conditions, after which the bridge removes ANSI and TUI artifacts and returns the cleaned response.

Yes, but only when `agy_ask` receives `skip_permissions: true` and the server has `AGY_BRIDGE_ALLOW_SKIP_PERMISSIONS=1` in its environment. The bundled Claude Code plugin does not set that variable, and workspace access is enabled by default there.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgy Headless Bridge AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agy-headless-bridge?style=directory)](https://allmcps.com/mcp/agy-headless-bridge)
HTML Embed
<a href="https://allmcps.com/mcp/agy-headless-bridge"><img src="https://allmcps.com/api/badge/agy-headless-bridge?style=directory" alt="Agy Headless Bridge on AllMCPs" /></a>