Skip to main content
Glama

⚡ Antigravity MCP Bridge

Model Context Protocol を介して Google Cloud AI をローカルマシンに接続するオープンソースブリッジ

Model Context Protocol Gemini Spark Google Cloud Python ngrok MIT License GitHub Stars


検証済みの概念実証: 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      │ │
│  └──────────────┘  └──────────────┘  └──────────────────────────┘ │
└────────────────────────────────────────────────────────────────────┘

トランスポートプロトコル

エンドポイント

プロトコル

最適な用途

/mcp

Streamable HTTP (MCP 2.0)

Google Gemini Spark、Vertex AI、および最新の MCP クライアント全般

/sse

Server-Sent Events (SSE)

レガシー MCP クライアント、カスタム統合

/messages

HTTP POST

SSE セッションでのメッセージ送信


🧰 全ツールリファレンス

🔧 ツール 1: run_system_command

任意のシェル、PowerShell、Bash コマンドを実行します。終了コード、stdout、stderr を取得します。

パラメータ

必須

説明

command

string

実行する完全なシェルコマンド

working_dir

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 が生成したコンテンツで、ディスク上の任意のファイルを作成または上書きします。ディレクトリは自動的に作成されます。

パラメータ

必須

説明

file_path

string

絶対パスまたは相対パス

content

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

ローカルファイルの完全な内容を読み取って返します。

パラメータ

必須

説明

file_path

string

ファイルへのパス

{
  "name": "read_file",
  "arguments": { "file_path": "src/main.py" }
}

用途: リファクタリング前のコード確認、ログの読み取り、設定の監査、データセットの読み取り。


📂 ツール 4: list_directory

ファイルとディレクトリをタイプとサイズ付きで列挙します。

パラメータ

必須

説明

directory_path

string

一覧表示するディレクトリ(デフォルトは CWD)

{
  "name": "list_directory",
  "arguments": { "directory_path": "C:/Users/dev/myproject" }
}

用途: プロジェクト構造の把握、ファイル作成の確認、リポジトリの監査。


🤖 ツール 5: run_agent_task

複雑な多段階の目標を処理する、自律型の長時間実行 Antigravity AI サブエージェント を起動します。task_id とともに即座に返ります。

パラメータ

必須

説明

prompt

string

高レベルの自然言語による目標

workspace_dir

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

バックグラウンドのサブエージェントタスクの進行状況、出力、エラーをポーリングします。

パラメータ

必須

説明

task_id

string

run_agent_task から返されたタスク ID

{
  "name": "get_agent_status",
  "arguments": { "task_id": "a1b2c3d4" }
}
// Returns: { "status": "completed", "output": "...", "error": null }

🛑 ツール 7: terminate_task

実行中のバックグラウンドサブエージェントタスクを安全にキャンセルします。

パラメータ

必須

説明

task_id

string

キャンセルするタスク ID


🔗 Google エコシステム統合

Gemini Spark

カスタム接続アプリ経由でブリッジを Gemini に接続します。

Google Cloud

ブリッジをクラウドにデプロイするか、Cloud AI と統合します。

Vertex AI

ローカル実行を備えたエンタープライズグレードの AI オーケストレーション。

Google Workspace

Docs、Drive、Gmail を AI コンテキストソースとして使用します。


📚 公式ドキュメントと外部リソース

🔵 Model Context Protocol (MCP)

リソース

リンク

🏠 MCP 公式ウェブサイト

modelcontextprotocol.io

📖 MCP イントロダクション

modelcontextprotocol.io/introduction

📖 MCP クイックスタートガイド

modelcontextprotocol.io/quickstart

📖 MCP 仕様

spec.modelcontextprotocol.io

🐍 Python MCP SDK(公式)

github.com/modelcontextprotocol/python-sdk

📦 PyPI の MCP

pypi.org/project/mcp

🐙 MCP GitHub オーガニゼーション

github.com/modelcontextprotocol

📖 MCP トランスポートリファレンス

modelcontextprotocol.io/docs/concepts/transports

📖 MCP ツールリファレンス

modelcontextprotocol.io/docs/concepts/tools


🟣 Google Antigravity (AGY)

リソース

リンク

🏠 Antigravity ホーム

antigravity.google

📖 Antigravity ドキュメント

antigravity.google/docs

📖 MCP 統合ガイド

antigravity.google/docs/mcp

📖 スキルシステム

antigravity.google/docs/skills

📖 Python SDK

antigravity.google/docs/sdk

📖 フックとプラグイン

antigravity.google/docs/hooks

📖 エージェント権限

