# ColabDeck (colab-mcp)

> Operate Google Colab GPUs from Antigravity with live billing honesty, dual-layer cost guards, and sub-millisecond panel updates. Request `Accept: text/markdown` for content negotiation or fetch `https://colabdeck.eatingdream.dev/index.md` directly.

## Agent Endpoints

- [Search for Agents](https://colabdeck.eatingdream.dev/.well-known/search?q={query}): Site-wide Markdown search supporting `GET ?q=...` and HTTP `QUERY` (`text/plain` or JSON `{"q":"..."}`).
- [Markdown Page Mirror](https://colabdeck.eatingdream.dev/index.md): Clean Markdown mirror with YAML frontmatter.
- [Full Technical Spec](https://colabdeck.eatingdream.dev/llms-full.txt): Complete self-contained technical specification, operational matrix, MCP tools, and CLI reference.
- [Agent Skills Discovery](https://colabdeck.eatingdream.dev/.well-known/agent-skills/index.json): Machine-readable Agent Skills Discovery v0.2.0 index with SHA-256 digests.
- [XML Sitemap](https://colabdeck.eatingdream.dev/sitemap.xml): Canonical URL index.
- [Atom Feed](https://colabdeck.eatingdream.dev/feed.xml): Machine-readable Atom 1.0 feed.

## Metadata

- Official Site: https://colabdeck.eatingdream.dev/
- Suite Hub: https://eatingdream.dev/
- Repository: https://github.com/eatingDream-antigravity-plugins/colab-mcp
- AI Guide: https://github.com/eatingDream-antigravity-plugins/colab-mcp/blob/main/docs/ai-guide.md
- Upstream llms.txt: https://github.com/eatingDream-antigravity-plugins/colab-mcp/blob/main/llms.txt
- Platform: macOS · Linux · Colab CLI
- License: MIT

## Quick Install

```sh
git clone https://github.com/eatingDream-antigravity-plugins/colab-mcp.git && cd colab-mcp && ./scripts/install.sh
```

## Portable Agent Skill

```sh
npx skills add eatingDream-antigravity-plugins/colab-mcp
```

## MCP Tools

- `colab_panel`: Returns <1 ms SWR cached state and the interactive SEP-1865 panel resource.
- `colab_status`: Returns billing, Compute Units, hardware rates, and active/orphan runtime state.
- `colab_session_action`: Supports provision (T4/L4/G4/A100/H100/TPU + min_vram_mib), cancel_provision, stop, reap_orphan, restart_kernel, and url.
- `colab_tunnel_action`: Manages exclusive 127.0.0.1 SSH tunnels (open, close, dismiss, list) without touching ~/.ssh/config.
- `colab_deploy_action`: Runs one-click GGUF/llama-cpp deploys, cancel, search_hf, and inspect_hf.
- `colab_app_watchdog`: App-only VM + Host dual watchdog control (arm, extend, cancel).

## Key Capabilities

- **Non-Blocking <1 ms SWR Backend**: Serves cached snapshots immediately over MCP stdio while refreshing Colab usage and active sessions single-flight in the background—keeping the panel instant.
- **Live [?] CLI-History & First-Seen Spend Tracking**: Correlates CLI history and first-seen timestamps to expose browser-started [?] orphan runtimes with live uptime, Compute Unit burn estimates, and one-click reap.
- **VM + Host Dual-Layer Cost Watchdog**: Pairs a detached VM-side watchdog.py (absolute deadline + idle timeout, survives panel close) with cross-account host caps, balance floors, and PendingStop retries.
- **Exclusive 127.0.0.1 SSH Tunnels**: Forwards local loopback ports via colab ssh --proxy-mode without touching ~/.ssh/config, blocking VM port 8080, escaping % tokens, and refusing blind auto-reconnects.
- **Hardware Targeting & One-Click GGUF Deploy**: Provisions T4, L4, G4, A100, H100, or TPU (v5e1/v6e1) with min_vram_mib retries, plus bundled llama-cpp GGUF search, VRAM quantization fit, and live log streaming.
- **ADC & Multi-Account Pinning + Zero-Billing Mock**: Supports Application Default Credentials (ADC) and per-account OAuth isolation with endpoint pinning, plus colab-mcp serve --mock to exercise every flow at $0.

## Safety & Privacy

- Billing honesty: closing a panel or SSH tunnel never stops VM billing—only confirmed stop or reap_orphan ends CU consumption.
- Least-privilege boundaries: MCP calls cannot mutate the colab binary path, plugin scripts run only on the remote VM, and secrets never pass via argv.
- Zero-billing test suite: compile-time and runtime guards block real colab subprocess execution during cargo test.
- Independent OSS project: not affiliated with Google; delegates auth to the official local Colab CLI under your own account ToS.
