Antigravity MCP Bridge
⚡ Antigravity MCP Bridge
Model Context Protocol を介して Google Cloud AI をローカルマシンに接続するオープンソースブリッジ
検証済みの概念実証: Gemini Spark へのプロンプト 1 つ — 「ユニットテスト付きの電卓を作成して」 — で、動作する Python コードが 3 秒以内に生成・実行され、GitHub にコミットされました。人間によるコピー&ペーストは一切不要です。
アーキテクチャ • ツール API • クイックスタート • Google エコシステム • 開発者ドキュメント • リソースとリンク • メリット
🧩 このプロジェクトとは?
Antigravity MCP Bridge は、クラウド AI とローカルマシンの間の壁を打ち破ります。ローカルで Model Context Protocol (MCP) サーバーを実行し、ターミナル、ファイル、コンパイラ、Git といった OS 全体を、セキュアな HTTPS トンネル経由で MCP 互換の AI オーケストレーターに公開します。
Google Gemini Spark に接続すれば、ソフトウェアの計画、コーディング、テスト、修正、リリースをディスク上で直接行える、完全自律型の AI ソフトウェアエンジニアを手に入れられます。
Related MCP server: Nexus-MCP
🏗️ システムアーキテクチャ
┌────────────────────────────────────────────────────────────────────┐
│ 🌐 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 │ │
│ └──────────────┘ └──────────────┘ └──────────────────────────┘ │
└────────────────────────────────────────────────────────────────────┘トランスポートプロトコル
エンドポイント | プロトコル | 最適な用途 |
| Streamable HTTP (MCP 2.0) | Google Gemini Spark、Vertex AI、および最新の MCP クライアント全般 |
| Server-Sent Events (SSE) | レガシー MCP クライアント、カスタム統合 |
| HTTP POST | SSE セッションでのメッセージ送信 |
🧰 全ツールリファレンス
🔧 ツール 1: run_system_command
任意のシェル、PowerShell、Bash コマンドを実行します。終了コード、stdout、stderr を取得します。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ | 実行する完全なシェルコマンド |
| string | ❌ | 作業ディレクトリのパス(デフォルトは CWD) |
// Example: Run Python unit tests
{
"name": "run_system_command",
"arguments": {
"command": "python -m pytest tests/ -v",
"working_dir": "C:/Users/dev/myproject"
}
}用途: Python/Node/Java/Rust の実行、pip install、npm install、git 操作、テストランナー、Docker、CI パイプライン。
📝 ツール 2: write_file
AI が生成したコンテンツで、ディスク上の任意のファイルを作成または上書きします。ディレクトリは自動的に作成されます。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ | 絶対パスまたは相対パス |
| string | ✅ | 書き込む完全なコンテンツ |
// 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'}"
}
}用途: ソースコード、設定ファイル、Dockerfile、GitHub Actions の YAML、Markdown ドキュメント、.env ファイルの作成。
📖 ツール 3: read_file
ローカルファイルの完全な内容を読み取って返します。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ | ファイルへのパス |
{
"name": "read_file",
"arguments": { "file_path": "src/main.py" }
}用途: リファクタリング前のコード確認、ログの読み取り、設定の監査、データセットの読み取り。
📂 ツール 4: list_directory
ファイルとディレクトリをタイプとサイズ付きで列挙します。
パラメータ | 型 | 必須 | 説明 |
| string | ❌ | 一覧表示するディレクトリ(デフォルトは CWD) |
{
"name": "list_directory",
"arguments": { "directory_path": "C:/Users/dev/myproject" }
}用途: プロジェクト構造の把握、ファイル作成の確認、リポジトリの監査。
🤖 ツール 5: run_agent_task
複雑な多段階の目標を処理する、自律型の長時間実行 Antigravity AI サブエージェント を起動します。task_id とともに即座に返ります。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ | 高レベルの自然言語による目標 |
| string | ❌ | エージェントが作業するディレクトリ |
{
"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"
}
}用途: 大規模なリファクタリング、機能のフル開発、自律型 TDD、セキュリティ監査。
📊 ツール 6: get_agent_status
バックグラウンドのサブエージェントタスクの進行状況、出力、エラーをポーリングします。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ |
|
{
"name": "get_agent_status",
"arguments": { "task_id": "a1b2c3d4" }
}
// Returns: { "status": "completed", "output": "...", "error": null }🛑 ツール 7: terminate_task
実行中のバックグラウンドサブエージェントタスクを安全にキャンセルします。
パラメータ | 型 | 必須 | 説明 |
| string | ✅ | キャンセルするタスク ID |
🔗 Google エコシステム統合
Gemini Spark
カスタム接続アプリ経由でブリッジを Gemini に接続します。
Google Cloud
ブリッジをクラウドにデプロイするか、Cloud AI と統合します。
Vertex AI
ローカル実行を備えたエンタープライズグレードの AI オーケストレーション。
Google Workspace
Docs、Drive、Gmail を AI コンテキストソースとして使用します。
📚 公式ドキュメントと外部リソース
🔵 Model Context Protocol (MCP)
リソース | リンク |
🏠 MCP 公式ウェブサイト | |
📖 MCP イントロダクション | |
📖 MCP クイックスタートガイド | |
📖 MCP 仕様 | |
🐍 Python MCP SDK(公式) | |
📦 PyPI の MCP | |
🐙 MCP GitHub オーガニゼーション | |
📖 MCP トランスポートリファレンス | |
📖 MCP ツールリファレンス |
🟣 Google Antigravity (AGY)
リソース | リンク |
🏠 Antigravity ホーム | |
📖 Antigravity ドキュメント | |
📖 MCP 統合ガイド | |
📖 スキルシステム | |
📖 Python SDK | |
📖 フックとプラグイン | |
📖 エージェント権限 | |
📖 チェンジログ |
🔵 Google Gemini & AI API
リソース | リンク |
🏠 Google Gemini App | |
📖 Gemini API ドキュメント | |
📖 Gemini API クイックスタート | |
📖 Gemini for Google Workspace | |
📖 Google AI Studio | |
📖 接続アプリ(MCP)ヘルプ | |
🐙 Google Generative AI GitHub |
☁️ Google Cloud Platform
リソース | リンク |
🏠 Google Cloud Console | |
📖 Vertex AI ドキュメント | |
📖 Cloud Run ドキュメント | |
📖 Cloud Build ドキュメント | |
📖 Google Cloud APIs Explorer | |
📖 AI・機械学習プロダクト |
🐍 Python とコアライブラリ
リソース | リンク |
🏠 Python 公式サイト | |
📖 Python ドキュメント | |
📦 PyPI パッケージインデックス | |
📖 pip ドキュメント | |
📖 asyncio ドキュメント | |
📖 subprocess ドキュメント |
🌐 Web と ASGI フレームワーク
リソース | リンク |
🏠 Uvicorn(ASGI サーバー) | |
📖 Uvicorn ドキュメント | |
🏠 Starlette フレームワーク | |
📖 Starlette ドキュメント | |
📖 Starlette ルーティング | |
📖 CORS ミドルウェア | |
🏠 FastAPI | |
📖 FastAPI ドキュメント |
🔒 トンネリングと安全な公開
リソース | リンク |
🏠 ngrok 公式サイト | |
📖 ngrok ドキュメント | |
📖 ngrok HTTP トンネル | |
📦 pyngrok(Python SDK) | |
📖 pyngrok ドキュメント | |
🏠 Cloudflare Tunnel | |
📖 Cloudflare Tunnel ドキュメント | developers.cloudflare.com/cloudflare-one/connections/connect-networks |
📡 JSON-RPC と SSE 仕様
リソース | リンク |
📖 JSON-RPC 2.0 仕様 | |
📖 Server-Sent Events(SSE)— MDN | |
📖 HTTP ステータスコード — MDN |
🔧 開発ツール
リソース | リンク |
🏠 Git | |
📖 Git ドキュメント | |
🏠 GitHub | |
📖 GitHub CLI(gh) | |
🏠 Python IDLE | |
📖 pytest テストフレームワーク | |
📖 unittest(組み込み) |
🚀 クイックスタート
前提条件
ステップ 1 — クローンとインストール
git clone https://github.com/nandhakumar-murugan/antigravity-mcp-bridge.git
cd antigravity-mcp-bridge
pip install -r requirements.txtステップ 2 — ngrok トークンを追加
トークンは dashboard.ngrok.com/get-started/your-authtoken で取得できます。
run_with_tunnel.py を編集します:
AUTHTOKEN = "your_ngrok_authtoken_here"ステップ 3 — 起動
# Windows (Double-click or run):
start_server.bat
# macOS / Linux:
python run_with_tunnel.py出力:
[INFO] NGROK MCP TUNNEL IS LIVE!
[LINK] PASTE THIS IN GEMINI SPARK: https://xxxx.ngrok-free.dev/mcpステップ 4 — Gemini Spark に接続する
設定 → カスタム接続アプリ に移動
https://xxxx.ngrok-free.dev/mcpを貼り付ける権限を承認 → 保存 をクリック
任意のチャットで
@Antigravity System Bridgeと入力してアクティベート!
💻 開発者向け統合ガイド
Python(公式 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(任意の言語)
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 設定
{
"mcpServers": {
"antigravity-bridge": {
"command": "python",
"args": ["run_with_tunnel.py"],
"env": { "NGROK_AUTHTOKEN": "your_token" }
}
}
}👥 対象となるユーザー
🎓 学生
実際のコードがディスク上で書かれて実行されるのを見られる(偽のサンドボックスではない)
AI が
pip install、仮想環境、PATH 設定を代行AI が実際のターミナルエラーをライブで修正するのを見てデバッグを学べる
💻 エンジニア
完全自律型 TDD: AI がコードを書き → テストを実行 → 失敗を修正 → 繰り返す
機能全体を委任: 「認証付き REST API を構築して」 → 数分で完了
チャットとエディタの間のコピーペーストが不要に
🔬 研究者
機密データをクラウドにアップロードせずにローカル Python パイプラインを実行
実験スクリプト、ベンチマーク、データ分析を会話形式で自動化
ターミナルコマンドでローカル GPU コンピュートを利用
📁 プロジェクト構造
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🛡️ セキュリティ
すべてのトラフィックは ngrok HTTPS により TLS 暗号化 されます
ngrok Authtoken が不正アクセスを防止します
すべてのターミナル実行に 180 秒のコマンドタイムアウト
terminate_taskは実行中のサブエージェントを 即座に停止 しますすべての操作はローカルターミナルで 完全に可視化 されます
📄 ライセンス
MIT ライセンス — 詳細は LICENSE を参照してください。
Google エコシステムで構築。オープンスタンダードで動作。
このリポジトリが役に立ったら ⭐ を付けてください! | 🍴 フォーク してチーム用にカスタマイズ
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