An enhanced MCP server for bridging your local AI agent to a live Google Colab session in the browser.
Note
Attribution & Origin: This repository is a fork of the official googlecolab/colab-mcp created by the Google Colab team (Apache-2.0 License). Full credit goes to the upstream Google Colab developers for the foundational architecture.
This edition resolves two core usability hurdles in the upstream bridge:
- Problem: Upstream opens a standard browser tab via
webbrowser.open_new(), mixing the active Colab bridge with hundreds of everyday browsing tabs and risking accidental closure or memory tab-discarding. - Enhancement: Automatically detects and launches Google Chrome in standalone application mode (
--app=...) with a dedicated isolated user profile (ColabAppProfile). It appears on your taskbar as a standalone utility window, immune to standard browser tab sweeps.
- Problem: When a Colab browser tab was closed, refreshed, or background-throttled, upstream immediately sent a fatal exception down the MCP stream and purged all notebook tools (
add_code_cell,run_code_cell, etc.) from the agent's tool registry. - Enhancement: Keeps the MCP memory streams open across temporary disconnects and page refreshes. Once connected, registered tools remain stable in the LLM's conversation context. If a notebook tool is invoked during a reconnect window, the bridge pauses and awaits the reconnection rather than failing the prompt.
This MCP server requires client support for notifications/tools/list_changed and local execution:
- Claude Desktop & Claude Code
- Gemini CLI & Antigravity
- Cursor
- Windsurf
- Python 3.10+
uvpackage manager (pip install uvor viawinget install astral-sh.uv)
{
"mcpServers": {
"colab-mcp": {
"command": "uv",
"args": ["run", "colab-mcp"],
"cwd": "C:\\Users\\Zachariah\\colab-mcp"
}
}
}{
"mcpServers": {
"colab-mcp": {
"command": "uv",
"args": ["run", "colab-mcp"],
"cwd": "C:\\Users\\Zachariah\\colab-mcp",
"timeout": 30000
}
}
}git clone https://github.com/mjeanhudson-dev/colab-mcp.git
cd colab-mcp
git config core.hooksPath .githooks
uv sync
uv run pytestLicensed under the Apache License, Version 2.0. See LICENSE for details. Original copyright © Google Inc.