⚡ vspagent
Universal Google Colab MCP Engine & Remote Cloud GPU Orchestration SDK.
vspagent gives any Python app, web server, or CLI instant access to free/pro Google Colab Cloud GPUs (Tesla T4, A100, V100) via the Model Context Protocol (MCP) with zero local VRAM/GPU requirements.
🌟 Key Features
- 🔗 Zero-Configuration Colab MCP Handshake: Automatically manages the
colab-mcpstdio subprocess and JSON-RPC lifecycle. - 👤 Cross-Platform Chrome Profile Detection: Detects all signed-in Google/Gmail accounts across Linux native, WSL, Windows, and macOS, opening pairing in the exact profile chosen.
- 🚀 Remote GPU Execution: Programmatically injects, executes, polls, and deletes code cells on Google Colab with structured output and traceback handling.
- 🔌 Pre-Built Web Framework Adapters:
- FastAPI: One-line
include_router(get_colab_router())providing ready-to-use/colab/status,/colab/accounts,/colab/connect,/colab/executeendpoints. - Flask: One-line
register_blueprint(get_colab_blueprint())supporting synchronous multi-threaded Flask servers.
- FastAPI: One-line
- 🖥️ Built-in CLI: Interactive terminal utility with live account discovery, status dashboards, and code execution.
- 🪶 Ultra-Lightweight: Zero local PyTorch, CUDA, or transformers dependencies. Local package size is under 1MB.
📦 Installation
pip install vspagent
For web framework support:
# With FastAPI support
pip install "vspagent[fastapi]"
# With Flask support
pip install "vspagent[flask]"
# With all integrations
pip install "vspagent[all]"
🛠️ Quickstart
1. Python SDK
import asyncio
from vspagent import ColabClient
async def main():
colab = ColabClient()
# Connect with preferred Chrome profile (or Default)
print("Connecting to Google Colab...")
await colab.connect_browser(profile_directory="Default")
# Wait until user approves pairing in Chrome tab
await colab.ensure_connected(timeout=60.0)
print(f"Connected! GPU: {colab.gpu_info}")
# Execute code on remote cloud GPU
code = """
import torch
print("Hello from Colab GPU:", torch.cuda.get_device_name(0))
"""
res = await colab.execute_code(code, keep_cell=False)
print("Output:\n", res["output"])
asyncio.run(main())
2. FastAPI Web Integration (e.g. Vibe-ML-Studio, Vibe-MI-Stdio)
Mount the pre-built router directly onto your FastAPI application:
from fastapi import FastAPI
from vspagent.colab.integrations import get_colab_router
app = FastAPI(title="My GPU-Accelerated Service")
# Mounts /colab/status, /colab/accounts, /colab/connect, /colab/execute
app.include_router(get_colab_router(), prefix="/api")
3. Flask Web Integration (e.g. Karaoke Extractor)
from flask import Flask
from vspagent.colab.integrations import get_colab_blueprint
app = Flask(__name__)
# Mounts /colab/status, /colab/accounts, /colab/connect, /colab/execute
app.register_blueprint(get_colab_blueprint(), url_prefix="/api/colab")
4. Interactive Terminal CLI
# 1. Discover available Google / Chrome accounts
vspagent colab accounts
# 2. Check connection status and GPU hardware
vspagent colab status
# 3. Interactively connect to Colab tab
vspagent colab connect
# 4. Execute Python code directly on remote Colab GPU
vspagent colab exec -c "import torch; print(torch.cuda.is_available())"
# Or run a complete Python script file
vspagent colab exec -f ./train_decision_model.py
📄 License
MIT License © Vishnu Suresh Perumbavoor
Metadata
Release files for vspagent 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vspagent-3.0.0.tar.gz | 17.4 kB | Without provenance | Details for vspagent-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vspagent-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for vspagent-3.0.0-py3-none-any.whl |
Total release size: 36.2 kB
Release files / vspagent-3.0.0.tar.gz
| Download URL | vspagent-3.0.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b8a650f068efd6417c2fd1163b2bbf775e61beb3cb478d757309d9f21399903
|
|
BLAKE2b-256 checksum How to use checksums |
60ab95fbb9f80d6facc907feb43ff2a5876f66ecc392485be7fce713e8451339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / vspagent-3.0.0-py3-none-any.whl
| Download URL | vspagent-3.0.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cf47d9050acde43990b4d3eb2be37e500df11758d46a266e01102a840d56ed80
|
|
BLAKE2b-256 checksum How to use checksums |
814b70dbb5e2fdf7ade9c7163585f0a7aadfc39559bcb071243bd2bac09a1984
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for vspagent 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.