Oriel — AI & technology worth noticing, every day.

The Colab MCP Endpoint From Claude Code: Set It Up, Test It, Run a Notebook on a TPU

Post · https://dev.to/gde/the-colab-mcp-endpoint-from-claude-code-set-it-up-test-it-run-a-notebook-on-a-tpu-4ck9

Google's hosted Colab MCP endpoint, step by step: a token with the colaboratory scope, a quota project, registration in Claude Code with a headers helper, and a Python runner that executes a notebook on a fresh TPU v5e-1 and deletes it.

First seen by Oriel on .

AI summary

This guide shows how to authenticate, configure Claude Code, and use Google's Colab MCP endpoint to execute a 26-cell Gemma 4 E2B notebook on a disposable TPU runtime.

  • The Colab API exposes runtime creation, inspection, sessions, code execution, and deletion through REST and the hosted MCP endpoint.
  • Authentication requires a Colab CLI token with the colaboratory scope and a Google Cloud quota project supplied through x-goog-user-project.
  • A Python client handles JSON-RPC and server-sent events, reattaching create_runtime and execute_code calls after DEADLINE_EXCEEDED or UNAVAILABLE.
  • The verification script started a V5E1 runtime in 4 seconds, ran all 26 cells in 901 seconds, and deleted the runtime afterward.
  • Each execute_code cell must finish within 300 seconds because the connection closes and the kernel is interrupted at that limit.

#google colab #mcp #claude code #tpu

Generated by gpt-5.6-sol. Check the original for details.

Metric trends

Last 30 days · Up to 120 recorded samples per source and metric, with reposts kept separate · First and latest retained

Reactions

Total public reactions reported by the source; distinct from points and likes.

  • DEV Community: 26, latest observation ; +2 over observed period since

Comments

Comment count reported by the source.

  • DEV Community: 2, latest observation ; 0 over observed period since

Aliases

SourceExternal IDURL
DEV Community5060294https://dev.to/gde/the-colab-mcp-endpoint-from-claude-code-set-it-up-test-it-run-a-notebook-on-a-tpu-4ck9 Read discussion