Antigravity MCP Bridge
Enables AI clients to run Google Antigravity coding sub-agents as MCP tools, with synchronous and asynchronous execution, task polling, and sandboxed Docker workspace isolation.
README
Antigravity Sub-Agent Bridge (FastMCP)
A containerized FastMCP server that exposes the Google Antigravity CLI (agy --headless) as remote Model Context Protocol (MCP) tools over SSE.
This bridge allows conversational AI clients (such as Google Spark, Claude, Cursor, or ChatGPT) to dispatch full coding and automation sub-agents in a sandboxed, containerized workspace.
🚀 Key Features
- Synchronous Sub-Agent Execution (
execute_antigravity_sync): Dispatches a coding/automation task directly toagy --headlessand returns the output log once the agent finishes (ideal for short 1–3 minute tasks). - Asynchronous Background Execution (
start_antigravity_async): Spawns a long-running Antigravity agent in the background, returning atask_idfor decoupled execution. - Task Polling & Management (
get_antigravity_task_status,list_antigravity_tasks): Polls progress, inspects logs, and lists all background sub-agents. - Workspace Isolation & Sandboxing:
Runs within a Docker container mounting only
./workspaces, protecting host system files while giving the agent full build, test, and execution autonomy inside its sandbox. - Seamless Integration with
mcp-server-oauth-proxy: Exposes standard SSE endpoints on port8080/sse, pluggable directly into Home Assistant's OAuth proxy for secure access from Google Spark.
🛠️ Repository Layout
antigravity-mcp-bridge/
├── Dockerfile # Container image with Python 3.12, Node.js, git, & agy CLI
├── docker-compose.yml # Service definitions with volume mounts & port bindings
├── requirements.txt # fastmcp, mcp[cli], pydantic
├── server.py # FastMCP Server exposing Antigravity agent tools
├── .env.example # Environment variable template
├── .gitignore # Ignored artifacts & workspace directories
└── README.md # Documentation
📦 Quickstart & Deployment
1. Configure Environment
Copy the .env.example template:
cp .env.example .env
(Optional: Add your GEMINI_API_KEY or ANTIGRAVITY_API_KEY if required by your agy environment).
2. Start with Docker Compose
docker compose up -d --build
The FastMCP server will start listening on:
👉 http://localhost:8080/sse (or your host LAN IP).
3. Verify Container Health
docker compose logs -f
🔗 Connecting to mcp-server-oauth-proxy
To expose this Antigravity sub-agent bridge securely to Google Spark via your Home Assistant OAuth proxy:
- In Home Assistant, open Settings > Add-ons > MCP Server OAuth Proxy > Configuration.
- Add a new server entry under
servers:
- client_name: "Google Spark"
server_name: "Antigravity Bridge"
server_url: "http://<YOUR_DOCKER_HOST_IP>:8080/sse"
bearer_token: ""
client_id: "spark-antigravity"
client_secret: "secret-antigravity"
allowed_redirect_uris: "https://oauth-redirect.googleusercontent.com"
host: "antigravity-oauth.yourdomain.com"
path_prefix: ""
- Save and restart the add-on.
- In Google Spark, add the custom tool pointing to
https://antigravity-oauth.yourdomain.com/ssewith Client IDspark-antigravity.
🧰 Available MCP Tools
1. execute_antigravity_sync
- Description: Executes a task synchronously via
agy --headlessand waits for output. - Parameters:
prompt(string, required): The goal or coding instruction.sub_path(string, optional): Subdirectory in/workspaceto execute within.timeout_seconds(int, default: 300): Max seconds to wait before aborting.
2. start_antigravity_async
- Description: Starts an Antigravity task in the background and returns a
task_id. - Parameters:
prompt(string, required): The goal or coding instruction.sub_path(string, optional): Subdirectory in/workspaceto execute within.
3. get_antigravity_task_status
- Description: Inspects progress and full logs of a background task.
- Parameters:
task_id(string, required): The 8-character ID returned bystart_antigravity_async.
4. list_antigravity_tasks
- Description: Lists all active and completed background tasks.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。