mcp-server-colab-exec — Claude Code MCP server
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.
claude mcp add mcp-server-colab-exec -- uvx mcp-server-colab-execWhat mcp-server-colab-exec 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.
What it helps with
- run Python jobs on a Google Colab GPU
- check CUDA without local GPU hardware
- execute a workspace
.pyfile remotely - download model weights and generated files
- inspect output and stderr from a GPU run
Example prompts for the agent
- Use
colab_executeto check CUDA availability and report the GPU name. - Run
train.pywithcolab_execute_fileon a T4 runtime. - Use
colab_execute_notebookfor model training and place the artifacts in./outputs.
How to install mcp-server-colab-exec
Platform CLI
claude mcp add mcp-server-colab-exec -- uvx mcp-server-colab-execuvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>
Platform CLI
codex mcp add mcp-server-colab-exec -- uvx mcp-server-colab-execuvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>
Config file
{
"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>
Config file
{
"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>
Platform CLI
gemini mcp add mcp-server-colab-exec uvx mcp-server-colab-execuvx runs the command named after the package; if the README names another one, use uvx --from mcp-server-colab-exec <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-server-colab-exec
How do I install mcp-server-colab-exec in Claude Code?
Run claude mcp add mcp-server-colab-exec -- uvx mcp-server-colab-exec.
What does mcp-server-colab-exec do?
It runs Python on Google Colab GPU runtimes, with T4 and L4 options. Its tools also execute local .py files and fetch generated artifacts.
What does mcp-server-colab-exec require?
You need Python 3.10+ and a Google account that can use Colab. The first launch requires browser-based OAuth2; the token is stored at ~/.config/colab-exec/token.json.