gcolab_mcp_web_mcp
Provides tools for executing Python and shell commands on Google Colab's cloud GPUs, managing notebook cells, and monitoring execution status via a web dashboard and REST API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gcolab_mcp_web_mcprun nvidia-smi on my Colab GPU"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Colab MCP Bridge
A persistent web application and agent execution bridge for Google Colab Model Context Protocol (MCP).
Why this exists
Normally, executing code through standard MCP scripts starts a new server process every run, causing Google Colab to open a brand-new browser tab on every single command.
gcolab_mcp_web_mcp solves this:
It runs a single persistent background daemon that pairs with your Google Colab tab once.
You can execute unlimited commands, scripts, machine learning workloads, or shell commands with zero new tabs opened.
Exposes both a sleek dark-mode Web Dashboard and a REST/JSON API for AI agents.
Related MCP server: colab-mcp
Quick Start
1. Launch the Application
You can now start it with any of these simple commands (no flags needed):
./start.shor
python3 run.pyor
uv run run.py(Dependencies are declared inside run.py and are automatically handled on the fly).
2. Open the Dashboard
Navigate to http://localhost:8000 in your browser.
3. Connect Colab Once
Click "Connect Colab Tab" (or open the provided URL in your browser).
Your Colab tab will display: "Connected to local Colab MCP server".
The dashboard status indicator turns 🟢 Connected to Colab.
Features
One-Click Cloud Code Execution:
Write Python or shell commands (e.g.,
!nvidia-smi,!pip install) and run them directly on Colab's cloud GPU.Shortcut:
Ctrl + Enterto execute.
Real-time Terminal Output:
Live stdout, stderr, execution timer, copy output, and plot support.
Notebook Cell Manager:
Inspect all existing cells in your Google Colab notebook, run specific cells, or delete cells directly from the dashboard.
W3C WebMCP Standard Support (Browser Native):
Exposes browser tools via
navigator.modelContext.registerTool:execute_python_on_colab: Runs code remotely on the Colab kernel.get_colab_notebook_cells: Fetches notebook cells.check_colab_status: Checks connection state.
Annotated Declarative Form (
toolname="executeColabCode").Compliant HTTP headers (
Permissions-Policy: tools=(self),Origin-Agent-Cluster: ?1).Compatible with Chrome Canary (
chrome://flags/#enable-webmcp-testing) and includes an automatic in-page polyfill and tester.
AI Agent Integration API (REST):
External agents (or scripts) can send code to Colab via a simple HTTP request:
curl -X POST http://localhost:8000/api/execute \
-H "Content-Type: application/json" \
-d '{"code": "import torch; print(torch.cuda.is_available())"}'import requests
response = requests.post("http://localhost:8000/api/execute", json={
"code": "!nvidia-smi"
})
print(response.json()["output"])This server cannot be deployed
Maintenance
Related MCP Connectors
Remote shell and detached long-running jobs on your own machines — no SSH, open ports or VPN.
On-demand GPU nodes for agents: create nodes, run commands, and submit jobs, billed by the minute.
Persistent Linux microVMs for agents: root, internet, sub-second resume and a public URL.
A persistent Linux computer for your AI: what it installs and writes survives the session.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables users to control and interact with Google Colab instances via a reverse proxy. It supports executing shell commands, running persistent Python code, and monitoring system resources like CPU, GPU, and RAM.-
- AlicenseBqualityDmaintenanceLocal-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.598Apache 2.0
- AlicenseAqualityCmaintenanceEnables MCP-compatible AI assistants to run Python code on Google Colab GPU/TPU runtimes, supporting accelerators like T4, A100, H100, with background execution and Google Drive integration.103MIT
- AlicenseDqualityBmaintenanceEnables agents to control Google Colab notebooks through a secure, headless WebSocket architecture, allowing cell creation, editing, execution, and inspection without browser automation.133Apache 2.0