# Colab-MCP (unofficial)

> Colab-MCP (unofficial) is an open-source MCP server for developer tools. Unofficial MCP server for running GPU/TPU Colab runtimes, notebooks and jobs from an agent. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux
- **Repository:** https://github.com/amgallego8/colab-mcp
- **MCP Registry name:** io.github.amgallego8/colab-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [AI models and LLM tooling](https://ai-powered.com/categories/ai-and-llm)
- **Listing updated:** 2026-11-23

## About

This server wraps Google's official Colab CLI so an agent can use Colab without a browser tab. It creates and stops GPU or TPU runtimes, runs code with kernel state kept between calls, edits and runs local .ipynb notebooks cell by cell, starts long background jobs with log polling, and moves files and folders to and from the VM. The README counts 42 tools plus 8 optional Drive tools.

Safety is a large part of the design. Local paths are confined to one working folder, secrets are passed by name and scrubbed from results, commands run without a shell, folder uploads skip likely secrets, and notebook deletes go to a trash folder. Mounting Drive on the VM is a manual consent step, and the README states plainly that code on a mounted VM can then reach all of Drive.

Code runs under your Google account and spends your compute units. It supports Linux and macOS only, and the author says it was validated live once and mainly tested against a simulated CLI.

## Features

- **Runtime control:** Create, inspect, restart and stop GPU or TPU sessions.
- **Code execution:** Run code with persistent kernel state or one-shot scripts.
- **Notebook editing:** Add, edit, run and convert local notebook cells.
- **Background jobs:** Start long jobs and poll their logs.
- **File transfer:** Upload and download files and folders with secret-skipping guards.
- **Optional Drive:** Mount Drive on the VM for results that must persist.

## Good for

- Train a model on a Colab GPU from an agent
- Run a notebook cell by cell and read outputs
- Launch an overnight batch job and fetch results
- Keep checkpoints in a Drive project folder

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add colab-mcp -- uvx colab-cli-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add colab-mcp -- uvx colab-cli-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.colab-mcp]
command = "uvx"
args = ["colab-cli-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user colab-mcp uvx -- colab-cli-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "colab-mcp": {
      "command": "uvx",
      "args": [
        "colab-cli-mcp"
      ]
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 7 of 12 tools change data; 4 names don't say. From the server's own tool labels and tool names; not verified by us.

- `colab_new`: Create a runtime.
- `colab_ensure_session`: Ensure a session, optionally with a GPU.
- `colab_exec` (name suggests: changes): Run code with persistent kernel state.
- `colab_run` (name suggests: changes): One-shot run on a fresh VM.
- `colab_stop` (name suggests: changes): Stop a session.
- `colab_notebook_create` (name suggests: changes): Create a local notebook.
- `colab_notebook_run_cell` (name suggests: changes): Run one notebook cell.
- `colab_job_start` (name suggests: changes): Start a background job.
- `colab_job_logs`: Read job logs.
- `colab_upload_dir` (name suggests: changes): Upload a folder to the VM.
- `colab_download_dir` (name suggests: reads): Download a folder from the VM.
- `colab_drive_mount_start`: Begin mounting Drive on the VM.

## FAQ

### What does Colab-MCP (unofficial) need?

uv and Google's Colab CLI signed in once, on macOS or Linux.

### Do secrets reach the model?

No, the model passes names only and values are scrubbed from results.

### Does Colab-MCP (unofficial) cost anything?

Code runs on your Colab account and spends your compute units.

### How do I add Colab-MCP (unofficial) to Claude Code?

Run this command in your terminal: claude mcp add colab-mcp -- uvx colab-cli-mcp

### What are the best alternatives to Colab-MCP (unofficial)?

The closest alternatives to Colab-MCP (unofficial) are REA, Codebase Memory, Serena MCP: the IDE for your agent, XERJ and Context7.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [mcp-for-blender](https://ai-powered.com/mcp/mcp-for-blender): mcp-for-blender is an open-source MCP server for design and media.

---
Source: https://ai-powered.com/mcp/colab-mcp-unofficial
