Repository navigation
Releases
Releases · NguyenQuocDat06-AI/kaggle-shell-mcp
v1.1.0 — Onboarding, Jupyter Proxy Attach, MCP 2026, Chunked Transfer & Warm TUI
Added
- Zero-to-One Onboarding, 8-Layer Diagnostics & Safe MCP Setup (
onboarding.py,server.py):- Added
kgsh init(interactive &--non-interactivecredential setup with live Kaggle token validation, automaticKGAT_...username resolution, and atomic0600.envwrites). - Added
kgsh doctor [--comp <slug>] [--no-net] [--json]executing 8 zero-GPU-cost checks (Python/SDK versions, credentials & live auth, Kaggle API/phone verification & weekly GPU/TPU quota, optional competition rules check,trycloudflare.comreachability, GitHub Releases reachability, prebuiltkgsh-tuiavailability, and orphan running GPU kernel detection). - Added
kgsh setup <claude|cursor|windsurf|codex|antigravity> [--dry-run] [--config <path>]to safely merge thekgshMCP server block into JSON or TOML configs with atomic0600.bakbackups and zero secret leaks.
- Added
- MCP 2026
ToolAnnotations& Livekaggle_upProgress (server.py,launcher.py):- Annotated all 14 MCP tools with MCP 2026
ToolAnnotations(readOnlyHint,destructiveHint,idempotentHint,openWorldHint) compatible with bothmcpv1 and v2. - Upgraded
kaggle_uptoasyncwith livectx.report_progress(...)stage updates across kernel push, container boot, tunnel handshake, and readiness polling.
- Annotated all 14 MCP tools with MCP 2026
- Interactive Notebook Attach Mode (
attach.py,launcher.py,worker_template.py,server.py,bridge.py,tui/):- Added
kgsh attach <jupyter_proxy_url> [-s <slot>] [-f]CLI command andkaggle_attachMCP tool (14th tool) to attach to an already-running Kaggle Interactive Notebook without consuming an extra headless commit slot. - Uses a zero-dependency Python stdlib RFC 6455 TLS WebSocket client over Jupyter Server's
/api/kernels+/channelsAPI to bootstrapworker_template.py(ATTACHED=True, no cloudflared/watchdog) on port8765, then deletes the temporary kernel so notebook state stays untouched. kgsh down/kaggle_downand TUIxcleanly detach attached sessions without pushing over or deleting the interactive notebook (even when local Kaggle API credentials are unset);kgsh uidisplays[ATTACHED]badges across the header, Remote pane, status bar, and Workers modal.
- Added
- Chunked Resumable Transfer & RAM-Only
SecretsVault(client.py,sync.py,worker_template.py,server.py):- Added
/fs/upload_chunkand/fs/download_range(default16 MiBchunks, per-chunkSHA-256verification, atomic.partfinalize withEXDEVcross-device copy fallback,X-Total-Sizelock, and automatic HTTP 404 fallback for older workers), enabling reliable multi-GB checkpoint/dataset transfers through Cloudflare Quick Tunnels with a20 GiBdisk-backed streaming tar ceiling. - Added in-memory
SecretsVault(/secrets/set,/secrets/list,/secrets/clear) andkgsh secret set/list/clearCLI (KEY=VALUE, interactivegetpass,--from-env NAME,--stdin NAME). Secrets live strictly in worker RAM (never written to disk), inject into PTY sessions (MAX_CANON-safe<=2048 Blines underset +o historywithmarker_seenversion gating) and background jobs, and are redacted longest-first from PTY outputs, job logs, and events.
- Added
- Warm TUI Bridge Daemon,
FileEditorv2 & Transfer Progress HUD (bridge.py,tui/):- Added persistent NDJSON-RPC
python -m kaggle_mcp.bridge --daemonsidecar with deadlock-free stderr draining, automatic one-shot fallback when busy (>500 ms) or unsupported, and one-time auto-restart—cutting TUI Kaggle API actions from ~1s cold Python startup to sub-100ms warm calls. - Upgraded
FileEditorwith 100-snapshot bounded Undo/Redo (Ctrl+Z,Ctrl+Y,Ctrl+Shift+Z), incremental Unicode-safe Find bar (Ctrl+F,Enter/F3,Shift+F3,Esccloses Find bar first), andunicode-width = "0.2"visual column/mouse hit-testing for Vietnamese combining marks and CJK characters. - Implemented full chunked upload/download parity in
tui/src/worker.rs(pure-Rust FIPS 180-4 SHA-256,X-Upload-Filename-B64, streaming20 GiBtar cap) with a liveMB / total (%)transfer progress HUD and instantEsccancellation (CancelToken+.partcleanup).
- Added persistent NDJSON-RPC
Security
- SSRF IP-Pinned Attach & Local Proxy Token Redaction (
attach.py,client.py,worker.rs):- Rejects loopback, private, link-local, CGNAT (
100.64.0.0/10), multicast, reserved, metadata hostnames, and IPv6 transition addresses (IPv4-mapped, 6to4, Teredo, NAT64) before pinning the resolved IP on both HTTPS (httpcore/httpx) and TLS WebSocket (SNI) connections; local clients (attach.py,client.py,tui/src/worker.rs) scrub/k/<id>/<token>proxy paths across status outputs, diagnostics, and errors.
- Rejects loopback, private, link-local, CGNAT (
- Vault Injection & Atomic Config Hardening (
worker_template.py,onboarding.py):- Blocks dangerous env override keys (
LD_PRELOAD,LD_LIBRARY_PATH,PYTHONPATH,PYTHONSTARTUP,PYTHONBREAKPOINT,BASH_ENV,ENV,PATH, etc.) with HTTP403on/secrets/set, redacts active vault secrets longest-first across worker PTY/job/event outputs, scrubsKGAT_*& secret env values before formatting onboarding diagnostics, and uses POSIXO_EXCL+ nonce + short-write-safe atomic writes (0600) with atomic0600.bakbackups inonboarding.py.
- Blocks dangerous env override keys (
Install / Upgrade
pip install -U kaggle-shell-mcp
# or
uv tool upgrade kaggle-shell-mcpFull Changelog: v1.0.1...v1.1.0
v1.0.1 — Reliability, Security & Multi-Platform TUI Hotfixes
Highlights in v1.0.1
Added
- Linux ARM64 (�arch64 static musl) &
ustls Prebuilt TUI: Added kgsh-tui-linux-aarch64.tar.gz alongside linux-x86_64, windows-x86_64, macos-arm64, and macos-x86_64, plus KGSH_TUI_BIN override. - SSH-Ready Clipboard (OSC 52 + Internal Yank Buffer + Bracketed Paste) & Multi-GPU HUD: Preserves Ctrl+X/Ctrl+C/Ctrl+V on headless SSH servers without X11/Wayland, displays all GPUs (GPU0, GPU1, ..., °C), and adds modal scrolling on compact terminals.
- Offline Batch Auto-Harvest & Run-Scoped Batch Slugs: Automatically copies newly created/modified outputs (submission.csv, checkpoints/) from /tmp/kgsh_batch_work into /kaggle/working on exit and isolates batch runs under /kgsh-batch--.
Fixed & Hardened
- Safe Remote FileEditor: 256 KB cap, automatic Read-Only lock on truncated/binary files, unsaved-change Esc guard, and HTTP 412 overwrite protection.
- 3-Tier Verified kaggle_down & Provisioning Persistence: Never wipes sessions.json while a GPU VM is still running; supports --force (orce=True) cancellation and resumes provisioning boots without pushing duplicate kernel versions.
- Security: Default credential exclusion (.env*, kaggle.json, private keys) on s_sync/Push, child-env secret scrubbing,
v1.0.0 — Native Rust Dual-Panel TUI & Prebuilt Releases
kaggle-shell-mcp v1.0.0
Highlights
- Native Rust 60-FPS Dual-Panel TUI Cockpit (kgsh ui / kgsh top):
- 4 dual-panel presets (F1 Cockpit, F2 Files, F3 Jobs, F4 Hub), Yazi-style arrow navigation, cross-panel clipboard & transfers, preview drawer, Smart Inspector (.csv/.parquet/.zip/.safetensors/.pt), Kaggle Hub browser, and Boot Profiles.
- Real-time foreground loop tailing (pty_live on /monitor + /term/interrupt) and clean content-only Shift/Ctrl+Shift & mouse drag text selection.
- Zero-Setup Prebuilt Binary Auto-Download ( ui_bin.py,
elease-tui.yml):- PyPI / uv tool users can run kgsh ui without a Rust toolchain; kgsh downloads the matching Windows/Linux/macOS binary from GitHub Releases with SHA-256 verification.
- MCP & CLI: 13 MCP tools + SSH-style REPL (kgsh shell) + Offline Competition Runner (L4x4 / RTX Pro 6000 + Host SSE logs).
v0.2.0 — Multi-Slot GPU VMs & Offline Competition Runner
Changelog
All notable changes to kaggle-shell-mcp (kgsh) will be documented in this file.
[0.2.0] - 2026-11-25
Added
- Multi-Slot Concurrent GPU Architecture (
slot="1","2","1,2"):- Run up to 2 parallel headless Kaggle GPU sessions simultaneously (
4 × Tesla T4 = 60 GB VRAM) with isolated kernel slugs, isolated handshake datasets, and a cross-process file-locked.kaggle_mcp/sessions.jsonstore (auto-migrating legacyactive_session.json). - Added per-job GPU pinning (
gpu_ids/--gpus) injob_spawnvia isolatedCUDA_VISIBLE_DEVICES, enabling up to 4 concurrent single-GPU experiments across 2 Dual-T4 VMs. - Added
slot="all"support inkaggle_statusandkaggle_down, plus automatic stale-session cleanup when Kaggle reports terminal kernel states (COMPLETE,ERROR,CANCEL_ACKNOWLEDGED).
- Run up to 2 parallel headless Kaggle GPU sessions simultaneously (
- Full Hardware Accelerator, Competition & Model Hub Support (
accelerators.py):- Added
acceleratoraliases and passthrough shapes (NvidiaTeslaT4,NvidiaL4,NvidiaL4x4,NvidiaRtxPro6000,NvidiaH100,TpuV5E8,TpuV6E8,cpu). - Automatic TPU runtime window adjustment (
8h35mSIGTERMdrain /8h40mclean exit before Kaggle's 9h TPU cap). - Added
competition(competition_sources) andmount_models(model_sources) parameters with immediate source-validation error reporting fromApiSaveKernelResponse.
- Added
- Offline Competition Runner & Live Host SSE Logs (
batch.py):kaggle_wheelhouse(kgsh wheels): Builds Linuxmanylinux_x86_64binary wheel datasets for air-gapped kernels.kaggle_batch_run(kgsh batch-run): Runs competition jobs withenable_internet=Falseusing atomic inline code embedding (<= 512 KB) or.kgshdataset archives (> 512 KB, preventing Kaggle auto-decompression races).kaggle_batch_logs(kgsh batch-logs): Non-blocking windowed Host SSE log reader (kernels_logs_stream) that streams live logs even when container internet access is disabled.
[0.1.0] - 2026-11-24
Added
- Headless 12h Kaggle Dual-T4 Provisioner (
kaggle_up,kaggle_status,kaggle_down): Boots background Kaggle GPU kernels (NvidiaTeslaT4, 2×15 GB VRAM) via Kaggle API with zero browser interaction. - Zero-Setup Tunnel & Private Dataset Handshake: Automatic
cloudflaredQuick Tunnel supervisor paired with private Kaggle Dataset state sync (<user>/kaggle-mcp-state), plus optional Tailscale userspace networking (TS_AUTHKEY). - Stateful Remote PTY (
term_exec): Persistent/bin/bashPTY preservingcwd, shell exports, Conda/venv environments, and native CUDA paths. - Detached Background Job Engine (
job_spawn,job_list,job_logs,job_kill): Process-group isolated training jobs with persistent logs in/kaggle/working/mcp_logsand automatictqdmcarriage-return (\r) compaction. - Filtered Tar Streaming (
fs_sync): Fast bidirectional directory/file sync ignoring.git,.venv,__pycache__, andnode_modules. - Snapshot & Optional Idle Watchdogs: Graceful
SIGTERMcheckpoint flush at11h35m+ cleanexit(0)at11h40m(preserving/kaggle/workingsnapshots before Kaggle's 12h reaper), plus opt-in idle GPU auto-shutdown (idle_timeout_min, disabled by default). - Dual Interface: Full Model Context Protocol (
stdio) server (mcpv1 & v2 compatible) and shortkgshCLI (kaggle-shell-mcp&kaggle-mcpaliases included).