claude-colab
Provides tools for executing Python code, running shell commands, uploading/downloading files, and checking GPU status on a Google Colab instance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-colabcheck GPU status with nvidia-smi"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-colab
Give Claude Code GPU access via Google Colab.
AI coding agents can read files, run bash, and edit code — but they have zero GPU access. claude-colab bridges that gap using Colab's free T4 GPU.
How It Works
Colab (T4 GPU) Your Mac / PC
┌─────────────────────────┐ ┌──────────────────────┐
│ Flask API │ │ claude-colab CLI │
│ /exec, /python, │◄── HTTPS ──────►│ or │
│ /upload, /download │ (cloudflared) │ MCP Server │
│ │ E2E encrypted │ (Claude Code tools) │
│ Bearer token + Fernet │ │ │
└─────────────────────────┘ └──────────────────────┘Open one Colab notebook, hit "Run All"
Copy the connection string
Claude Code gains GPU access
Related MCP server: colab-mcp
Quick Start
Install
pip install claude-colabStart the Colab server
Open notebooks/claude_colab_server.ipynb in Google Colab. Set runtime to T4 GPU. Run all cells. Copy the connection string.
Connect
claude-colab connect cc://TOKEN:KEY@your-tunnel.trycloudflare.comUse it
claude-colab status # GPU info
claude-colab exec "nvidia-smi" # Run shell commands
claude-colab python -c "import torch; print(torch.cuda.get_device_name(0))"
claude-colab upload model.py /content/model.py
claude-colab download /content/results.csv ./results.csvMCP Server (Claude Code Integration)
Add to ~/.claude/settings.json:
{
"mcpServers": {
"claude-colab": {
"command": "claude-colab",
"args": ["mcp-serve"]
}
}
}Claude Code now has 5 GPU tools:
Tool | What it does |
| GPU info, VRAM, disk, uptime |
| Run shell commands |
| Execute Python code |
| Upload files to Colab |
| Download files from Colab |
Example
You: "Benchmark this model on the GPU"
Claude:
1. colab_status → Tesla T4, 15GB VRAM
2. colab_upload → sends model.py
3. colab_exec → "pip install torch transformers"
4. colab_exec → "python model.py"
5. colab_download → fetches results.jsonConnection Safety
The connection string contains your auth token and encryption key. Three ways to connect:
# Direct (convenient, visible in shell history)
claude-colab connect cc://TOKEN:KEY@host
# Interactive prompt (nothing in history)
claude-colab connect
# Pipe from clipboard (nothing in ps aux or history)
pbpaste | claude-colab connect -Security
E2E Encryption
All request and response bodies are encrypted with Fernet (AES-128-CBC + HMAC-SHA256). The encryption key is generated per Colab session and is separate from the bearer token.
Actor | Can see | Cannot see |
Random user | Nothing (no token) | Everything |
Cloudflare | URL paths, timing, token | Request/response bodies |
Google (Colab) | Everything on the VM | Your local files |
What we don't protect against
Google seeing data on the Colab VM — it's their hardware
Arbitrary code execution on Colab — intentional, it's your session
Local machine compromise exposing
~/.claude-colab.json
Limitations
Session timeout: Free Colab dies after 90min idle / 12hr max. You'll need to restart and reconnect.
No streaming: Long-running commands return nothing until completion. Redirect to file:
colab_exec "python train.py > output.log 2>&1"50MB file limit: For larger files, use
colab_execwithwgetorgdown.No persistent state: Each
/pythoncall runs in a fresh namespace.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/LakshmiSravyaVedantham/claude-colab'
If you have feedback or need assistance with the MCP directory API, please join our Discord server