pdwi2020 avatar

Mcp Server Colab Exec

pdwi2020/mcp-server-colab-exec

Lets you run Python code on Google Colab's free T4 or premium L4 GPUs from any MCP client without local hardware. Three tools: colab_execute for inline code snippets, colab_execute_file for local .py scripts, and colab_execute_notebook to run code and download all generated artifacts like model weights or CSVs. First run triggers OAuth2 in your browser, then tokens cache locally. Handles timeouts, captures stdout/stderr per cell, and validates zip extractions to prevent path traversal. Useful when you need to prototype CUDA kernels, fine-tune models, or run torch/TensorFlow workloads from Claude without spinning up cloud instances.

GitHub stars
6
tools
3
transport
STDIO
last updated
Feb 15, 2026

Tools

3 tools

Public tool metadata for what this MCP can expose to an agent.

colab_executeExecute inline Python code on a Colab GPU runtime.

Execute inline Python code on a Colab GPU runtime.

No parameter schema in public metadata yet.

colab_execute_fileExecute a local .py file on a Colab GPU runtime.

Execute a local .py file on a Colab GPU runtime.

No parameter schema in public metadata yet.

colab_execute_notebookExecute code and collect all generated artifacts (images, CSVs, models, etc.).

Execute code and collect all generated artifacts (images, CSVs, models, etc.).

No parameter schema in public metadata yet.

Sponsors

Readme

mcp-server-colab-exec

MCP server that allocates Google Colab GPU runtimes (T4/L4) and executes Python code on them. Lets any MCP-compatible AI assistant — Claude Code, Claude Desktop, Gemini CLI, Cline, and others — run GPU-accelerated code (CUDA, PyTorch, TensorFlow) without local GPU hardware.

Prerequisites

  • Python 3.10+
  • A Google account with access to Google Colab
  • On first run, a browser window opens for OAuth2 consent. The token is cached at ~/.config/colab-exec/token.json for subsequent runs.

Installation

pip install mcp-server-colab-exec

Or run directly with uvx:

uvx mcp-server-colab-exec

Configuration

Claude Code

Add to your project's .mcp.json or ~/.claude/.mcp.json:

{
  "mcpServers": {
    "colab-exec": {
      "command": "mcp-server-colab-exec"
    }
  }
}

Or via the CLI:

claude mcp add colab-exec mcp-server-colab-exec

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "colab-exec": {
      "command": "mcp-server-colab-exec"
    }
  }
}

View the full README on GitHub

Details

Repository
github.com/pdwi2020/mcp-server-colab-exec
Package
mcp-server-colab-exec
Transport
STDIO
Registry
MCP registry, active