Metadata-Version: 2.5
Name: supergravity-mcp
Version: 0.1.1
Summary: Bring your paid web AI subscription perks (Google AI Ultra: Colab Pro+, Flow, Flow Music, Whisk, NotebookLM, Gemini Deep Research) into Antigravity, Claude Code, Gemini CLI, and OpenAI Codex via one unified MCP server and shared skills.
Project-URL: Homepage, https://github.com/IMLIULIAN/supergravity
Project-URL: Repository, https://github.com/IMLIULIAN/supergravity
Project-URL: Issues, https://github.com/IMLIULIAN/supergravity/issues
Author: B站IM榴莲 (IMLIULIAN)
License: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: agent-plugin,antigravity,claude-code,codex,deep-research,gemini-cli,google-ai-ultra,google-colab,google-flow,mcp,notebooklm,supergravity,whisk,zerozonex
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: mcp>=1.2.0
Requires-Dist: playwright>=1.49.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.IMLIULIAN/supergravity -->
<p align="right">
  <a href="README.zh.md">简体中文</a> | <strong>English</strong>
</p>

# Supergravity

<p align="center">
  <img src="assets/logo.svg" alt="Supergravity logo" width="96" height="96" />
</p>

> **by ZeroZoneX · Bring your paid web AI subscription perks into your coding agent via one unified MCP server, shared skills, and credit-safety guardrails.**  
> Author: **IMLIULIAN (B站IM榴莲)** · Apache-2.0 License

Supergravity turns web-only subscription benefits (starting with **Google AI Ultra**) into clean, callable tools across **Antigravity**, **Claude Code**, **Gemini CLI**, and **OpenAI Codex**.

---

## Included Providers (v0.1 — Google AI Ultra Suite)

| Provider | Web Surface | What Your Agent Can Do | Built-In Safety Guard |
| :--- | :--- | :--- | :--- |
| **Colab Pro+** | `colab.research.google.com` + `colab-mcp` | Run Python/GPU/TPU code headless (Chrome 142+ `local-network-access` ready), inspect active runtimes, terminate all sessions | Auto-terminates temp sessions + mandatory `colab_disconnect_all` guardrail & optional `Stop` hook |
| **Google Flow & Flow Music** | `flow.google.com`, `www.flowmusic.app` | Video, image, and music generation + media download + live UI inspection | Defaults to `submit=False` dry-run + exclusive PID job lock |
| **Google Whisk & Animate** | `labs.google/fx/tools/whisk` | Subject / Scene / Style multi-image remix + 8s Whisk Animate image-to-video | Defaults to `submit=False` dry-run + externalized selectors |
| **NotebookLM Ultra** | `notebook.google.com` + `nlm` CLI | Citation-grounded Q&A, source ingestion, Deep Research, Studio artifacts (Audio/Video/Slides/Reports) | Blocks unattended interactive `nlm login`; uses encrypted keychain cookies |
| **Gemini Web Deep Research** | `gemini.google.com` | Run multi-source web Deep Research (`--query-file` & `--resume-url` supported) and export clean Markdown reports locally | Defaults to `submit=False` dry-run + plan auto-start toggle |

---

## Quick Start (3 Commands)

