
Colab Drive MCP
io.github.YummyTastyCodePublished by GitHub account YummyTastyCodev0.1.3Updated Oct 24, 2026
Synchronize Colab notebook files through Google Drive without executing notebook code.
Overview
Synchronizes Google Colab-compatible .ipynb notebook files with Google Drive, letting an assistant inspect and edit cells without executing code.
- What you can do
- Provides local notebook tools to list, read, create, and edit .ipynb files and their cells, plus Drive tools to list, pull, push, copy, and compare notebooks. It reports sync status by comparing local content with Drive MD5 checksums and can return a Colab URL. It also normalizes Colab-specific stream output metadata during downloads. It never executes notebook code or connects to a Colab runtime.
- When to use it
- Use it when an assistant needs to prepare a notebook locally, move it to or from Google Drive, inspect completed outputs, or return an edited notebook to the user. It is not for running cells, keeping Colab sessions alive, or automating the Colab browser UI; run the notebook separately in Colab, Jupyter, or VS Code.
- Requirements
- Local Python process run via uvx from the PyPI package colab-drive-mcp. Requires the environment variable COLAB_MCP_ROOT, an absolute local directory bounding notebook access. Google Drive needs a Google Cloud project with the Drive API enabled, an OAuth Desktop client JSON, and a token; paths can be set with COLAB_MCP_GOOGLE_CREDENTIALS and COLAB_MCP_GOOGLE_TOKEN. COLAB_MCP_DRIVE_ACCESS selects file or full mode. Network access is needed for Drive.
Installation
In SourceWeft
- Open Colab Drive MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Colab Drive MCP
[CI] [Release] [PyPI] [License: MIT]
An MCP server for safely inspecting, editing, and synchronizing
Google Colab-compatible .ipynb notebooks through Google Drive.
[!IMPORTANT] This is a notebook file synchronization server, not a notebook execution service. It transfers and edits
.ipynbfiles through Google Drive. It does not connect to Colab runtimes, execute cells, click Run all, keep sessions alive, automate the Colab browser UI, or bypass Colab limits.
Use this MCP when an AI agent needs to prepare a notebook locally, synchronize it with Drive, inspect completed outputs, or return an edited notebook to the user. Open and execute the synchronized notebook separately in Colab, Jupyter, VS Code, or another notebook runtime.
Features
- Inspect and edit notebook cells without loading the entire notebook.
- Create, search, copy, upload, and download notebooks.
- Report live upload and download progress to MCP clients that request it.
- Compare local and Drive notebook copies using Drive metadata and content MD5.
- Keep local file access inside a configured root directory.
- Normalize Colab-specific stream output metadata during downloads.
- Diagnose Google Drive setup without unexpectedly opening a browser.
- Return actionable errors for missing credentials, expired authorization, permissions, missing files, and rate limits.
Non-goals
- Starting, controlling, or monitoring a Google Colab runtime.
- Detecting whether a Colab runtime is connected, busy, or executing a file.
- Executing notebook cells locally or remotely.
- Browser automation, automatic
Run all, or unattended Colab sessions. - Circumventing Colab quotas, idle timeouts, access controls, or usage policies.
- Deploying or running the project contained inside a notebook.
AI Contract
The MCP initialization response includes server-wide instructions that define this project as file synchronization only. Tool descriptions repeat the same boundary where it matters.
manifest.0 provides the same purpose, capabilities, and
non-goals as a typed Zero language contract for agents and repository tooling.
Tools
Setup
get_google_drive_status: diagnose dependencies, credentials, token, and scope.authorize_google_drive: explicitly open the Google OAuth browser flow.
Local notebooks
list_local_notebooks,get_local_notebook,create_local_notebookadd_local_cell,update_local_cell,delete_local_cellsearch_local_cells,clear_local_outputs
Google Drive
list_drive_notebooks,pull_drive_notebook,push_local_notebookget_notebook_sync_status,copy_drive_notebook,get_colab_url
pull_drive_notebook and push_local_notebook synchronize notebook files.
They send MCP progress notifications when the client supplies a progress token,
but clients decide whether and how to display those notifications. They never
execute notebook code. get_colab_url returns a URL but does not open a browser.
get_notebook_sync_status compares the local notebook's upload representation
with Drive's MD5 checksum and returns in_sync, differs, remote_only, or
unknown. It also returns Drive metadata such as modification time and version.
It cannot determine whether Colab is currently executing the notebook because
Google Drive does not expose Colab runtime activity.
Install
Run directly from PyPI with uvx:
Or install from source:
Run the server:
Local tools can access only .ipynb files below COLAB_MCP_ROOT.
The server is published in the official MCP Registry as:
Google Drive Setup
First call get_google_drive_status. It does not open a browser or modify
files. Its response explains the next required step.
To enable Drive:
- Create a Google Cloud project.
- Enable the Google Drive API.
- Configure the OAuth consent screen and add your account as a test user.
- Create an OAuth Client ID with application type Desktop app.
- Download the JSON to
~/.config/colab-mcp/credentials.json. - Call
authorize_google_driveand complete the Google sign-in flow.
The resulting token is stored at ~/.config/colab-mcp/token.json.
Override these locations with:
COLAB_MCP_GOOGLE_CREDENTIALSCOLAB_MCP_GOOGLE_TOKEN
Never commit OAuth credentials or tokens.
Drive Access Modes
The default mode is file, using Google's narrower drive.file scope:
This mode can access files created or explicitly opened by this OAuth app. It cannot reliably list all existing notebooks in a user's Drive.
To find and update existing Drive notebooks, explicitly enable full access:
Changing access modes may require deleting token.json and calling
authorize_google_drive again.
Codex Configuration
VS Code Configuration
Add this server to the VS Code MCP configuration:
Colab Compatibility
Google Colab may add a metadata property to stream outputs. That property is
invalid under the standard nbformat v4 schema. During Drive downloads, this
server removes only that incompatible property. Stream text and all other
outputs are preserved.
Security
- OAuth tokens stay on the local machine.
- Local tools are restricted to
COLAB_MCP_ROOT. - Authorization requires an explicit
authorize_google_drivecall. - Use
fileaccess unless full Drive discovery is required. - Review actions before overwriting an existing Drive file.
This project is not affiliated with or endorsed by Google.
Development
Source: README.md at commit 765e1b0
Tools
0Version history
1- v0.1.3LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts