Antigravity MCP Bridge
Allows Gmail-integrated AI to use the local MCP server for driving commands, reading local files, and managing tasks while working from Gmail.
Allows Google Cloud AI services to drive the local machine, including deployment to Cloud Run and orchestration through Google Cloud-hosted AI services.
Enables the bridge to be used from Google Docs workflows, allowing AI-assisted document-linked tasks to leverage local file and command capabilities.
Provides access to the local MCP bridge through Google Drive, enabling AI workflows connected to Drive to perform local file operations and system tasks.
Connects Gemini Spark to the local MCP server, letting Gemini read/write files, run system commands, execute tests and git operations, and manage autonomous coding tasks on the local machine.
Click on "Install 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 BridgeCreate a Python project, add tests, run them, and fix any failures"
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.
⚡ Antigravity MCP Bridge
The Open-Source Bridge Connecting Google Cloud AI to Your Local Machine via the Model Context Protocol
Verified Proof of Concept: A single Gemini Spark prompt — "Create a calculator with unit tests" — produced, ran, and committed working Python code to GitHub in under 3 seconds. Zero human copy-pasting.
Architecture • Tools API • Quickstart • Google Ecosystem • Developer Docs • Resources & Links • Benefits
🧩 What Is This Project?
Antigravity MCP Bridge breaks the barrier between Cloud AI and your local machine. It runs a local Model Context Protocol (MCP) server that exposes your entire operating system — terminal, files, compilers, and Git — to any MCP-compatible AI orchestrator over a secure HTTPS tunnel.
Connect it to Google Gemini Spark and you get a fully autonomous AI Software Engineer that can plan, code, test, fix, and ship software directly on your disk.
Related MCP server: Nexus-MCP
🏗️ System Architecture
┌────────────────────────────────────────────────────────────────────┐
│ 🌐 GOOGLE CLOUD ECOSYSTEM │
│ │
│ ┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │
│ │ Gemini Spark │ │ Google Workspace │ │ Vertex AI / │ │
│ │ (Orchestrator) │ │ Docs/Drive/Gmail │ │ Cloud Run │ │
│ └────────┬────────┘ └──────────────────┘ └─────────────────┘ │
└───────────┼────────────────────────────────────────────────────────┘
│ JSON-RPC 2.0 (Streamable HTTP / SSE)
│ HTTPS via ngrok / Cloudflare Tunnel
┌───────────▼────────────────────────────────────────────────────────┐
│ ⚡ ANTIGRAVITY MCP BRIDGE (Your Machine) │
│ │
│ /mcp (Streamable HTTP) /sse (Server-Sent Events) │
│ CORS · Authentication · 7 Registered MCP Tools │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ File System │ │ Terminal │ │ Antigravity Subagents │ │
│ │ Read/Write │ │ Shell/CMD │ │ (Autonomous Tasks) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────────┘ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────────┐ │
│ │ Python │ │ Node.js/npm │ │ Git / Docker / CI │ │
│ └──────────────┘ └──────────────┘ └──────────────────────────┘ │
└────────────────────────────────────────────────────────────────────┘Transport Protocol
Endpoint | Protocol | Best For |
| Streamable HTTP (MCP 2.0) | Google Gemini Spark, Vertex AI, all modern MCP clients |
| Server-Sent Events (SSE) | Legacy MCP clients, custom integrations |
| HTTP POST | Posting messages in SSE sessions |
🧰 Complete Tools Reference
🔧 Tool 1: run_system_command
Execute any shell, PowerShell or Bash command. Captures exit code, stdout, stderr.
Param | Type | Required | Description |
| string | ✅ | Full shell command to execute |
| string | ❌ | Working directory path (defaults to CWD) |
// Example: Run Python unit tests
{
"name": "run_system_command",
"arguments": {
"command": "python -m pytest tests/ -v",
"working_dir": "C:/Users/dev/myproject"
}
}Use for: Running Python/Node/Java/Rust, pip install, npm install, git operations, test runners, Docker, CI pipelines.
📝 Tool 2: write_file
Create or overwrite any file on disk with AI-generated content. Auto-creates directories.
Param | Type | Required | Description |
| string | ✅ | Absolute or relative file path |
| string | ✅ | Full content to write |
// Example: Write a FastAPI route
{
"name": "write_file",
"arguments": {
"file_path": "src/api/routes.py",
"content": "from fastapi import APIRouter\nrouter = APIRouter()\n\n@router.get('/health')\ndef health(): return {'status': 'ok'}"
}
}Use for: Writing source code, configs, Dockerfiles, GitHub Actions YAML, Markdown docs, .env files.
📖 Tool 3: read_file
Read and return the full content of any local file.
Param | Type | Required | Description |
| string | ✅ | Path to the file |
{
"name": "read_file",
"arguments": { "file_path": "src/main.py" }
}Use for: Inspecting code before refactoring, reading logs, auditing configs, reading datasets.
📂 Tool 4: list_directory
Enumerate files and directories with type and size.
Param | Type | Required | Description |
| string | ❌ | Directory to list (defaults to CWD) |
{
"name": "list_directory",
"arguments": { "directory_path": "C:/Users/dev/myproject" }
}Use for: Discovering project structure, verifying files were created, auditing repos.
🤖 Tool 5: run_agent_task
Spawn an autonomous long-running Antigravity AI subagent for complex multi-step goals. Returns instantly with a task_id.
Param | Type | Required | Description |
| string | ✅ | High-level natural language objective |
| string | ❌ | Directory for the agent to operate in |
{
"name": "run_agent_task",
"arguments": {
"prompt": "Refactor all Python files to use async/await. Run tests after each file.",
"workspace_dir": "C:/Users/dev/myproject"
}
}Use for: Large-scale refactoring, full feature development, autonomous TDD, security audits.
📊 Tool 6: get_agent_status
Poll the live progress, output, and errors of a background subagent task.
Param | Type | Required | Description |
| string | ✅ | Task ID from |
{
"name": "get_agent_status",
"arguments": { "task_id": "a1b2c3d4" }
}
// Returns: { "status": "completed", "output": "...", "error": null }🛑 Tool 7: terminate_task
Safely cancel any running background subagent task.
Param | Type | Required | Description |
| string | ✅ | Task ID to cancel |
🔗 Google Ecosystem Integration
Gemini Spark
Connect your bridge to Gemini via Custom Connected Apps.
Google Cloud
Deploy the bridge to Cloud or integrate with Cloud AI.
Vertex AI
Enterprise-grade AI orchestration with local execution.
Google Workspace
Use Docs, Drive, Gmail as AI context sources.
📚 Official Documentation & External Resources
🔵 Model Context Protocol (MCP)
Resource | Link |
🏠 MCP Official Website | |
📖 MCP Introduction | |
📖 MCP Quickstart Guide | |
📖 MCP Specification | |
🐍 Python MCP SDK (Official) | |
📦 MCP on PyPI | |
🐙 MCP GitHub Organization | |
📖 MCP Transports Reference | |
📖 MCP Tools Reference |
🟣 Google Antigravity (AGY)
Resource | Link |
🏠 Antigravity Home | |
📖 Antigravity Docs | |
📖 MCP Integration Guide | |
📖 Skills System | |
📖 Python SDK | |
📖 Hooks & Plugins | |
📖 Agent Permissions | |
📖 Changelog |
🔵 Google Gemini & AI APIs
Resource | Link |
🏠 Google Gemini App | |
📖 Gemini API Documentation | |
📖 Gemini API Quickstart | |
📖 Gemini for Google Workspace | |
📖 Google AI Studio | |
📖 Connected Apps (MCP) Help | |
🐙 Google Generative AI GitHub |
☁️ Google Cloud Platform
Resource | Link |
🏠 Google Cloud Console | |
📖 Vertex AI Documentation | |
📖 Cloud Run Documentation | |
📖 Cloud Build Documentation | |
📖 Google Cloud APIs Explorer | |
📖 AI & Machine Learning Products |
🐍 Python & Core Libraries
Resource | Link |
🏠 Python Official Website | |
📖 Python Docs | |
📦 PyPI Package Index | |
📖 pip Documentation | |
📖 asyncio Documentation | |
📖 subprocess Documentation |
🌐 Web & ASGI Framework
Resource | Link |
🏠 Uvicorn (ASGI Server) | |
📖 Uvicorn Docs | |
🏠 Starlette Framework | |
📖 Starlette Docs | |
📖 Starlette Routing | |
📖 CORS Middleware | |
🏠 FastAPI | |
📖 FastAPI Docs |
🔒 Tunneling & Secure Exposure
Resource | Link |
🏠 ngrok Official Website | |
📖 ngrok Documentation | |
📖 ngrok HTTP Tunnels | |
📦 pyngrok (Python SDK) | |
📖 pyngrok Docs | |
🏠 Cloudflare Tunnel | |
📖 Cloudflare Tunnel Docs | developers.cloudflare.com/cloudflare-one/connections/connect-networks |
📡 JSON-RPC & SSE Specifications
Resource | Link |
📖 JSON-RPC 2.0 Specification | |
📖 Server-Sent Events (SSE) — MDN | |
📖 HTTP Status Codes — MDN |
🔧 Development Tools
Resource | Link |
🏠 Git | |
📖 Git Documentation | |
🏠 GitHub | |
📖 GitHub CLI (gh) | |
🏠 Python IDLE | |
📖 pytest Testing Framework | |
📖 unittest (Built-in) |
🚀 Quickstart
Prerequisites
Step 1 — Clone & Install
git clone https://github.com/nandhakumar-murugan/antigravity-mcp-bridge.git
cd antigravity-mcp-bridge
pip install -r requirements.txtStep 2 — Add Your ngrok Token
Get your token at dashboard.ngrok.com/get-started/your-authtoken
Edit run_with_tunnel.py:
AUTHTOKEN = "your_ngrok_authtoken_here"Step 3 — Launch
# Windows (Double-click or run):
start_server.bat
# macOS / Linux:
python run_with_tunnel.pyOutput:
[INFO] NGROK MCP TUNNEL IS LIVE!
[LINK] PASTE THIS IN GEMINI SPARK: https://xxxx.ngrok-free.dev/mcpStep 4 — Connect to Gemini Spark
Open gemini.google.com
Go to Settings → Custom Connected Apps
Paste:
https://xxxx.ngrok-free.dev/mcpAccept permissions → Click Save
Type
@Antigravity System Bridgein any chat to activate!
💻 Developer Integration Guide
Python (Official MCP SDK)
import asyncio
from mcp.client.session import ClientSession
from mcp.client.streamable_http import streamable_http_client
async def main():
url = "https://xxxx.ngrok-free.dev/mcp"
async with streamable_http_client(url) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print([t.name for t in tools.tools])
# Run a command
result = await session.call_tool("run_system_command", {
"command": "python --version"
})
print(result.content[0].text)
asyncio.run(main())cURL (Any Language)
curl -X POST https://xxxx.ngrok-free.dev/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-app","version":"1.0"}}}'Claude Desktop Config
{
"mcpServers": {
"antigravity-bridge": {
"command": "python",
"args": ["run_with_tunnel.py"],
"env": { "NGROK_AUTHTOKEN": "your_token" }
}
}
}👥 Who Benefits
🎓 Students
See real code written and run on your disk — not in fake sandboxes
AI handles
pip install, virtual environments, and PATH setup for youLearn debugging by watching the AI fix real terminal errors live
💻 Engineers
Full autonomous TDD: AI writes code → runs tests → fixes failures → repeats
Delegate entire features: "Build a REST API with auth" → done in minutes
No more copy-pasting between chat and editor
🔬 Researchers
Run local Python pipelines without uploading sensitive data to the cloud
Automate experiment scripts, benchmarks, and data analysis conversationally
Use local GPU compute via terminal commands
📁 Project Structure
antigravity-mcp-bridge/
├── server.py # Core MCP server with all 7 tool definitions
├── run_with_tunnel.py # One-click launcher (server + ngrok tunnel)
├── start_server.bat # Windows double-click starter
├── test_client.py # MCP connection verification script
├── calculator.py # Example: AI-generated code via Gemini Spark
├── test_calculator.py # Example: AI-generated tests (all 6 passed)
├── requirements.txt # Python dependencies
├── .gitignore
├── LICENSE # MIT
└── README.md📦 requirements.txt
mcp>=2.0.0
uvicorn
fastapi
pyngrok
python-dotenv🛡️ Security
All traffic is TLS-encrypted via ngrok HTTPS
ngrok Authtoken prevents unauthorized access
180-second command timeout on all terminal executions
terminate_taskimmediately halts any running subagentAll operations are fully visible in your local terminal
📄 License
MIT License — see LICENSE for details.
Built with the Google Ecosystem. Powered by Open Standards.
⭐ Star this repo if it helped you! | 🍴 Fork to customize for your team
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.492MIT
- AlicenseNot gradedqualityCmaintenanceA comprehensive Model Context Protocol toolkit that transforms AI assistants into autonomous agents capable of executing real-world tasks across filesystems, web requests, Git workflows, databases, system commands, and AI integrations.MIT
- AlicenseNot gradedqualityCmaintenanceA unified context layer that connects your local data — repositories, documents, remote machines, and notes — to LLM interfaces through the Model Context Protocol (MCP).3MIT
- AlicenseNot gradedqualityCmaintenanceA secure, local communication runtime bridge that interfaces a cloud-based Large Language Model (Claude Desktop) with a local machine execution environment using the Model Context Protocol (MCP).Eclipse Public 2.0
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nandhakumar-murugan/antigravity-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server