Working fork with pre-registered tools + OAuth runtime control #69
Replies: 3 comments 3 replies
|
Thank |
|
One problem is when Agent tries to select a GPU, a session with the GPU is created, but the current session does not change, and as a result, Agent still uses the CPU and cannot change the session. |
|
Thanks for the fork — pre-registering the cell tools fixed the dynamic-registration gap that broke colab-mcp on Claude Code and Codex. One follow-up. The post-connection success message advertises seven tools:
But only five are pre-registered in Why Suggested change — same pattern as existing stubs: async def get_cells_stub() -> str:
return NOT_CONNECTED_MSG
async def delete_cell_stub(cellId: str = "", cellIndex: int = 0) -> str:
return NOT_CONNECTED_MSG
async def move_cell_stub(cellId: str = "", fromIndex: int = 0, toIndex: int = 0) -> str:
return NOT_CONNECTED_MSG
async def run_code_cell_stub(code: str = "") -> str:
return NOT_CONNECTED_MSGPlus four matching Caveat: I'm guessing argument signatures from tool names — I don't have visibility into the Colab JS side, so the real param schemas (especially for Repro on Claude Code:
|
Uh oh!
There was an error while loading. Please reload this page.
Hey all, I've been maintaining a fork that addresses a couple of pain points I've seen come up in discussions here:
1. Tools not visible to MCP clients (#54, #67)
The fork pre-registers all 5 notebook tools at startup instead of relying on
notifications/tools/list_changed, so they work with any MCP client (Claude Code, Codex, Kiro, etc.) — no need to wait for a browser connection for tools to appear.2. Programmatic GPU assignment
Since
--enable-runtimewas removed from this repo (#41), the fork includes achange_runtimetool that assigns T4/L4/A100 GPUs via OAuth without touching the browser. Token is cached so you only authorize once.Setup
Then point your
.mcp.jsonto the clone with--client-oauth-configfor GPU control. Details in the repo README.Fork: https://github.com/SebastianGilPinzon/colab-mcp
Happy to answer questions if anyone runs into issues with the setup.
All reactions