link2kaggle-colab-mcp
Enables submitting Python/notebook jobs to Google Colab, selecting Colab as a provider, checking quota/resources, and managing job lifecycle including status, logs, download, and cancel, with real GPU/CCU work gated by explicit settings.
Enables submitting Python/notebook jobs to Kaggle, selecting Kaggle as a provider, checking quota/resources, and managing job lifecycle including status, logs, download, and cancel where supported.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@link2kaggle-colab-mcp recommend a provider for my training script and submit it in mock mode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Link2Kaggle-Colab
Local MCP server and CLI to submit jobs to Kaggle and Google Colab from your machine.
English | 简体中文
Status
v1.0.0 — initial public release on main (changelog).
Default mode is mock: no real account, network, GPU, or Colab compute units (CCU).
Real GPU/CCU submit needs both
mode: realandallow_real_jobs: true.Mock quota / balance / membership text is a TEST FIXTURE, not a live account.
Related MCP server: mcp-server-colab-exec
Features
Providers: Kaggle, Google Colab, and offline
fakerunnerSurfaces: SDK (
link2kaggle_colab.Client), CLI (l2kc), stdio MCP serverScheduler: recommend / auto placement with quota-aware guards
Jobs: SQLite job manager, list / reconcile, idempotency keys
Multi-account: credential references in config (paths / env / keyring), no secrets in YAML
Piece | Name |
Distribution |
|
Import package |
|
SDK |
|
CLI |
|
MCP (stdio) |
|
Skill |
|
Quick start
python3 -m venv .venv
.venv/bin/pip install -e '.[dev]'
.venv/bin/l2kc doctor
.venv/bin/l2kc quota
.venv/bin/l2kc submit examples/train_example.py --provider fakeLocal CI gate:
make ci
# or: ./scripts/ci.shl2kc doctor prints a MOCK MODE line on stderr (not part of --json stdout). Linux/WSL notes: docs/linux-wsl-setup.md.
Safety
Connect only trusted MCP clients. Downloads are confined to artifact_root (default ./l2kc-artifacts); paths outside that root raise PathSecurityError. In the MCP process, local fake exec is off unless L2KC_ALLOW_FAKE_EXEC=1. Real billed work is double-gated (mode: real + allow_real_jobs: true).
See SECURITY.md and docs/known-limitations.md.
MCP setup (Cursor / stdio)
{
"mcpServers": {
"link2kaggle-colab": {
"command": "link2kaggle-colab-mcp"
}
}
}From a virtualenv:
{
"mcpServers": {
"link2kaggle-colab": {
"command": ".venv/bin/python",
"args": ["-m", "link2kaggle_colab.mcp"]
}
}
}Canonical tools use the gpu_* prefix (also registered as l2kc_*). Agent guidance: skills/link2kaggle-colab/SKILL.md.
Real mode (spend warning)
Real Kaggle/Colab auth and GPU/CCU jobs can cost money or quota. Read docs/real-auth-setup.md before enabling:
mode: realin configallow_real_jobs: truefor any GPU/CCU submit
Either flag alone does not submit billed work. Default CI never burns GPU or Colab CCU.
Docs index
Doc | Topic |
Trust boundary, reporting | |
Dev setup, | |
Limitations and Won't-Fix | |
Mock defaults | |
Real credentials | |
Multi-account | |
Design overview | |
Linux/WSL | |
Version history | |
Config template |
CLI (cheat sheet)
Global options go before the subcommand: l2kc --config ./l2kc.yaml doctor.
Command | Purpose |
| Mode, state dir, CLI presence, auth (does not run |
| Providers and fixtures (mock) or live reads (real) |
| Pick a backend; does not submit |
| Submit |
| Job lifecycle |
| Accounts and local job store |
Known errors print error[<code>]: <message> on stderr and exit 2. Full flag lists: run l2kc --help / l2kc submit --help.
Limitations (short)
Mock quotas are fixtures; default Colab CCU rates are unverified.
Kaggle cancel is
not_supported(official CLI has no cancel).Remote MCP transports are refused; stdio only.
Some premium accelerators need a real-account check.
Full list: docs/known-limitations.md.
License
Available Tools
30 toolsgpu_auth_statusC
Auth snapshots. Mock data are TEST FIXTURES, not a live account.
account reads that account only. There is no automatic rotation.
Inputs: account, provider. Returns: object
gpu_cancel_jobC
Cancel a job. Mock data are TEST FIXTURES, not a live account.
Kaggle's official CLI cannot cancel a running kernel.
Inputs: job_id (required). Returns: object
gpu_doctorB
Local doctor report. Mock data are TEST FIXTURES, not a live account.
Does not execute kaggle or colab. CLI presence is shutil.which.
Inputs: no named parameters. Returns: object
gpu_download_artifactsC
Download artifacts under artifact_root. Mock data are TEST FIXTURES.
Inputs: job_id (required), dest_dir. Returns: object
gpu_get_job_logsC
Tail of the job log. Mock data are TEST FIXTURES, not a live account.
Inputs: job_id (required), max_chars. Returns: object
gpu_get_job_statusD
Job state. Mock data are TEST FIXTURES, not a live account.
Inputs: job_id (required). Returns: object
gpu_get_quotaB
Quota snapshots. Mock data are TEST FIXTURES, not a live account.
account reads that account only. There is no automatic rotation.
refresh drops the per-account quota cache entry before reading.
Inputs: account, refresh, provider. Returns: object
gpu_list_accountsA
List accounts. Mock data are TEST FIXTURES, not a live account.
Credential values are not included. Quota exhaustion does not rotate to another account of the same provider.
Inputs: no named parameters. Returns: object
gpu_list_jobsB
List stored jobs. Mock data are TEST FIXTURES, not a live account.
This does not call a provider and does not submit. limit defaults to
50. Pass null to return every match.
Inputs: limit, state, provider. Returns: object
gpu_list_providersB
List providers. Mock data are TEST FIXTURES, not a live account.
Inputs: no named parameters. Returns: object
gpu_list_resourcesC
Accelerators. Memory is per GPU. Mock data are TEST FIXTURES, not a live account.
account lists that account only. There is no automatic rotation.
When quota publishes eligible_gpus, each row includes eligible.
Inputs: account, provider. Returns: object
gpu_recommend_backendA
Recommend a backend without submitting. Mock data are TEST FIXTURES, not a live account.
A premium GPU needs scheduler.allow_premium_gpu plus allow_premium.
Colab needs timeout_seconds so the CCU budget can be checked.
provider auto lets the scheduler choose. account pins that
account and does not rotate on quota. Per-GPU memory is never summed
across devices.
Inputs: account, gpu_type, high_mem, provider, +4 more. Returns: object
gpu_reconcile_jobsA
Poll job status. Mock data are TEST FIXTURES, not a live account.
Omit job_ids to poll every active job, including UNKNOWN.
Reconcile never submits and never resubmits an ambiguous job.
Inputs: job_ids. Returns: object
gpu_refresh_quotaB
Refresh quota snapshots. Mock data are TEST FIXTURES, not a live account.
Equivalent to gpu_get_quota(..., refresh=True).
Inputs: account, provider. Returns: object
gpu_submit_jobA
Submit a script. Mock data are TEST FIXTURES, not a live account.
provider auto asks the scheduler to choose. A premium GPU needs
scheduler.allow_premium_gpu plus allow_premium. high_mem maps
to Colab --high-mem (CPU/T4/A100/H100/G4; not L4/TPU) and does not
bypass premium guards. Colab needs
timeout_seconds so the CCU budget can be checked. Real jobs also
require mode: real and allow_real_jobs. idempotency_key returns
the existing job instead of submitting again when the spec matches. A
different spec is an invalid-input error. deduplicated is true when
the existing job is returned. An ambiguous submit is not resubmitted.
account pins that account. Quota exhaustion does not rotate to
another account. dry_run recommends a backend and does not submit.
Inputs: script_path (required), name, account, dry_run, +8 more. Returns: object
l2kc_auth_statusC
Auth snapshots. Mock data are TEST FIXTURES, not a live account.
account reads that account only. There is no automatic rotation.
Inputs: account, provider. Returns: object
l2kc_cancel_jobB
Cancel a job. Mock data are TEST FIXTURES, not a live account.
Kaggle's official CLI cannot cancel a running kernel.
Inputs: job_id (required). Returns: object
l2kc_doctorC
Local doctor report. Mock data are TEST FIXTURES, not a live account.
Does not execute kaggle or colab. CLI presence is shutil.which.
Inputs: no named parameters. Returns: object
l2kc_download_artifactsC
Download artifacts under artifact_root. Mock data are TEST FIXTURES.
Inputs: job_id (required), dest_dir. Returns: object
l2kc_get_job_logsC
Tail of the job log. Mock data are TEST FIXTURES, not a live account.
Inputs: job_id (required), max_chars. Returns: object
l2kc_get_job_statusC
Job state. Mock data are TEST FIXTURES, not a live account.
Inputs: job_id (required). Returns: object
l2kc_get_quotaC
Quota snapshots. Mock data are TEST FIXTURES, not a live account.
account reads that account only. There is no automatic rotation.
refresh drops the per-account quota cache entry before reading.
Inputs: account, refresh, provider. Returns: object
l2kc_list_accountsB
List accounts. Mock data are TEST FIXTURES, not a live account.
Credential values are not included. Quota exhaustion does not rotate to another account of the same provider.
Inputs: no named parameters. Returns: object
l2kc_list_jobsA
List stored jobs. Mock data are TEST FIXTURES, not a live account.
This does not call a provider and does not submit. limit defaults to
50. Pass null to return every match.
Inputs: limit, state, provider. Returns: object
l2kc_list_providersB
List providers. Mock data are TEST FIXTURES, not a live account.
Inputs: no named parameters. Returns: object
l2kc_list_resourcesC
Accelerators. Memory is per GPU. Mock data are TEST FIXTURES, not a live account.
account lists that account only. There is no automatic rotation.
When quota publishes eligible_gpus, each row includes eligible.
Inputs: account, provider. Returns: object
l2kc_recommend_backendA
Recommend a backend without submitting. Mock data are TEST FIXTURES, not a live account.
A premium GPU needs scheduler.allow_premium_gpu plus allow_premium.
Colab needs timeout_seconds so the CCU budget can be checked.
provider auto lets the scheduler choose. account pins that
account and does not rotate on quota. Per-GPU memory is never summed
across devices.
Inputs: account, gpu_type, high_mem, provider, +4 more. Returns: object
l2kc_reconcile_jobsA
Poll job status. Mock data are TEST FIXTURES, not a live account.
Omit job_ids to poll every active job, including UNKNOWN.
Reconcile never submits and never resubmits an ambiguous job.
Inputs: job_ids. Returns: object
l2kc_refresh_quotaB
Refresh quota snapshots. Mock data are TEST FIXTURES, not a live account.
Equivalent to gpu_get_quota(..., refresh=True).
Inputs: account, provider. Returns: object
l2kc_submit_jobB
Submit a script. Mock data are TEST FIXTURES, not a live account.
provider auto asks the scheduler to choose. A premium GPU needs
scheduler.allow_premium_gpu plus allow_premium. high_mem maps
to Colab --high-mem (CPU/T4/A100/H100/G4; not L4/TPU) and does not
bypass premium guards. Colab needs
timeout_seconds so the CCU budget can be checked. Real jobs also
require mode: real and allow_real_jobs. idempotency_key returns
the existing job instead of submitting again when the spec matches. A
different spec is an invalid-input error. deduplicated is true when
the existing job is returned. An ambiguous submit is not resubmitted.
account pins that account. Quota exhaustion does not rotate to
another account. dry_run recommends a backend and does not submit.
Inputs: script_path (required), name, account, dry_run, +8 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Every tool has an exact duplicate under a different prefix (gpu_ vs l2kc_), with identical descriptions. An agent cannot determine which of the two identical-looking tools to call, making the set highly ambiguous despite unique underlying functions.
Within each prefix, tools follow a clear verb_noun pattern (list_providers, submit_job, get_job_status). However, maintaining two parallel prefixes for identical functionality creates an inconsistent naming scheme that is readable but confusing.
30 tools is too many for the apparent scope, especially since half are duplicates. There are only about 15 unique operations, so the effective surface is reasonable but inflated to 30 by aliases.
The tool surface covers provider/account/auth/quota listing, resource listing, job submission, status, logs, artifacts, cancellation, listing, reconciliation, backend recommendation, and doctor checks. Minor gaps like direct job deletion or detail retrieval may exist, but core lifecycle operations are present.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseBqualityDmaintenanceLocal-first MCP server for controlling Google Colab as a development, shell, file, and training runtime, with tools for notebook editing, GPU acceleration, and file transfer.599Apache 2.0
- AlicenseAqualityDmaintenanceMCP server that allocates Google Colab GPU runtimes (T4/L4) and executes Python code on them. Lets any MCP-compatible AI assistant run GPU-accelerated code without local GPU hardware.39MIT
- AlicenseNot gradedqualityFmaintenanceEnables AI agents and CLI users to drive Kaggle notebooks end-to-end—pull, edit, save new versions, run, monitor, and fetch logs—using a local stdio MCP server with a Kaggle API token.MIT
- AlicenseBqualityCmaintenanceLets any MCP-compatible agent use Google Colab or Jupyter runtimes as an execution backend, enabling code execution, notebook management, package installation, hardware introspection, training jobs, and file handling.401MIT