MCP Server Colab Exec logo

MCP Server Colab Exec

Run Python code on Google Colab T4 or L4 GPU runtimes through MCP tools.

Install MCP Server Colab Exec

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-server-colab-exec": {
      "command": "uvx",
      "args": [
        "mcp-server-colab-exec"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx mcp-server-colab-exec

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 6d ago.

Overview

mcp-server-colab-exec MCP server allocates Google Colab T4 or L4 GPU runtimes and runs Python code on them through MCP. It supports inline code, workspace-local Python files, and notebook-style execution that downloads generated artifacts. Google OAuth authenticates the server, with tokens cached locally for later runs. Reach for it when an MCP-compatible assistant needs CUDA, PyTorch, or TensorFlow execution without a local GPU.

Use cases

  • Run CUDA availability checks on a Colab GPU
  • Execute PyTorch or TensorFlow experiments without local GPU hardware
  • Train a model and download its weights
  • Run a workspace Python script on a T4 or L4 runtime
  • Collect generated images, CSVs, or models into a local directory

Key features

  • Execute inline Python on Google Colab GPUs
  • Run workspace-local .py files
  • Choose T4 or L4 accelerators
  • Download generated execution artifacts
  • Authenticate with cached Google OAuth tokens
  • Configure as a stdio MCP server

Tools3

What MCP Server Colab Exec lets your agent do. Expand a tool for its parameters.

Self-reported~58 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

9/9 checks healthy over the last 45d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16h ago via OSV.dev · mcp-server-colab-exec (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars9Stargazers on the source repository.
Last commit7mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed3Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Server Colab Exec works

What mcp-server-colab-exec MCP server does

The mcp-server-colab-exec MCP server gives MCP-compatible assistants access to Google Colab GPU runtimes. It can execute inline Python, run a local Python file, or execute code while collecting files produced during the run. Supported accelerator choices are T4, which is the default, and L4, which is described as premium.

This is useful for GPU-dependent work such as checking CUDA availability, running nvidia-smi, executing PyTorch or TensorFlow code, and training a model whose output needs to be downloaded. The server does not require the machine running the MCP client to have its own GPU.

How it works

When a tool is called, the server provisions a Google Colab GPU runtime and sends the requested Python workload to it. Each execution accepts a timeout, with 300 seconds as the default. Inline execution returns JSON containing cell output, errors, and standard error.

colab_execute_file sends a local .py file to Colab. For safety, the file must use the .py extension and be located inside the current workspace, identified by the server process's working directory.

colab_execute_notebook is intended for runs that create files. It downloads generated artifacts as a ZIP archive and extracts them into the required local output directory. ZIP members are checked before extraction to block path traversal and writes involving special files.

Setup and configuration

Install the package with pip install mcp-server-colab-exec, or launch it directly with uvx mcp-server-colab-exec. The server requires Python 3.10 or newer and a Google account with Google Colab access.

On first use, a browser-based Google OAuth consent flow is required. Credentials are cached at ~/.config/colab-exec/token.json; later executions reuse and refresh the cached token. Headless environments need an alternate authentication workflow: authenticate on a machine with a browser, then copy the token file to the target environment.

The server uses a stdio command configuration. Claude Code, Claude Desktop, and Gemini CLI can register mcp-server-colab-exec as the command for an MCP server named colab-exec.

Tools and capabilities

  • colab_execute runs required inline Python with a selected accelerator and timeout.
  • colab_execute_file runs a workspace-local .py file with the same accelerator and timeout controls.
  • colab_execute_notebook runs code and places downloaded images, CSV files, models, and other generated artifacts in a specified directory.
  • T4 and L4 runtimes are available as accelerator options.
  • Execution responses can include output, errors, and standard error.

Limitations and notes

Google Colab usage limits can prevent a runtime from starting when GPU quota is exhausted. Runtime creation can also take longer during busy periods, causing a timeout; retrying is the documented response. If authentication fails, removing the cached token and completing OAuth again may resolve the issue.

A browser is needed for the initial OAuth consent step unless authentication is completed elsewhere and the token is copied over.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Server Colab Exec

mcp-server-colab-exec is an MCP server that connects MCP-compatible AI assistants to Google Colab GPU runtimes. Its main tools execute inline Python, run local .py files, and execute code while downloading generated artifacts such as images, CSVs, and models. It supports T4 and L4 accelerators.

Install it with pip or run it with uvx. Use `pip install mcp-server-colab-exec`, or launch `uvx mcp-server-colab-exec` directly. Python 3.10 or newer and a Google account with Google Colab access are required.

It authenticates through Google OAuth in a browser on first use. The access and refresh tokens are cached at `~/.config/colab-exec/token.json` and reused automatically on later runs. For headless systems, authenticate on a browser-enabled machine and copy the token file.

It provides `colab_execute` for inline Python, `colab_execute_file` for a local workspace `.py` file, and `colab_execute_notebook` for code that produces downloadable artifacts. Each tool accepts T4 or L4 as the accelerator choice and supports a timeout.

Yes, the README provides stdio configuration examples for Claude Code, Claude Desktop, and Gemini CLI. Other MCP-compatible assistants may also use it when they support registering a command-based MCP server.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server Colab Exec AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mcp-server-colab-exec?style=directory)](https://allmcps.com/mcp/mcp-server-colab-exec)
HTML Embed
<a href="https://allmcps.com/mcp/mcp-server-colab-exec"><img src="https://allmcps.com/api/badge/mcp-server-colab-exec?style=directory" alt="MCP Server Colab Exec on AllMCPs" /></a>