Google Colab

v1.0.0Data Science & MLstable

Local-first MCP server for controlling Google Colab as a development, shell, file, and training runtime, with tools for notebook editing, GPU acceleration, and file transfer.

colabmcpai-integration
Share:
632
Stars
0
Downloads
0
Weekly
0/5

What is Google Colab?

Google Colab is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to local-first mcp server for controlling google colab as a development, shell, file, and training runtime, with tools for notebook editing, gpu acceleration, and file transfer.

Local-first MCP server for controlling Google Colab as a development, shell, file, and training runtime, with tools for notebook editing, GPU acceleration, and file transfer.

This server falls under the Data Science & ML and Cloud Services categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Local-first MCP server for controlling Google Colab as a dev

Use Cases

Control Google Colab as a development, shell, and GPU training runtime. Edit notebooks and transfer files with AI assistance. Leverage cloud GPU acceleration for machine learning tasks.
404F0X

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx colab

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Google Colab

colab-mcp is a local-first MCP server that gives AI assistants full programmatic control over Google Colab notebooks running in a browser. It connects to Colab via Chrome DevTools Protocol through a dedicated Microsoft Edge browser profile, exposing tools for managing runtimes and GPU accelerators, running shell commands and background training jobs, editing and executing notebook cells, transferring files between local and Colab environments, and monitoring GPU usage in real time. Data scientists and ML engineers use it to orchestrate training runs, automate notebook workflows, and leverage free cloud GPUs through natural language commands.

Prerequisites

  • Python 3.9 or later with uv package manager installed
  • Microsoft Edge browser installed (used for the dedicated Colab session)
  • A Google account with access to Google Colab
  • The colab-mcp repository cloned locally
  • An MCP-compatible AI client such as Claude Desktop or Claude Code
1

Clone the repository and install dependencies

Clone the better_colab_MCP repository and use uv to install the project and its dependencies.

git clone https://github.com/404F0X/better_colab_MCP.git
cd better_colab_MCP
uv sync --dev
2

Configure environment variables

Set the Edge browser path and debugging port. The defaults work for most macOS and Linux setups where Edge is installed in a standard location.

export COLAB_MCP_EDGE_CDP_PORT=9333
export COLAB_MCP_EDGE_URL_CONTAINS=colab.research.google.com
export COLAB_MCP_EDGE_PROFILE=~/.codex/edge-colab-mcp-profile
3

Add colab-mcp to your MCP client configuration

Register the server in claude_desktop_config.json, pointing to the cloned project directory. The startup timeout is set high because Edge and Colab take time to initialise.

{
  "mcpServers": {
    "colab": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/better_colab_MCP", "colab-mcp"],
      "startup_timeout_sec": 120,
      "env": {
        "COLAB_MCP_EDGE_CDP_PORT": "9333",
        "COLAB_MCP_EDGE_URL_CONTAINS": "colab.research.google.com"
      }
    }
  }
}
4

Open a Colab notebook in the managed Edge profile

Ask Claude to open the browser connection. This launches the dedicated Edge profile and navigates to Colab, ready for runtime control.

5

Connect a GPU runtime and start working

Use the connect_runtime tool to attach a runtime, then set the accelerator type and verify GPU availability before running code.

Google Colab Examples

Client configuration

claude_desktop_config.json entry for colab-mcp using uv to run the server from a local clone.

{
  "mcpServers": {
    "colab": {
      "command": "uv",
      "args": ["run", "--directory", "/Users/you/better_colab_MCP", "colab-mcp"],
      "startup_timeout_sec": 120,
      "env": {
        "COLAB_MCP_EDGE_CDP_PORT": "9333",
        "COLAB_MCP_EDGE_URL_CONTAINS": "colab.research.google.com",
        "COLAB_MCP_EDGE_PROFILE": "/Users/you/.codex/edge-colab-mcp-profile"
      }
    }
  }
}

Prompts to try

End-to-end training workflow prompts that colab-mcp can execute in Google Colab.

- "Open a Colab connection, set the runtime to T4 GPU, and connect to it"
- "Upload my local train.py script to /content/ and start it as a background job named 'training'"
- "Check GPU memory usage and show the current resource utilisation snapshot"
- "Add a new code cell after cell 3 with code to install torch and transformers, then run it"
- "Download the trained model checkpoint from /content/model.pt to my local Downloads folder"

Troubleshooting Google Colab

Edge browser does not launch or CDP port is not reachable

Confirm Microsoft Edge is installed at the auto-detected path. If it is in a non-standard location, set COLAB_MCP_EDGE_PATH to the full executable path. Also ensure COLAB_MCP_EDGE_CDP_PORT is not blocked by a firewall.

connect_runtime times out without attaching a runtime

Google Colab can take 2-3 minutes to provision a GPU runtime. Increase the waitSeconds parameter in connect_runtime (e.g. waitSeconds=300) and ensure you have available compute units in your Colab account.

File uploads fail or the uploaded file is not found at the expected path

Colab's /content/ directory is ephemeral — it resets when the runtime restarts. Always re-upload files after a runtime restart, and use download_file_to_local to retrieve important outputs before shutting down.

Frequently Asked Questions about Google Colab

What is Google Colab?

Google Colab is a Model Context Protocol (MCP) server that local-first mcp server for controlling google colab as a development, shell, file, and training runtime, with tools for notebook editing, gpu acceleration, and file transfer. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Google Colab?

Follow the installation instructions on the Google Colab GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Google Colab?

Google Colab works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Google Colab free to use?

Yes, Google Colab is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "colab": { "command": "npx", "args": ["-y", "colab"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Google Colab?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides