Colab-exec

Provides GPU-accelerated Python execution on Colab runtimes for MCP clients.
  • python

1

GitHub Stars

python

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "pdwi2020-mcp-server-colab-exec": {
      "command": "mcp-server-colab-exec",
      "args": []
    }
  }
}

This MCP server allocates Google Colab GPU runtimes (T4 or L4) to execute Python code, enabling GPU-accelerated workflows on machines without local GPUs. It lets compatible MCP clients run CUDA, PyTorch, and TensorFlow code by leveraging Colab's runtimes through an easy-to-use server.

How to use

You connect an MCP client to this server using the standard MCP integration flow supported by your client. Once configured, you can run GPU-accelerated Python code on Colab runtimes without owning local GPU hardware. The server handles starting a Colab session, executing your code, and returning results and artifacts.

How to install

Prerequisites you need before installation.

On first run, a browser window opens for OAuth2 consent and the token is cached for subsequent runs.

Install the server using Python’s package manager, or run directly with UVX.

Configuration

Configure your MCP client to connect to the Colab-exec server by adding the server entry with the executor command.

{
  "mcpServers": {
    "colab_exec": {
      "command": "mcp-server-colab-exec",
      "args": []
    }
  }
}

Additional configuration for clients

For Claude Code, Claude Desktop, and Gemini CLI integrations, you can add the Colab-exec server to your profiles so the MCP client can discover and start using it when you trigger a Colab-backed execution.

Tools

This server provides three primary tools to run Python code on Colab GPUs.

colab_execute

Execute inline Python code on a Colab GPU runtime.

Parameters always include code (the Python code to run), accelerator (GPU type), and timeout to bound execution.

Returns JSON with per-cell output, errors, and stderr.

colab_execute_file

Execute a local Python file on a Colab GPU runtime.

Parameters include file_path (path to a .py file), accelerator, and timeout.

Returns results similar to colab_execute, based on the file's execution.

colab_execute_notebook

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

Parameters include code, output_dir (local directory for downloaded artifacts), accelerator, and timeout.

Artifacts are downloaded as a zip and extracted into output_dir.

Available tools

colab_execute

Run inline Python code on a Colab GPU, returning per-cell outputs and errors.

colab_execute_file

Run a local Python file on a Colab GPU, returning results and outputs.

colab_execute_notebook

Run code on a Colab GPU and download all produced artifacts to a local directory.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational