colab-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COLAB_MCP_EDGE_PATH | No | Override for the Edge executable path. Auto-detected if not set. | |
| COLAB_MCP_EDGE_PROFILE | No | Override for the Edge profile path. Default is ~/.codex/edge-colab-mcp-profile. | |
| COLAB_MCP_EDGE_CDP_PORT | No | Override for the CDP port. Default is 9333. | |
| COLAB_MCP_EDGE_URL_CONTAINS | No | URL substring to filter for the Colab frontend. Example: colab.research.google.com |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tasks | {
"list": {},
"cancel": {},
"requests": {
"tools": {
"call": {}
},
"prompts": {
"get": {}
},
"resources": {
"read": {}
}
}
} |
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| open_colab_browser_connectionB | Opens a connection to a Google Colab browser session and unlocks notebook editing tools. Returns a boolean representing whether the connection attempt succeeded |
| add_code_cellA | Inserts a code type cell at the provided index and shifts existing cells. The resulting new cell id is returned. |
| add_text_cellA | Inserts a text type cell at the provided index and shifts existing cells. The resulting new cell id is returned. |
| delete_cellB | Deletes the cell with the provided cell ID. |
| get_cellsB | Gets a range of cells as JSON from the notebook. |
| move_cellA | Moves a cell to the provided index and shifts existing cells. |
| run_code_cellA | Executes the code in the cell with the provided cell ID. The cell must be a code cell type. The output of the cell execution is returned. |
| update_cellA | Overwrites the contents of the cell with the provided new content. The cell must already exist and is identified by its cell ID. |
| set_env_varsB | Sets environment variables in the current Colab Python runtime by executing a generated setup cell. |
| restart_runtimeA | Restarts the current Colab Python runtime. The notebook page stays open, but the runtime state and environment variables are reset. |
| shutdown_runtimeA | Disconnects and releases/unassigns the active Colab CPU/GPU runtime instance. Call this as the final cleanup step after training or long runtime work is complete or cancelled. Download needed weights, logs, and artifacts first because /content files can be lost after release. This does not uninstall the MCP server and does not close the browser tab. |
| rerun_env_setup_cellsA | Reruns persisted environment setup cells created by set_env_vars with persist=true. |
| check_runtimeA | Checks the current Colab runtime Python, platform, CPU, working directory, and selected package versions. |
| connect_runtimeB | Uses the controlled Colab browser to connect or reconnect the Colab Python runtime, then waits until terminal-backed runtime tools can see kernel.runtime. |
| check_gpuA | Checks actual GPU availability in the connected Python runtime using nvidia-smi. Call open_colab_browser_connection and connect_runtime first. If no GPU is active this returns status=warning with remediation steps; do not rely on UI text alone. |
| set_runtime_acceleratorA | Uses the controlled Colab browser to choose an accelerator such as T4 GPU. Applying may restart/disconnect the runtime; always call open_colab_browser_connection, connect_runtime, then check_gpu afterwards. |
| resource_usage_snapshotA | Captures CPU, memory, disk, and GPU usage through Colab Terminal and optionally appends it to a JSONL file. |
| run_shell_commandA | Runs a short shell command through Colab Terminal and waits for completion. Do NOT use this for training or long jobs; use start_background_command plus watch_background_command instead. |
| start_background_commandA | Preferred tool for training and long jobs. Starts a background shell command through Colab Terminal, writes stdout/stderr to a log file, and records status for watch_background_command. |
| check_background_commandB | Checks through Colab Terminal the status of a background command started by start_background_command. |
| tail_fileB | Returns through Colab Terminal the last lines or bytes from a file in the Colab runtime, useful for background command logs. |
| stop_background_commandC | Stops through Colab Terminal a background command started by start_background_command. |
| import_notebookB | Imports cells from a local .ipynb file into the current Colab notebook. |
| export_notebookB | Exports the current Colab notebook cells to a local .ipynb file on the machine running Codex/MCP. |
| download_notebookB | Alias for export_notebook. Downloads the current Colab notebook cells to a local .ipynb file on the machine running Codex/MCP. |
| upload_notebookB | Alias for import_notebook. Uploads cells from a local .ipynb file into the current Colab notebook. |
| run_code_cellsB | Runs a list of code cells in order and returns per-cell outputs. |
| run_cell_rangeC | Runs code cells in an inclusive index range. |
| run_all_cellsC | Runs all code cells in notebook order. |
| cancel_queued_cellsA | Best-effort queued cell cancellation. Returns no-op status when Colab queue controls are not exposed through MCP. |
| get_cellC | Returns a single cell by cell ID. |
| find_cellsC | Finds cells by source or output text. |
| replace_cellsC | Bulk inserts cells and optionally deletes existing cells first. |
| patch_cellC | Partially updates a cell. Currently supports source/content updates. |
| get_cell_statusB | Returns best-effort execution status for selected cells or all cells. |
| wait_for_cellsC | Polls cell status until every selected cell reaches one of the target states. |
| read_cell_outputsC | Returns outputs for selected cells. |
| watch_cell_outputsC | Polls selected cell outputs for a short period and returns the latest outputs. |
| get_env_varsC | Reads environment variables from the Colab runtime with secret redaction in text output. |
| unset_env_varsC | Unsets environment variables in the current Colab Python runtime. |
| load_env_fileC | Loads a local .env file and applies it to the current Colab Python runtime. |
| list_background_commandsA | Lists through Colab Terminal background commands registered by start_background_command. |
| watch_background_commandC | Polls through Colab Terminal a background command and returns status plus recent log tail. |
| upload_fileB | Writes a base64 encoded file into the Colab runtime through Colab's browser file upload API without consuming a notebook cell execution slot. |
| upload_local_fileA | Uploads a file from the local machine running this MCP server to the Colab runtime. Prefer this over upload_file when the source is a local path. |
| download_fileC | Reads a file from the Colab runtime through Colab's /files download API and returns base64 content without consuming a notebook cell execution slot. |
| download_file_to_localA | Downloads a file from the Colab runtime to a local path on the machine running this MCP server. Prefer this over download_file when the target is a local file. |
| upload_file_chunkC | Appends or writes one base64 chunk to a temporary upload file in the Colab runtime through Colab's browser file upload API. |
| complete_uploadC | Moves a temporary chunked upload into its final runtime path through Colab's browser file upload API. |
| download_file_chunkB | Reads one base64 chunk from a file in the Colab runtime through Colab's /files download API. |
| stat_fileC | Stats a path in the Colab runtime through Colab's runtime file APIs. |
| list_filesC | Lists files in the Colab runtime through Colab's contents API. |
| delete_fileC | Deletes a file or directory in the Colab runtime through Colab's contents API. |
| make_directoryC | Creates a directory in the Colab runtime through Colab's contents API. |
| sample_gpu_usageB | Samples GPU utilization with nvidia-smi through Colab Terminal and optionally writes JSONL. |
| start_gpu_monitorB | Starts a lightweight nvidia-smi background sampler through Colab Terminal that writes timestamped JSONL samples. |
| stop_gpu_monitorB | Stops a GPU monitor started by start_gpu_monitor. |
| read_gpu_monitorC | Reads recent JSONL samples from a GPU monitor file. |
| get_connection_infoA | Returns the local Colab MCP WebSocket connection details and scratch URL for manually connecting a browser. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/404F0X/better_colab_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server