Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/googlecolab/colab-mcp/llms.txt

Use this file to discover all available pages before exploring further.

Colab MCP lets your local AI agent — Claude Code, Gemini CLI, Windsurf, or any MCP-compatible client — read and edit Google Colab notebooks running in your browser. The server runs locally, opens a Colab session on demand, and proxies all notebook tool calls over a secure WebSocket connection.

Quickstart

Install Colab MCP and connect your first agent to a Colab notebook in minutes.

Supported Clients

See which MCP clients work with Colab MCP and how to configure each one.

How It Works

Understand the WebSocket proxy architecture that connects local agents to the Colab browser session.

API Reference

Explore the MCP tools, server classes, and middleware exposed by Colab MCP.

Get up and running

1

Install uv

Colab MCP requires uv, the fast Python package manager. Install it with pip if you haven’t already.
pip install uv
2

Add Colab MCP to your MCP client config

Add the following entry to your MCP client’s configuration file (e.g. mcp.json):
mcp.json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": ["git+https://github.com/googlecolab/colab-mcp"],
      "timeout": 30000
    }
  }
}
3

Ask your agent to open a Colab connection

In your agent, invoke the open_colab_browser_connection tool. Colab MCP will open a Colab scratch notebook in your browser and wait for it to connect.
4

Start working

Once the browser connects, your agent has full access to notebook editing tools. You can now ask it to run cells, read outputs, and modify notebook content.

Key features

Zero-install for end users

Run directly from GitHub via uvx — no local clone or package install required.

Secure by default

WebSocket connections are protected by a one-time URL-safe token and origin validation against colab.google.com.

Dynamic tool discovery

Notebook tools appear and disappear automatically as the Colab session connects or disconnects, using MCP’s notifications/tools/list_changed.

Single-session exclusivity

Only one Colab tab can be connected at a time, preventing conflicting tool calls from multiple browser windows.

Build docs developers (and LLMs) love