Antigravity MCP Bridge
This MCP server bridges Gemini Spark/cloud AI with a local Antigravity IDE and machine, enabling remote command execution, file/project manipulation, agent orchestration, shared memory, and conversation/task routing.
Execute single or batched shell/PowerShell commands with timeouts and safety filtering.
Read, write, edit, append, batch-write, and list files/directories.
Scaffold complete projects and run initial setup/test commands in one call.
Check Git repository status.
Launch, monitor, and terminate autonomous Antigravity agent tasks.
Inject structured messages/tasks into Antigravity conversations and retrieve execution reports.
Save/read shared session notes and inspect bridge tool-call history.
Sync project status and architecture summaries to Gemini Spark's shared memory.
Request actions from Spark-connected apps such as Gmail, Drive, Docs, Canva, YouTube, Dropbox, etc.
List available Spark connected apps and Antigravity conversations.
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 "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 Create 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.
โก Gemini Antigravity Bridge
The World's First Bidirectional MCP Bridge Between Google Gemini Spark & DeepMind Antigravity
Connect Google's cloud AI (Gemini Spark powered by Gemini 3.8 / 3.7) to your local agentic IDE (Antigravity) with 52 powerful MCP tools, hardened by OpenAgentShield Zero-Trust runtime sandboxing and automatic credential redaction.
Quick Start ยท Architecture ยท Tools ยท Connected Apps ยท Deploy
๐ What Is This?
Gemini Antigravity Bridge is an MCP (Model Context Protocol) server that creates a persistent, bidirectional communication channel between:
โ๏ธ Google Gemini Spark (cloud-based AI assistant with Google Workspace access, powered by Gemini 3.8 / 3.7)
๐ป Google DeepMind Antigravity (local agentic IDE with full system access)
Optimized for Gemini 3.8's next-generation agentic reasoning, this enables a fully autonomous loop where Spark can dispatch coding tasks to your local machine, and Antigravity can request cloud intelligence back from Spark โ all through a standardized, secure protocol.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GEMINI SPARK (Google Cloud) โ
โ ๐ฌ Gmail โ ๐ Drive โ ๐
Calendar โ ๐จ Canva โ ๐ฅ YouTube โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP over HTTPS
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โก GEMINI ANTIGRAVITY BRIDGE (MCP Server) โ
โ โ
โ ๐ง System Commands ๐ File Operations ๐ค Agent Dispatch โ
โ ๐ง Shared Memory ๐ Project Sync ๐ Status Reports โ
โ โ
โ Tunnel: ngrok / Cloudflare (permanent HTTPS domain) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Local MCP + Message Injection
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ANTIGRAVITY IDE (Local Machine) โ
โ ๐ฅ๏ธ Terminal โ ๐ Code Editor โ ๐ณ Git โ ๐งช Tests โ ๐ Deploy โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโRelated MCP server: AlMoutmag 1.1
๐ Why This Bridge?
Feature | This Project | Other MCP Servers |
Bidirectional Cloud โ Local | โ | โ |
Autonomous Agent Task Dispatch | โ | โ |
Cross-Agent Shared Memory | โ | โ |
Antigravity Conversation Injection | โ | โ |
Spark Connected Apps Orchestration | โ | โ |
Google Workspace Integration | โ (via Spark) | Partial |
Local File System Access | โ | Some |
System Command Execution | โ | Some |
๐ Quick Start
Prerequisites
Python 3.10+
ngrok account (free tier) with a reserved domain
Google Gemini Spark (Advanced/Ultra subscription)
Google DeepMind Antigravity IDE
Installation
# Clone the repository
git clone https://github.com/nandhakumar-murugan/gemini-antigravity-bridge.git
cd gemini-antigravity-bridge
# Install dependencies or install package directly
pip install -r requirements.txt
# OR install as a CLI tool:
pip install -e .
# ๐ง Run Guided 1-Click Setup Wizard (Recommended)
python setup_wizard.py
# (Automatically configures your tunnel, generates secure API keys, and sets up .env)
# Or manual configuration:
cp .env.example .env
# Edit .env with your NGROK_AUTHTOKEN and BRIDGE_API_KEY
# Launch the bridge (via script or CLI)
python run_with_tunnel.py
# or silent auto-recovery background service (Windows):
start_service_now.bat๐ Connecting Your AI Assistant
AI Assistant | Connection Method | Endpoint Configuration |
Google Gemini Spark | Connected Apps $\rightarrow$ Add Custom App |
|
Anthropic Claude Desktop |
| Remote MCP URL: |
OpenAI ChatGPT | Custom GPT $\rightarrow$ Actions | Import OpenAPI from: |
Meta Muse / WhatsApp | Connector Tool / Webhook | Pass |
Local IDE / Antigravity | Local MCP |
|
๐ก๏ธ Security & Zero-Trust Architecture
Mandatory Bridge Authentication: All external endpoints (
/mcp,/sse,/api/*) requireBRIDGE_API_KEY.Zero Hardcoded Secrets: Secrets are isolated in
.env(strictly.gitignored).Domain Collision Protection: No hardcoded static domain fallbacks; each user reserves their own free ngrok domain or uses Cloudflare quick tunnels.
Instance ID Verification: Per-boot UUID ensures no remote machine can impersonate your bridge session.
๐ ๏ธ Available Tools (52)
๐ง System Execution
Tool | Description |
| Execute shell/PowerShell command with AST risk analysis and captured output |
| Run multiple commands sequentially with error handling and policy validation |
๐ File Operations
Tool | Description |
| Read file contents with sensitive credential protection |
| Create or overwrite files with automatic secret redaction |
| Surgically edit specific lines in existing files |
| Append content to the end of a file |
| Create multiple files in a single operation with policy enforcement |
| Scaffold an entire project directory structure |
| List directory contents with metadata |
๐ค Agent Orchestration
Tool | Description |
| Launch an autonomous Antigravity coding subagent |
| Check status and output of a running agent task |
| Kill a running agent task |
๐ก๏ธ Zero-Trust Security & Telemetry (OpenAgentShield)
Tool | Description |
| Retrieves OpenAgentShield Zero-Trust audit events, blocked attacks, and system risk scores (DOI: 10.5281/zenodo.22259022) |
๐ง Shared Memory & Sync
Tool | Description |
| Retrieve full cross-client operation history with redacted credentials |
| Write a structured note to shared memory (tagged) |
| Read session notes by tag or date range |
| Sync project metadata to Spark's knowledge base |
| Quick Git status check for any repository |
๐ Spark Connected Apps
Tool | Description |
| Dispatch tasks to Spark's connected apps (@Canva, @YouTube, @Gmail, etc.) |
| List all available connected apps and capabilities |
๐ Antigravity Deep Integration
Tool | Description |
| List all active Antigravity IDE conversations |
| Inject a structured message directly into an Antigravity conversation |
| Dispatch a full task brief from Spark to Antigravity |
| Get the latest execution report for Spark to review |
๐ฅ๏ธ Desktop Control & Vision
Tool | Description |
| ๐ธ Capture the full desktop screen (or a specific region) and return it as a base64-encoded PNG image. |
| ๐ฅ๏ธ Get the current screen resolution and mouse cursor position. |
| ๐ฑ๏ธ Click the mouse at a position. |
| ๐ฑ๏ธ Click and drag the mouse from one position to another. |
| ๐ฑ๏ธ Scroll the mouse wheel at a specific position on screen. |
| โจ๏ธ Press a keyboard key or hotkey combination. |
| โจ๏ธ Type a string of text using the keyboard at the current cursor focus. |
| ๐ช FOCUS APPLICATION WINDOW. |
| ๐ MASTER COMPUTER AGENT โ ALWAYS USE THIS TOOL FIRST FOR ANY USER COMPUTER WORK! |
| โก AUTONOMOUS COMPUTER ACTION PLAN (Single Permission Execution). |
๐ท Camera, Voice & Media
Tool | Description |
| ๐ท Capture a live photo/snapshot directly from the laptop webcam/camera. |
๐ฌ Argon Reel Creation
Tool | Description |
| ๐ฌ Autonomous Instagram Reel & Short Creator (Argon.io). |
| ๐ฑ Reframe horizontal (16:9) video into Instagram Reel / YouTube Short (9:16, 1080x1920). |
| ๐ Generate word-level synchronized short-form subtitles (.srt) using local Whisper model. |
๐ค Multi-Agent Coordination
Tool | Description |
| Inspects the shared Multi-Agent Board. |
๐งฉ Additional Tools
Tool | Description |
| Claims an active task on the shared Multi-Agent Bridge Board so peer agents (Google Gemini, Meta Muse, Antigravity) are... |
| Releases an active task on the Multi-Agent Board and broadcasts a completion handoff. |
| ๐ SPEAK OUT LOUD THROUGH LAPTOP SPEAKERS (Windows SAPI5 Voice). |
| ๐ NATIVE WINDOWS DESKTOP NOTIFICATION. |
| ๐ READ WINDOWS CLIPBOARD. |
| ๐ COPY TO WINDOWS CLIPBOARD. |
| ๐ GET CURRENT FOREGROUND WINDOW. |
| ๐ฒ MAXIMIZE APPLICATION WINDOW. |
| โ MINIMIZE APPLICATION WINDOW. |
| โ CLOSE APPLICATION WINDOW. |
| ๐ GET LAPTOP HARDWARE TELEMETRY & BATTERY. |
| ๐ฅ๏ธ UNIFIED DESKTOP & SCREEN INSPECTOR (Astra Computer Vision). |
| ๐ฑ๏ธ Move the mouse cursor to a specific pixel position on screen. |
๐ Spark Connected Apps
Through the bridge, Antigravity can orchestrate Spark's connected Google & third-party apps:
App | Capabilities |
๐จ @Canva | Poster design, infographics, slide decks |
๐ @Google Drive | Cloud file search, folder management |
๐ @Google Docs | Document creation and collaboration |
๐ @Google Keep | Quick notes, flashcards, checklists |
๐ฅ @YouTube | Video search, transcript extraction |
๐ฌ @Gmail | Email reading, URL extraction |
๐ @Gemini Notebook | Deep research and synthesis |
๐ฆ @Dropbox | Cloud storage sync via MCP |
๐๏ธ Architecture
graph TB
subgraph Cloud["โ๏ธ Google Cloud"]
Spark["Gemini Spark<br/>Consumer AI Assistant"]
Gmail["๐ฌ Gmail"]
Drive["๐ Google Drive"]
Calendar["๐
Google Calendar"]
Canva["๐จ Canva"]
end
subgraph Bridge["โก Antigravity Bridge"]
MCP["MCP Server<br/>(FastMCP + Starlette)"]
Tunnel["HTTPS Tunnel<br/>(ngrok / Cloudflare)"]
Memory["๐ง Shared Memory<br/>(bridge_history.json)"]
Dashboard["๐ Web Dashboard"]
end
subgraph Local["๐ป Local Machine"]
AGY["Antigravity IDE"]
Terminal["๐ฅ๏ธ Terminal"]
Git["๐ณ Git Repos"]
Files["๐ File System"]
end
Spark -->|"MCP over HTTPS"| Tunnel
Tunnel --> MCP
MCP -->|"inject_message"| AGY
MCP -->|"run_system_command"| Terminal
MCP -->|"git_quick_status"| Git
MCP -->|"read/write_file"| Files
MCP --> Memory
AGY -->|"save_session_note"| Memory
Memory -->|"get_agent_report"| Spark
Spark --> Gmail
Spark --> Drive
Spark --> Calendar
Spark --> Canva๐ข Deployment
Auto-Start on Windows Boot
The bridge includes a silent startup script that launches automatically when you log in:
๐ %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\
โโโ GeminiAntigravityBridge.vbs (silent background launcher)Cloud Deployment (24/7 Uptime)
# Using Docker
docker build -t gemini-antigravity-bridge .
docker run -d -p 8000:8000 --env-file .env gemini-antigravity-bridge
# Using Render.com / Google Cloud Run
# Push to GitHub โ Connect repo โ Deploy automatically๐ Scheduled Monitoring
The bridge supports multi-tier automated monitoring via Gemini Spark schedules:
Tier | Cadence | Purpose |
๐ด Instant Trigger | Real-time (on email arrival) | Zero-delay alerts for college & NPTEL emails |
๐ก Hourly Sweep | Every 60 minutes | Broad monitoring across all platforms |
๐ข Morning Briefing | Daily @ 8:00 AM | Strategic daily plan with exam schedules |
๐ค Contributing
Contributions are welcome! Please read the Apache 2.0 License before submitting PRs.
Fork the repository
Create your feature branch (
git checkout -b feat/amazing-feature)Commit your changes (
git commit -m 'feat: add amazing feature')Push to the branch (
git push origin feat/amazing-feature)Open a Pull Request
๐ License
This project is licensed under the Apache License 2.0 โ see the LICENSE file for details.
๐ Research Paper & Academic Citation
This framework implements the formal architecture introduced in the published research paper:
AgentShield: A Zero-Trust Runtime Guardrail Architecture for Autonomous Multi-Agent AI Systems with Bidirectional Context Synchronization
Nandhakumar Murugan
Department of Computer Science and Engineering (Cybersecurity), KGiSL Institute of Technology (KiTE), Autonomous
Permanent DOI: 10.5281/zenodo.22259022 | Open Access: Zenodo CERN Repository
If you reference or build upon this architecture in academic or enterprise research, please cite:
@article{murugan2026agentshield,
title={AgentShield: A Zero-Trust Runtime Guardrail Architecture for Autonomous Multi-Agent AI Systems with Bidirectional Context Synchronization},
author={Murugan, Nandhakumar},
journal={Zenodo},
year={2026},
doi={10.5281/zenodo.22259022},
url={https://doi.org/10.5281/zenodo.22259022}
}๐จโ๐ป Author
Nandhakumar Murugan
B.E. Computer Science & Cyber Security | KGiSL Institute of Technology
Google Student Ambassador (GID: 36) | Open Source Contributor
Built with โค๏ธ using Google Gemini, DeepMind Antigravity & Model Context Protocol
Available Tools
23 toolsappend_fileB
Appends text to the end of an existing file (or creates it if it doesn't exist).
Inputs: content (required), file_path (required), source. Returns: result
batch_write_filesA
Creates or updates multiple files in a single tool call. Reduces permission prompts from N to 1. Parameters: files: Dictionary of {"relative/or/abs/filepath": "file_content"} base_dir: Optional root directory (defaults to server CWD)
Inputs: files (required), source, base_dir. Returns: result
create_full_projectA
Creates an entire project directory, writes all code files, and runs initial setup/test commands in a SINGLE tool call with 1 permission confirmation. Parameters: project_name: Name of the project folder to create. files: Dictionary of {"rel/path/filename.ext": "file content"} setup_commands: Optional list of commands to run inside the new project (e.g. ["pip install -r requirements.txt", "python test.py"]) working_dir: Parent directory where project folder will be created (defaults to CWD).
Inputs: files (required), project_name (required), source, working_dir, +1 more. Returns: result
edit_fileC
Performs a precise surgical search-and-replace edit in an existing file. Avoids having to rewrite the entire file when making targeted code changes.
Inputs: file_path (required), find_text (required), replace_text (required), source. Returns: result
get_agent_statusB
Fetches the live status and output of a running or completed agent task.
Inputs: task_id (required). Returns: result
get_antigravity_agent_reportB
Retrieves the structured status report and latest responses from Antigravity. Shows completion notes, modified files, test outputs, and executive summary.
Inputs: source, task_id, conversation_id. Returns: result
get_bridge_historyB
Returns the full shared history of all tool calls made through this bridge.
Inputs: limit, tool_filter, source_filter. Returns: result
get_session_notesB
Retrieves all saved session notes from the shared bridge log.
Inputs: tag_filter. Returns: result
get_spark_connected_apps_catalogA
Returns the complete list and capabilities of external tools & Google Workspace apps connected to Gemini Spark that Antigravity can orchestrate.
Inputs: no named parameters. Returns: result
git_quick_statusB
Returns high-level Git status: active branch, changed files, untracked files, and recent commit.
Inputs: source, repo_dir. Returns: result
inject_messageC
Injects a message directly into any Antigravity conversation's inbox.
Inputs: message (required), conversation_id (required), title, sender, +1 more. Returns: result
list_antigravity_conversationsA
Lists ALL Antigravity projects/conversations with their real names, conversation IDs, last active time, message count, artifact count, and task count.
Inputs: no named parameters. Returns: result
list_directoryC
Lists files and directories at the specified path with file sizes.
Inputs: source, directory_path. Returns: result
read_fileC
Reads the content of a file from the local filesystem.
Inputs: file_path (required), source. Returns: result
request_spark_connected_app_actionB
Dispatches a task from Antigravity to Gemini Spark requesting execution via Spark's connected apps (e.g. @Canva, @Google Drive, @Google Docs, @Google Keep, @YouTube, @Gmail, @Dropbox). Spark will read this request on sync and execute the tool action in the Google ecosystem.
Inputs: app (required), action (required), details (required), source, +1 more. Returns: result
run_agent_taskC
Launches an autonomous Antigravity AI agent task using ANTIGRAVITY's credits and models. Routes the task into a real Antigravity conversation via message injection.
Inputs: prompt (required), source, workspace_dir. Returns: result
run_batch_commandsA
Executes multiple shell/PowerShell commands sequentially in a single tool call. Reduces permission prompts from N to 1. Parameters: commands: List of shell command strings to execute in order. working_dir: Working directory for all commands. stop_on_error: If True, halts execution if any command returns non-zero exit code. timeout_per_command: Max seconds per command (default: 180s).
Inputs: commands (required), source, working_dir, stop_on_error, +1 more. Returns: result
run_system_commandC
Executes a shell/PowerShell command on the local system (e.g. python, npm, git, tests, pip). Includes safety filtering and configurable timeout (default: 180s).
Inputs: command (required), source, working_dir, timeout_seconds. Returns: result
save_session_noteB
Saves a note or memory to the shared bridge session log.
Inputs: note (required), tag, source. Returns: result
send_spark_to_antigravity_taskA
Sends a crystal-clear, structured task brief from Gemini Spark to Antigravity IDE. Automatically generates a formatted markdown instruction envelope with Task ID, objectives, context, step-by-step actions, and reporting instructions.
Parameters: objective: Clear 1-2 sentence primary goal. context: Optional background, architectural details, or file paths. required_actions: Optional ordered list of specific steps (e.g. ["write tests", "run pytest", "fix bugs"]). conversation_id: Target Antigravity conversation UUID (if None, targets most recent active). working_dir: Target working folder on disk.
Inputs: objective (required), source, context, working_dir, +2 more. Returns: result
sync_project_to_geminiB
Called by Antigravity to push a complete project status report and architectural summary into the shared bridge memory. Gemini Spark can read this anytime to understand your exact project state.
Inputs: summary (required), project_name (required), source, key_files, +2 more. Returns: result
terminate_taskA
Terminates or cancels a running agent task by task ID.
Inputs: task_id (required). Returns: result
write_fileB
Creates or overwrites a file on the local filesystem with specified content. Automatically creates parent directories if they don't exist.
Inputs: content (required), file_path (required), source. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 23 tools
Multiple tools have overlapping purposes, such as run_system_command vs run_batch_commands, write_file vs batch_write_files, and run_agent_task vs send_spark_to_antigravity_task vs inject_message. The boundaries between session notes, bridge history, and agent status reports are also unclear, creating significant potential for misselection.
Most tool names follow a verb_noun pattern, but the verbs are inconsistent across similar actions (e.g., run_agent_task, send_spark_to_antigravity_task, inject_message) and some names like git_quick_status do not follow the pattern. The naming is readable but not systematically consistent.
With 23 tools, the set is at the high end of the 'heavy but not extreme' range. The broad scope of filesystem, shell, agent, notes, and external app operations partially justifies the count, but it feels larger than necessary and could be consolidated.
The toolset covers core filesystem operations, command execution, batch operations, agent task management, session notes, and external app integration. Minor gaps exist such as no explicit delete file/note tool and no direct list-agent-tasks function, but the primary workflows are well represented.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA 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
- AlicenseNot gradedqualityBmaintenanceEnables cloud AI agents to securely connect to a local Windows machine and execute tools such as system info, file operations, browser automation, and coding tasks through the Model Context Protocol.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access file systems, fetch web content, query databases, and execute shell commands through the standardized Model Context Protocol.MIT
- AlicenseNot gradedqualityAmaintenanceEnables web-based AI clients like Claude, ChatGPT, and Grok to securely operate a local machine through OAuth-gated MCP tools covering files, shell, Git, databases, browser automation, and background tasks.MIT