Colab Compute MCP
Provides tools to run and manage build/test jobs on pooled Google Colab VMs, sync local workspaces, retrieve artifacts, and monitor VM pool and compute-unit status.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Colab Compute MCP Run the full test suite on a Colab CPU VM and report any failures"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Install in T3 Code with one prompt (paste into any agent):
Install https://github.com/franklinblanco/colab-compute-mcp and configure it as an MCP server for my T3 Code agents (Claude Code, Codex, and Antigravity/Gemini) following its README.Agents keep editing your local worktrees in stock T3 Code (no fork needed) and dispatch test/build commands to warm Google Colab VMs (CPU by default). Multiple agents share the same VM concurrently over one foreground SSH ControlMaster via a private 0600 Unix-socket daemon (~/.colab-compute-mcp/daemon.sock), each in an isolated non-root Linux account.
How it works
flowchart LR
subgraph Local["Local machine (stock T3 Code · local worktrees)"]
C1["Claude Code (stdio MCP)"]
C2["Codex (stdio MCP)"]
C3["Gemini / Antigravity (stdio MCP)"]
D["Shared Pool Daemon (daemon.sock, 0600)"]
C1 & C2 & C3 --> D
end
subgraph Colab["Google Colab VM (CPU default · GPU/TPU optional)"]
M["1 Foreground SSH ControlMaster (zero HTTP 429)"]
J1["Job A (uid 1001 · isolated build/test)"]
J2["Job B (uid 1002 · isolated build/test)"]
M --> J1
M --> J2
end
D -- "tar workspace sync + stdin cmd/env" --> M
J1 & J2 -- "stdout/stderr + validated artifacts" --> DRelated MCP server: colab-fleet
Installation
Requirements: macOS or Linux (or WSL 2 on Windows), Node.js 22+, pnpm, Git, tar, OpenSSH, and flock (Linux).
1. Install and sign in to the Google Colab CLI
uv tool install google-colab-cli # or: pip install google-colab-cli
colab usage # one-time Google sign-in; prints your compute-unit balance2. Clone and build this MCP server
git clone https://github.com/franklinblanco/colab-compute-mcp.git
cd colab-compute-mcp
pnpm install --frozen-lockfile
pnpm run build3. Register colab-compute for your T3 Code agents
Use the absolute paths to node (e.g. which node) and dist/cli.js:
Claude Code (
~/.claude.jsonunder"mcpServers"):"colab-compute": { "type": "stdio", "command": "/path/to/node", "args": ["/path/to/colab-compute-mcp/dist/cli.js"] }Codex (
~/.codex/config.toml):[mcp_servers.colab-compute] command = "/path/to/node" args = ["/path/to/colab-compute-mcp/dist/cli.js"]Gemini / Antigravity (
~/.gemini/config/mcp_config.json, plus~/.t3/userdata/providers/antigravity/*/config/mcp_config.jsonwhen running inside T3 Code):{ "mcpServers": { "colab-compute": { "command": "/path/to/node", "args": ["/path/to/colab-compute-mcp/dist/cli.js"] } } }
Start a new thread and ask your agent to check colab_pool_status.
Windows: Native Windows is not supported (
google-colab-cliis Linux/macOS only and Windows OpenSSH lacksControlMaster). Run inside WSL 2; Windows MCP clients can launch it via"command": "wsl.exe","args": ["--", "node", "/path/in/wsl/colab-compute-mcp/dist/cli.js"].
Google AI Pro & Ultra compute estimates
Paid Google AI plans include monthly Colab Compute Units (CU) automatically on the same Google account (Pro: 200 CU/mo, Ultra: up to 2,000 CU/mo; units expire after 90 days and fall back to free-tier quotas at 0 with no overage billing).
Approximate runtime hours per monthly grant (rates fluctuate slightly with demand; check live rates via colab_pool_status or colab usage):
Hardware profile | Typical specs | Approx. CU/hr | Google AI Pro (200 CU) | Google AI Ultra (2,000 CU) |
| 2 vCPU, ~13 GB RAM | ~0.07 | ~2,850 hrs | ~28,500 hrs |
| 8 vCPU, ~52 GB RAM | ~0.14 | ~1,400 hrs | ~14,200 hrs |
| 15 GB VRAM | ~1.1 – 1.8 | ~110 – 180 hrs | ~1,100 – 1,800 hrs |
| 22 GB VRAM | ~1.5 – 4.8 | ~40 – 130 hrs | ~415 – 1,300 hrs |
| 96 GB VRAM (RTX PRO 6000) | ~8.9 | — | ~225 hrs |
| 40–80 GB VRAM | ~7 – 15 | ~13 – 28 hrs | ~130 – 285 hrs |
| 80 GB VRAM | ~18 | — | ~110 hrs |
| 16–32 GB HBM | ~1.8 / ~4.1 | ~110 / ~48 hrs | ~1,100 / ~485 hrs |
For everyday builds and test suites, cpu and cpu-high-mem barely dent your monthly balance, and idle VMs auto-stop after 10 minutes.
MCP tools
Tool | Purpose |
| Run a build/test command on a pooled Colab VM ( |
| Read status, exit code, stdout/stderr (up to 64 KiB each), and artifacts for a job from the current session. |
| Cancel a queued or running job and free its VM slot immediately. |
| Show active VMs, slot usage, queued jobs, and Colab compute-unit balance. |
| Stop idle VMs (or |
Configuration & security
Environment variable | Default | Notes |
|
| Maximum concurrent Colab VMs in the pool |
|
| Idle VM auto-stop timeout (10 min) |
|
| Concurrent jobs per |
|
| Concurrent jobs per |
|
| Private socket, SSH key, and session state |
Each job runs under a disposable non-root Linux account in
/content/t3-jobs/<jobId>with commands andenvsent over SSH stdin (never argv).Workspace uploads exclude
.gitand.t3(andnode_modules/target/dist/.venvoutside Git); downloaded artifacts reject symlinks, hard links, and path traversal.Pool reconciles orphaned VMs on startup and stops all pool-owned VMs on
SIGTERM/SIGINT.
Verify
pnpm test # unit tests (fake transport)
pnpm run test:live # live 2-client concurrent test on your Colab account (expects 0 active sessions)License: MIT — remote supervisor and pool architecture adapted from T3 Code.
Available Tools
5 toolscolab_cancel_jobADestructiveIdempotent
Cancel one of this client's queued or running Colab jobs.
Inputs: jobId (required).
colab_job_statusBRead-only
Get one of this client's Colab jobs, including its state, exit code, log tails, and artifacts.
Inputs: jobId (required).
colab_pool_statusARead-only
List shared Colab VMs, available slots, queued jobs, and the compute-unit balance.
Inputs: no named parameters.
colab_pool_stopADestructiveIdempotent
Stop idle VMs, optionally by session name. Force can also cancel this client's jobs on selected VMs.
Inputs: force, sessionName.
colab_run_jobA
Build or test on a shared Colab VM. Defaults to CPU, syncing an absolute local workspace, and waiting up to 300 seconds. Async returns a job ID. cwd and artifactPaths are workspace-relative.
Inputs: command (required), cwd, env, mode, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The tools mostly target distinct concepts: pool status/stopping versus job run/status/cancel. There is some overlap because colab_pool_stop can force-cancel this client's jobs on selected VMs, which touches the same operation space as colab_cancel_job, but the descriptions make the intended boundaries reasonably clear.
All names use a consistent colab_ prefix and snake_case, which is readable and predictable. However, the patterns mix resource_action (pool_status, pool_stop, job_status) with action_resource (run_job, cancel_job), so it is not a single uniform verb_noun convention throughout.
Five tools is well-scoped for a Colab compute server: pool visibility/management and job execution lifecycle are covered without excessive surface area. Each tool earns its place and there is no obvious padding.
The set covers the core lifecycle: inspect pool, stop idle VMs, run jobs, check job status, and cancel jobs. Minor gaps exist, such as no explicit tool to list all of the client's jobs or manage artifacts beyond status reporting, but agents can work around these using returned job IDs and status details.
Maintenance
Related MCP Connectors
AI cloud for agents: launch GPUs, run jobs that stop their own billing, schedule runs.
On-demand GPU nodes for agents: create nodes, run commands, and submit jobs, billed by the minute.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
GPU compute for agents: run commands on an L4/A100/H100, watch logs, billed per second.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to autonomously manage Google Colab GPU sessions, submit and monitor training jobs, and debug/fix issues via an encrypted tunnel without requiring a browser tab.MIT
- AlicenseNot gradedqualityDmaintenanceEnables offloading heavy CPU/ML workloads to free Google Colab from any MCP client, with automatic job management and free-tier enforcement.16MIT
- AlicenseBqualityBmaintenanceEnables AI agents to drive Google Colab end to end through Google's official Colab CLI: creating and stopping GPU/TPU runtimes, executing code, editing local notebooks cell by cell, launching long background jobs, and uploading or downloading files and folders. Optionally adds opt-in Google Drive tools for signing in, managing project folders, and creating, editing or trashing notebooks, plus mounting Drive on the VM for large datasets.4261 PyPI5Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to rent disposable cloud dev environments with a terminal, real browser, repo checkout, git gateway, and live view, so they can build, test, run dev servers, inspect pages, and push branches while keeping keys off the VM.1Apache 2.0