Prerequisites: Python 3.11+ (managed automatically by [`uv`](https://docs.astral.sh/uv/)), Google Chrome / Chromium.

```bash
# 1. Install Supergravity CLI + unified MCP server in an isolated tool environment
# From PyPI (recommended):
uv tool install supergravity-mcp
# Or directly from GitHub:
# uv tool install git+https://github.com/IMLIULIAN/supergravity.git
# If `supergravity` is not yet on your PATH, run `uv tool update-shell` and reopen your terminal.

# (Optional) Also install upstream helpers for Colab Pro+ & NotebookLM:
supergravity install --install-extras

# 2. Auto-detect and register Supergravity in Antigravity / Claude Code / Gemini CLI / Codex
supergravity install

# 3. Sign in once inside an isolated Chrome profile, then verify everything
supergravity login
supergravity doctor
```

> **Quick stdio MCP config (`uvx`)**: Any standard MCP client (Cursor, Windsurf, Claude Desktop, Cline, etc.) can also run the server directly with `"command": "uvx", "args": ["supergravity-mcp"]`.

> **Windows / macOS / Linux**: Everything lives in `~/.supergravity/` by default (no hardcoded paths, no credentials in your project directories). You can switch accounts anytime with `--profile work` or `SUPERGRAVITY_PROFILE_DIR`.

---

## Native Multi-Agent Installation

One repository ships native manifests for all four major agent ecosystems — sharing a single `skills/` tree and a single `supergravity-mcp` stdio server:

- **Antigravity**: Run `supergravity install --target antigravity` (installs into `~/.gemini/config/plugins/supergravity/` with `plugin.json`, `mcp_config.json`, `rules/AGENTS.md`, `hooks.json`, and `skills/`). Toggle live from Customizations UI.
- **Claude Code**:
  - Via installer: `supergravity install --target claude`
  - Or native marketplace directly from GitHub:
    ```text
    /plugin marketplace add IMLIULIAN/supergravity
    /plugin install supergravity@supergravity
    ```
- **Gemini CLI**:
  - Via installer: `supergravity install --target gemini`
  - Or native extension install:
    ```bash
    gemini extensions install https://github.com/IMLIULIAN/supergravity
    ```
- **OpenAI Codex**:
  - Run `supergravity install --target codex` — copies `skills/` (with `agents/openai.yaml`) to `~/.agents/skills/` and appends `[mcp_servers.supergravity]` to `~/.codex/config.toml` (creating a backup first).

---

## CLI & MCP Reference

### CLI Highlights

```bash
supergravity status                                       # Config + CDP readiness
supergravity doctor [--live]                              # Full health check (Chrome, tools, auth, 4 agents)
supergravity login                                        # Interactive isolated Chrome login + NotebookLM cookie sync
supergravity colab run --code "print(1+1)"                # Run code on Colab Pro+ (auto-cleans temp runtime)
supergravity colab disconnect-all                         # Terminate all active Colab runtimes
supergravity flow inspect --target flow                   # Dump live Flow buttons/inputs/credits
supergravity flow video --prompt "..."                    # Dry-run prepare (--submit to generate)
supergravity whisk image --prompt "..."                   # Dry-run prepare (--submit to generate)
supergravity research run --query-file ./q.txt --submit   # Run Gemini Deep Research & export Markdown (--resume-url to resume)
supergravity notebooklm check                             # Verify NotebookLM cookies without opening login
```

### Unified MCP Tools (`supergravity-mcp`)

- **Core**: `supergravity_status`, `supergravity_inspect_ui`
- **Flow & Flow Music**: `flow_generate_video`, `flow_generate_image`, `flowmusic_generate`, `flow_download_latest`
- **Whisk**: `whisk_generate_image`, `whisk_animate`
- **Gemini Research**: `gemini_deep_research`
- **Colab Pro+**: `colab_run_code`, `colab_list_sessions`, `colab_disconnect_all`
- **NotebookLM**: `notebooklm_status`, `notebooklm_list`, `notebooklm_create`, `notebooklm_add_source`, `notebooklm_query`, `notebooklm_research_start`, `notebooklm_studio_status`, `notebooklm_download`, `notebooklm_run_cli`

---

## Handling Web UI Changes Without Code Edits

All DOM selectors live in [`src/supergravity/core/selectors.yaml`](src/supergravity/core/selectors.yaml). If a web app changes a button label:

1. Run `supergravity <flow|whisk|research> inspect` to view live buttons and inputs.
2. Put only the changed key(s) in `~/.supergravity/selectors.yaml` — Supergravity deep-merges your overrides automatically.

---

## Extending Supergravity to Other Web Subscriptions

Subclass `BaseWebProvider` in `src/supergravity/core/provider_base.py` to inherit isolated Chrome CDP sessions, CAPTCHA/login circuit breakers, PID locking, live control inspection, and `blob:`/HTTP media downloads — then add a matching `skills/<provider>/SKILL.md`.

---

## Privacy, Security & Terms Notice

1. **Local-only session isolation**: Cookies, Chrome profiles, logs, and outputs stay strictly on your local machine under `~/.supergravity/`. Supergravity never transmits credentials to third parties.
2. **No anti-bot or CAPTCHA bypass**: Whenever a site redirects to sign-in, displays onboarding consent, or triggers a CAPTCHA/human verification check, Supergravity stops immediately and hands control back to you via `supergravity login`.
3. **Terms of Service**: `colab-mcp` is Google's official open-source MCP server; browser-driven automation for Flow, Whisk, NotebookLM, and Gemini Web is unofficial. Use only with your own authorized subscription and review applicable service terms before enabling automated runs.

## Documentation & Community

- [Changelog](CHANGELOG.md)
- [Contributing Guide](CONTRIBUTING.md)
- [Security Policy](SECURITY.md)
- [Third-Party Notice](NOTICE)

## License

[Apache-2.0](LICENSE)
