Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kaggle-kernel-tools

Full Kaggle integration for Claude Code — live kernel execution, file transfers, competition API, and more.

Two ways to use

Option A: MCP Server (recommended)

The kaggle-pro MCP server gives Claude Code 15 tools for full Kaggle control.

# Install
pip install -e /path/to/kaggle-kernel-tools

# Add to Claude Code
claude mcp add kaggle-pro kaggle-pro

Tools available:

Tool Description
set_kernel_url Set kernel proxy URL for live execution
set_competition Set active competition slug
get_session_info Show current session config
kernel_execute Execute Python code on remote kernel
kernel_health Check GPU, RAM, disk, files
kernel_download_file Download file from kernel
kernel_upload_file Upload file to kernel
submit Submit predictions to competition
leaderboard View competition leaderboard
my_submissions List your submissions
search_competitions Search/list competitions
search_datasets Search Kaggle datasets
search_kernels Search public notebooks
download_competition_data Download competition data
download_dataset Download a dataset

Option B: Claude Code Skills (legacy)

Copy skills to your project for slash-command access:

cp kaggle_exec.py /path/to/your/project/
cp -r .claude/commands/* /path/to/your/project/.claude/commands/

Skills: /set-kernel, /kernel-status, /download, /upload

Setup

1. Get your kernel proxy URL

  1. Open your Kaggle notebook
  2. Click Run (top-left) → Start Session
  3. Once running, click Run again → Kaggle Jupyter Server
  4. Copy the VSCode Compatible URL

It looks like:

https://kkb-production.jupyter-proxy.kaggle.net/k/<id>/<jwt>/proxy

2. Configure

# Option A: file (recommended)
echo "https://kkb-production...../proxy" > .kaggle_proxy_url

# Option B: env var
export KAGGLE_PROXY_URL="https://kkb-production...../proxy"

# Option C: via MCP tool
# Just ask Claude to use set_kernel_url

3. Kaggle API credentials

For API tools (submit, leaderboard, etc.), you need Kaggle API credentials:

# ~/.kaggle/kaggle.json should exist with your API token
# Get it from: kaggle.com → Account → Create New API Token

Security

  • .kaggle_proxy_url is in .gitignore — it contains a JWT token
  • The token expires when the kernel session ends (~12h idle)
  • Never commit proxy URLs to git

License

MIT

About

Claude Code skills for interacting with remote Kaggle Jupyter kernels via WebSocket

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages