Google Colab
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.
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
Maintainer
Works with
Installation
Manual Installation
npx colabConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 --devConfigure 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-profileAdd 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"
}
}
}
}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.
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.
Google Colab Alternatives — Similar Data Science & ML Servers
Looking for alternatives to Google Colab? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
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.
Set Up Google Colab in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.