research: Colab API MCP adapter spike (auth, cross-visibility, resumable execute_code) #7
Labels
No labels
area/backup
area/cli
area/docs
area/dsh
area/forgejo
area/host
area/mcp
area/plugin
area/security
area/ux
needs-operator
priority/later
priority/next
priority/now
type/bug
type/research
type/task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
dsh-plugins/dsh-colab#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Google now ships a Colab API MCP server:
https://colaboratory.googleapis.com/mcp(v1beta). Tools:list_runtime_specs,create_runtime,get_runtime,list_runtimes,delete_runtime,create_session,list_sessions,delete_session,execute_code,get_subscription. Reference: https://developers.google.com/colab/api/reference/mcpWhy it might be better than CLI shelling
get_subscriptiongives the plan tierexecute_codestreams stdout/stderr and is resumable viaexecutionId(600 s stream deadline, reattach)Why it is not enough (yet)
create_runtimeis rate-limitedSpike tasks
colab sessions/status(CLI) sees it and whethercolab drivemount -scan attach. If yes, a hybrid (MCP lifecycle+exec, CLI for Drive) is viable; if no, keep v0 CLI-only and use MCP only for metadata.execute_codewith a stableexecutionId, disconnect, reattach after 10 min; measure whether training keeps running and output resumes.Deliverable
docs/mcp-spike.md: auth steps, tool matrix, cross-visibility answer, long-run reattach result, recommendation (adapter? hybrid? skip).Adapter delivered ahead of the spike in
f414adc; live verification still open.mcpEnabled(default false) connects tohttps://colaboratory.googleapis.com/mcpvia Streamable HTTP, discovers tools, and registers them asmcp__colab__<raw>throughcreateMcpToolDefinition;colab_mcp_refreshre-lists and swaps registrations, so future server tools need no plugin releasebearer(DSH credential ref) orcommand(/bin/sh -c, 10 s timeout, 10 min cache); tokens never appear in status, results, errors, or logscolab_mcp_status/colab_mcp_refreshalways registered;mcpFailOnStartupErrorcontrols activation behaviordocs/mcp-spike.mdrecords the 10-tool matrix, auth setup, risks, and the hybrid recommendation (CLI for lifecycle/Drive/artifacts, MCP for structured runtime/session/exec)publicToolNameis declared but not exported at runtime bydsh-mcp-client@0.2.2-rc.1, so a pinned copy lives inlib/mcp/selection.jsRemaining for this issue: on a real account, verify auth, CLI<->MCP cross-visibility,
execute_codereattach across a restart, and cleanup of abandoned sessions.