colab-mcp

Author, edit, and execute Google Colab notebook cells through a browser MCP bridge.

1|Updated Oct 25, 2020
One-click install
npx skills add https://github.com/bfairkun/dotfiles --skill colab-mcp-bfairkun
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: colab-mcp
Source: https://github.com/bfairkun/dotfiles/tree/main/agents/.agents/skills/colab-mcp
Command: npx skills add https://github.com/bfairkun/dotfiles --skill colab-mcp-bfairkun

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It lets an AI agent work directly inside a live Google Colab notebook in the user's Chrome browser, so the user can watch cells being written and executed in real time instead of receiving detached code snippets. ## Core Features & Use Cases - Live Cell Manipulation: Add, update, delete, move, and run code or markdown cells in a Colab notebook via MCP tools like add_code_cell, update_cell, and run_code_cell. - Shared Kernel Execution: Run Python, R, or Julia cells against a persistent kernel with pre-installed data science packages (pandas, scikit-learn, torch, jax, and more). - Drive Notebook Support: Follow in-tab navigation to open and edit existing notebooks stored in Google Drive after connecting. - Use Case: Ask the agent to build an exploratory data analysis in Colab; it opens a notebook in your Chrome tab, writes cells, runs them, and you watch plots and tables render natively. ## Quick Start Connect to a live Colab notebook in my browser and create a notebook that loads a CSV and plots its distributions.

Frequently Asked Questions about colab-mcp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect an AI agent to a live Google Colab notebook?▼

Call the open_colab_browser_connection MCP tool, which opens a Colab tab in Chrome with a proxy token. The user must complete the handshake within 60 seconds, with Chrome already running and signed into Google, or the bridge breaks for the session.

What tools are available for editing Colab cells via MCP?▼

The bridge exposes add_code_cell, add_text_cell, update_cell, delete_cell, move_cell, get_cells, and run_code_cell. These appear dynamically after the WebSocket connection is established with the Colab frontend.

Why does the Colab MCP bridge do nothing when Safari is the default browser?▼

Safari silently blocks the localhost WebSocket from colab.research.google.com under Private Network Access rules. Use a Chromium browser like Chrome, Brave, or Arc, or set the BROWSER environment variable on the MCP entry to spawn Chrome directly.

Can the Colab MCP bridge work on existing Google Drive notebooks?▼

Yes. The entry tool always opens a scratch notebook, but the bridge follows in-tab navigation. Connect first, then use File → Open notebook → Drive in the Colab UI, and subsequent MCP calls operate on that notebook.

What are the limitations of running code through the Colab MCP bridge?▼

run_code_cell blocks until completion, so long-running cells tie up the bridge. There is no state-introspection tool, the free tier has 2 CPUs and no GPU, and changing runtime type requires manual action in the Colab UI.