Skip to content

About

An MCP server for interacting with Google Colab

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Colab-MCP (Enhanced Edition)

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.


Enhanced Architecture & Features

This edition resolves two core usability hurdles in the upstream bridge:

1. Dedicated Chrome App Mode (Zero Tab Clutter)

  • 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.

2. Anti-Severing Reconnect Bridge

  • 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.

Supported Clients

This MCP server requires client support for notifications/tools/list_changed and local execution:

  • Claude Desktop & Claude Code
  • Gemini CLI & Antigravity
  • Cursor
  • Windsurf

Setup & Configuration

Prerequisites

  • Python 3.10+
  • uv package manager (pip install uv or via winget install astral-sh.uv)

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "colab-mcp": {
      "command": "uv",
      "args": ["run", "colab-mcp"],
      "cwd": "C:\\Users\\Zachariah\\colab-mcp"
    }
  }
}

Gemini CLI / Antigravity (mcp_config.json)

{
  "mcpServers": {
    "colab-mcp": {
      "command": "uv",
      "args": ["run", "colab-mcp"],
      "cwd": "C:\\Users\\Zachariah\\colab-mcp",
      "timeout": 30000
    }
  }
}

Development & Testing

git clone https://github.com/mjeanhudson-dev/colab-mcp.git
cd colab-mcp
git config core.hooksPath .githooks
uv sync
uv run pytest

License

Licensed under the Apache License, Version 2.0. See LICENSE for details. Original copyright © Google Inc.

About

An MCP server for interacting with Google Colab

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages