In The Colab MCP Endpoint From Claude Code: Set It Up, Test It, Run a Notebook on a TPU, xbill uses Google's hosted MCP endpoint to execute a notebook cell by cell. The most interesting result is what happened when a single call outlasted the connection. A client has to distinguish a lost response from an interrupted kernel before it can decide how to recover.
Give the retry an identity
The runner creates a runtime, starts a Jupyter session, and sends each cell to that same session. Variables and imports remain available to later cells. The endpoint sends back text results, including stdout and stderr. A notebook cell that renders a chat page still needs a separate way to present that page.
Google's MCP reference describes reattaching to an execution after a deadline or transient availability error by repeating the same request with the same session and execution ID. That matters for a cell that writes a file or starts a server. If the client assigns a fresh ID when it merely wants the result of the previous execution, it asks for another run and may repeat the side effects. The reference also says that an ID can trigger execution again after the result has been returned, so a runner needs to keep track of which cells have completed.
Measure the whole path
In one CPU test, the author's client lost its stream at 300 seconds. Reattaching returned a result that contained a keyboard interrupt. Google's reference describes a 600-second cutoff after which work can continue. These observations are about different boundaries. A client stream can fail before the documented tool deadline, and the observed interruption came from one configuration. A runner can log the client error and any returned kernel error separately so the next operator can see whether to recover the result or investigate the cell.
In the TPU demonstration, the author reports 901 seconds for a 26-cell run including runtime creation and deletion. That total shows how a notebook can finish even when individual calls have shorter deadlines. The runner deletes the runtime it created in a cleanup block, and the author checked the runtime list afterward. Separating cell results from cleanup makes it possible to tell whether the computation finished and whether the accelerator was released.