antigravity.google/docs/permissions

📖 チェンジログ

antigravity.google/changelog


🔵 Google Gemini & AI API

リソース

リンク

🏠 Google Gemini App

gemini.google.com

📖 Gemini API ドキュメント

ai.google.dev/gemini-api/docs

📖 Gemini API クイックスタート

ai.google.dev/gemini-api/docs/quickstart

📖 Gemini for Google Workspace

workspace.google.com/intl/en/products/gemini

📖 Google AI Studio

aistudio.google.com

📖 接続アプリ(MCP)ヘルプ

support.google.com/gemini?p=lm_custom_mcp_trust

🐙 Google Generative AI GitHub

github.com/google-gemini


☁️ Google Cloud Platform

リソース

リンク

🏠 Google Cloud Console

console.cloud.google.com

📖 Vertex AI ドキュメント

cloud.google.com/vertex-ai/docs

📖 Cloud Run ドキュメント

cloud.google.com/run/docs

📖 Cloud Build ドキュメント

cloud.google.com/build/docs

📖 Google Cloud APIs Explorer

cloud.google.com/apis

📖 AI・機械学習プロダクト

cloud.google.com/products/ai


🐍 Python とコアライブラリ

リソース

リンク

🏠 Python 公式サイト

python.org

📖 Python ドキュメント

docs.python.org/3

📦 PyPI パッケージインデックス

pypi.org

📖 pip ドキュメント

pip.pypa.io/en/stable

📖 asyncio ドキュメント

docs.python.org/3/library/asyncio.html

📖 subprocess ドキュメント

docs.python.org/3/library/subprocess.html


🌐 Web と ASGI フレームワーク

リソース

リンク

🏠 Uvicorn(ASGI サーバー)

uvicorn.org

📖 Uvicorn ドキュメント

uvicorn.org/settings

🏠 Starlette フレームワーク

starlette.io

📖 Starlette ドキュメント

starlette.io/applications

📖 Starlette ルーティング

starlette.io/routing

📖 CORS ミドルウェア

starlette.io/middleware/#corsmiddleware

🏠 FastAPI

fastapi.tiangolo.com

📖 FastAPI ドキュメント

fastapi.tiangolo.com/tutorial


🔒 トンネリングと安全な公開

リソース

リンク

🏠 ngrok 公式サイト

ngrok.com

📖 ngrok ドキュメント

ngrok.com/docs

📖 ngrok HTTP トンネル

ngrok.com/docs/http

📦 pyngrok(Python SDK)

pypi.org/project/pyngrok

📖 pyngrok ドキュメント

pyngrok.readthedocs.io

🏠 Cloudflare Tunnel

cloudflare.com/products/tunnel

📖 Cloudflare Tunnel ドキュメント

developers.cloudflare.com/cloudflare-one/connections/connect-networks


📡 JSON-RPC と SSE 仕様

リソース

リンク

📖 JSON-RPC 2.0 仕様

jsonrpc.org/specification

📖 Server-Sent Events(SSE)— MDN

developer.mozilla.org/en-US/docs/Web/API/Server-sent_events

📖 HTTP ステータスコード — MDN

developer.mozilla.org/en-US/docs/Web/HTTP/Status


🔧 開発ツール

リソース

リンク

🏠 Git

git-scm.com

📖 Git ドキュメント

git-scm.com/doc

🏠 GitHub

github.com

📖 GitHub CLI(gh)

cli.github.com

🏠 Python IDLE

docs.python.org/3/library/idle.html

📖 pytest テストフレームワーク

docs.pytest.org

📖 unittest(組み込み)

docs.python.org/3/library/unittest.html


🚀 クイックスタート

前提条件

Python ngrok Git

ステップ 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 に接続する

  1. gemini.google.com を開く

  2. 設定 → カスタム接続アプリ に移動

  3. https://xxxx.ngrok-free.dev/mcp を貼り付ける

  4. 権限を承認 → 保存 をクリック

  5. 任意のチャットで @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 エコシステムで構築。オープンスタンダードで動作。

Gemini Cloud MCP Python ngrok GitHub

このリポジトリが役に立ったら ⭐ を付けてください! | 🍴 フォーク してチーム用にカスタマイズ

🐛 問題を報告 · 💬 ディスカッション · 🤝 コントリビュート

A
license - permissive license
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    49
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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
  • A
    license
    Not graded
    quality
    C
    maintenance
    A unified context layer that connects your local data — repositories, documents, remote machines, and notes — to LLM interfaces through the Model Context Protocol (MCP).
    3
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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