# ColabDeck (colab-mcp): Complete Technical Specification

> Source: https://colabdeck.eatingdream.dev/ | Directory: https://colabdeck.eatingdream.dev/llms.txt | Search: https://colabdeck.eatingdream.dev/.well-known/search?q={query}

## Overview

- **Category**: Colab GPU runtime and cost guard / Colab GPU 调度与成本护卫
- **Platform**: macOS, Linux and Google Colab CLI
- **Canonical URL**: https://colabdeck.eatingdream.dev/
- **Repository**: https://github.com/eatingDream-antigravity-plugins/ColabDeck
- **Releases**: https://github.com/eatingDream-antigravity-plugins/ColabDeck/releases
- **AI Guide**: https://github.com/eatingDream-antigravity-plugins/ColabDeck/blob/main/docs/ai-guide.md
- **License**: MIT

**Summary (EN)**: See what each runtime has cost so far, and let ColabDeck stop the ones you forgot before they eat your units.
**简介 (ZH)**: 看清每个运行时花了多少，忘关的交给 ColabDeck 自动停掉，别再白烧计算单元。

**What It Is**: A native Rust MCP server and live interactive control panel built on the official Google Colab CLI, adding fast cached reads, dual-layer stop guarantees, exclusive local SSH tunnels, and declarative VM deploys.
**定位说明**: 基于官方 Google Colab CLI 构建的原生 Rust MCP 服务与实时控制面板，提供高速缓存读取、双层停机止损保障、独占本机 SSH 隧道与声明式云端部署。

**What It Is Not**: Not a browser scraper, credential harvester, or quota bypass. It delegates auth strictly to your local colab CLI and never hides active VM billing.
**边界声明**: 不是浏览器爬虫、凭证抓取器或配额绕过工具。认证全权交由本地官方 colab CLI 处理，并始终如实披露计费状态。

## Quick Start

Install native binary and Antigravity plugin:

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

Add portable Agent Skill (`agentskills.io`):

```sh
npx skills add eatingDream-antigravity-plugins/ColabDeck
```

## MCP Tools

- `colab_panel`: Returns fast cached state and the interactive panel resource while refreshing usage in the background.
- `colab_status`: Returns live Colab balance, burn rate, hardware rates, and active or browser-started [?] 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 and Host dual watchdog control (arm, extend, cancel).

## CLI Subcommands

- `colab-mcp serve [--mock] [--data-dir <path>] [--panel-html <path>]`
- `colab-mcp doctor [--json]`

## How It Works

### Runtimes you started anywhere (在哪开的运行时都能看到)

Sessions launched from the browser or the colab CLI show up here too, using live Colab rates with CLI history or first-seen times to track spend.

从浏览器或 colab 命令行启动的会话也会出现在这里，结合 Colab 实时速率与本地历史或首次发现时间，算清目前花了多少。

### Forgotten runtimes get stopped (忘关的运行时会被停掉)

One watchdog runs on the Colab VM and another on your Mac. If a runtime sits idle past your limit, it gets shut down even when the notebook tab is long gone.

一个看门程序跑在 Colab 虚拟机上，另一个跑在你的 Mac 上。运行时闲置超过你设的时间就会被关掉，哪怕笔记本页面早就关了。

### Tunnels and models without the fiddling (隧道和模型，不用再折腾)

Open and close SSH tunnels from the sidebar, and put a GGUF model on a runtime in a few steps instead of a page of copied shell commands.

在侧边栏里开关 SSH 隧道。把 GGUF 模型部署到运行时上也只要几步，不用再复制粘贴一大段命令。

## Dual-Layer Cost Guard and Billing Boundaries

| Guard Layer | Enforcement Mechanism | Failure and Edge Behavior |
| --- | --- | --- |
| VM Watchdog | Detached watchdog.py enforcing absolute deadline and idle timeout | Survives laptop sleep, SSH drop, or Antigravity exit |
| Host Policy Guard | Cross-account runtime ceiling, spend cap, and CU balance floor | Failed stops stay tracked as PendingStop with retries |
| [?] Runtime Tracker | Live Colab rate combined with CLI history or first-seen observation | Surfaces unmanaged browser billing with one-click reap |
| SSH Tunnel Safety | 127.0.0.1-only forwarding; ~/.ssh/config stays untouched | Rejects VM port 8080 and refuses silent auto-recreate |

## Safety and Privacy Boundaries

1. Billing honesty: closing a panel or SSH tunnel never stops VM billing; only confirmed stop or reap_orphan ends CU consumption.
   - 中文：计费透明：关闭面板或隧道不会停止云端计费，仅当 stop 或 reap_orphan 确认成功才结束扣费。
2. 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.
   - 中文：最小权限边界：MCP 调用无法篡改 colab 可执行路径，部署脚本仅在远端 VM 运行，密钥绝不经由命令行参数传递。
3. Zero-billing test suite: compile-time and runtime guards block real colab subprocess execution during cargo test.
   - 中文：零计费测试护栏：编译期与运行期双保险拦截测试阶段拉起真实 colab 子进程，杜绝误扣 Compute Units。
4. Independent OSS project: not affiliated with Google; delegates auth to the official local Colab CLI under your own account ToS.
   - 中文：独立开源项目：与 Google 无隶属关系，所有鉴权严格委托本地官方 Colab CLI，遵循用户自身账号服务条款。

## Suite Navigation

- **eatingDream Hub**: https://eatingdream.dev/
- **ContextRadar** (context-radar-mcp): https://contextradar.eatingdream.dev/ (Shows which turns are filling your context window and why the prompt cache went cold, so you can wrap up before things slow down.)
- **ClamGuard** (mac-clamshell-mcp): https://clamguard.eatingdream.dev/ (Watches lid state, fans and heat on your MacBook without sudo, throttles heavy builds when closed, and restores brightness when you open it.)
- **RemoteCast** (chrome-stream-mcp): https://remotecast.eatingdream.dev/ (Puts Chrome right in your sidebar over loopback or your own SSH tunnel, so you can watch and click through it without leaving the editor.)
