Skip to content

Latest commit

Β 

History

7 Commits

Folders and files

Repository files navigation

πŸ”¬ Google Colab Tools for ZCode

Google Colab, inside your AI agent β€” powered by Google's official open-source tools, built independently.

A professional ZCode plugin integrating Google's official colab-mcp browser-bridge MCP server and the google-colab-cli headless CLI β€” provision GPU/TPU runtimes, run code, and manage files on Google Colab without ever leaving your agent.

License Release CI Last Commit Stars Repo Size Platform Python MCP PRs Welcome


πŸ“‘ Table of Contents

πŸ‘ Overview

πŸŒ‰ Browser bridge Pair ZCode with a live Colab notebook open in your browser via Google's official MCP proxy β€” inspect kernel state, run cells, iterate with the agent
⚑ Headless control Provision CPU/GPU/TPU sessions, execute scripts, upload/download artifacts with the official CLI β€” no browser required
🧠 Two skills colab-mcp (pairing flow, dynamic tools, troubleshooting) and colab-cli (full command reference, agent workflows)
πŸ›‘ No redistribution The MCP server is fetched at runtime from Google's official repo β€” this plugin ships configuration and expertise only
🌐 Bilingual skills, English docs Skills are pre-optimized for agent use; all documentation is in English
πŸ§ͺ Validated 15-point repository validator runs locally and in CI on every push

πŸ”„ How It Works

flowchart LR
    subgraph local["πŸ–₯ Your machine"]
        Z["ZCode agent"]
        P["colab-mcp proxy<br/>(uv tool run)"]
        S["colab-cli<br/>(WSL on Windows)"]
    end
    subgraph cloud["☁ Google"]
        B["Colab notebook<br/>in your browser"]
        R["Colab runtime<br/>CPU / GPU / TPU"]
    end
    Z <-- "MCP stdio" --> P
    P <-- "local WebSocket + token" --> B
    Z -- "shell" --> S
    S --> R
    B --> R
Loading

Two independent paths: the MCP proxy pairs ZCode with a notebook you control in the browser, while the CLI provisions raw runtimes for fully automated jobs.

πŸ“ Repository Layout

marketplace.json                       ← ZCode marketplace catalog
LICENSE                                ← Apache-2.0 full text
NOTICE.md                              ← legal notice (non-affiliation, attribution)
CHANGELOG.md                           ← version history
colab/
β”œβ”€β”€ .zcode-plugin/plugin.json          ← plugin manifest (v0.1.1)
β”œβ”€β”€ .mcp.json                          ← official colab-mcp server definition
└── skills/
    β”œβ”€β”€ colab-mcp/SKILL.md             ← browser pairing flow & troubleshooting
    └── colab-cli/SKILL.md             ← headless CLI command reference
scripts/
β”œβ”€β”€ validate.py                        ← 15-point repository validator
└── smoke_colab_mcp.py                 ← MCP handshake smoke test
.github/workflows/validate.yml         ← CI: validates the repo on push & PR

πŸš€ Installation

  1. In ZCode: Plugin Marketplace β†’ Add β†’ Add Plugin Marketplace
  2. Paste the repository URL: https://github.com/movtigroup/Colab-Plugin.git
  3. Install Google Colab Tools from the movti-colab marketplace
  4. Restart ZCode so the MCP server starts fresh

Requirements

Requirement Why Install
uv Runs the MCP server pip install uv
Google account Access to colab.research.google.com β€”
WSL (Windows only) google-colab-cli targets Linux/macOS wsl --install

⚑ Quick Start

Browser pairing β€” select the colab-mcp skill and say:

"Connect me to Colab"

The pairing tool opens Colab in your browser; after you sign in and the notebook connects back over WebSocket, the notebook's tools appear dynamically.

Headless GPU job β€” select the colab-cli skill:

colab new -s trainer --gpu A100          # provision a runtime
colab install -s trainer torch transformers
colab exec -s trainer -f train.py        # run code (contents sent to kernel)
colab download -s trainer checkpoints/model.bin ./model.bin
colab stop -s trainer                    # release the VM

πŸ›  Troubleshooting

Symptom Fix
No Colab tools listed Session not paired β€” invoke open_colab_browser_connection, keep the Colab tab open, and sign in to Google
Server fails to start pip install uv, then restart ZCode
uvx build fails behind a mirror Add --index https://pypi.org/simple to .mcp.json args
Pairing times out Invoke the pairing tool again for a fresh 60-second window
colab-cli on Windows Run inside WSL β€” Windows is not supported by the upstream CLI

❓ FAQ

Is this made by Google?

No. This is an independent integration of Google's official open-source tools β€” see NOTICE.md.

Where does the MCP server come from?

It is fetched at runtime from googlecolab/colab-mcp via uv tool run. Nothing is redistributed here.

Does it cost anything?

The Colab free tier works. GPU/TPU accelerators and high-RAM shapes consume Colab compute points (Pro/Pro+).

Why is the CLI Linux/macOS only?

That is an upstream limitation of google-colab-cli, documented by Google. On Windows, run it inside WSL.

πŸ§ͺ Development

python scripts/validate.py          # 15-point repo validation
python scripts/smoke_colab_mcp.py   # live MCP handshake + tools/list test

CI runs the validator on every push and pull request.

πŸ—Ί Roadmap

  • Plugin foundation: MCP server, pairing and CLI skills, marketplace catalog
  • Professional packaging: license, notice, changelog, CI, validators
  • Tagged releases surfaced in the ZCode marketplace
  • Extra skills: Drive-mount workflows, compute-points monitoring

πŸ“„ License & Notice

Released under the Apache License 2.0. Independent project β€” not affiliated with, endorsed by, or sponsored by Google. Legal details in NOTICE.md, history in CHANGELOG.md.

πŸ™ Acknowledgments

⭐ Star this repo if it saves you a GPU trip to the browser!

Releases

Packages

Contributors

Languages