# mcp-server-colab-exec

Runs Python on Google Colab GPU runtimes and can return generated files. Useful for CUDA, PyTorch, or TensorFlow work when no local GPU is available.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 9
- Author: pdwi2020
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pdwi2020/mcp-server-colab-exec
- Updated: 2026-03-11
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-server-colab-exec

## What it does

mcp-server-colab-exec starts a Google Colab GPU runtime and sends Python code to it. The server exposes tools for inline execution, running a local `.py` file, and collecting output artifacts into a chosen directory. T4 and L4 runtimes are supported.

Results include cell output, errors, and stderr. Notebook artifacts are downloaded as a ZIP and checked before extraction. A file passed to the file tool must be a `.py` file inside the current workspace. You need Python 3.10+ and a Google account with Colab access.

The first run opens Google OAuth2 in a browser and stores tokens at `~/.config/colab-exec/token.json`. Headless environments need authentication on a machine with a browser before the token is copied over. Colab quota limits can prevent a GPU session from starting.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-server-colab-exec -- uvx mcp-server-colab-exec
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>

### Codex

**Platform CLI**
```bash
codex mcp add mcp-server-colab-exec -- uvx mcp-server-colab-exec
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-server-colab-exec": {
            "command": "uvx",
            "args": [
                "mcp-server-colab-exec"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-server-colab-exec": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "mcp-server-colab-exec"
            ]
        }
    }
}
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mcp-server-colab-exec uvx mcp-server-colab-exec
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>

## When to use it
- run Python jobs on a Google Colab GPU
- check CUDA without local GPU hardware
- execute a workspace `.py` file remotely
- download model weights and generated files
- inspect output and stderr from a GPU run

## Example prompts
- Use `colab_execute` to check CUDA availability and report the GPU name.
- Run `train.py` with `colab_execute_file` on a T4 runtime.
- Use `colab_execute_notebook` for model training and place the artifacts in `./outputs`.

## Similar
- [ml-engineer](https://affpapa.org/en/nevibecode/agents/ml-engineer.md) — subagent · 1971 installs
- [ML Model Training](https://affpapa.org/en/nevibecode/skills/ml-model-training.md) — skill · 515 installs
- [Neural Network Design](https://affpapa.org/en/nevibecode/skills/neural-network-design.md) — skill · 514 installs
- [ml-model-training](https://affpapa.org/en/nevibecode/skills/secondsky-ml-model-training.md) — skill · 457 installs
- [pod-doctor](https://affpapa.org/en/nevibecode/skills/pod-doctor.md) — skill · 2600 installs
- [discovery](https://affpapa.org/en/nevibecode/skills/discovery.md) — skill · 2600 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
