Skip to main content
Glama

kaggle-mcp

CI PyPI Python License: MIT

A safety-first Model Context Protocol server connecting Claude (Desktop / Code) to Kaggle — competitions, datasets, kernels (notebooks), and models.

safe-kaggle-mcp is the only Kaggle MCP built safety-first. Every irreversible action — submit, delete, public-publish — is gated behind a two-call preview→commit confirm token, a per-competition submission budget surfaced in every response, and off-by-default destructive flags, while all Kaggle-returned text is fenced in <untrusted-content> and your credentials never enter the model context. Other servers chase tool count and the official remote server wins on zero-install convenience — but none of them, official included, gate a single destructive call, cap submissions, or harden against prompt injection. It trades raw breadth for the one thing an autonomous agent with your Kaggle account actually needs: it cannot quietly burn your daily submissions, leak your key, publish your private work, or be hijacked by a poisoned discussion thread.

claude mcp add --transport stdio kaggle -- uvx --from safe-kaggle-mcp kaggle-mcp

How it compares

Feature

safe-kaggle-mcp

Typical community server

Official remote / Composio

Two-call preview→commit confirm tokens (submit/delete/publish)

✅ Yes

❌ No (single-shot)

❌ No (single-shot)

Per-competition submission budget surfaced to the agent

✅ Yes (default 5/day)

❌ No

❌ No (opaque server quota)

Prompt-injection hardening (<untrusted-content> fencing)

✅ Yes

❌ No

❌ No

Private-by-default + off-by-default destructive/publish flags

✅ Yes

⚠️ Optional is_private param

❌ No

No in-chat authenticate() + 40-hex credential redaction

✅ Yes

❌ Some leak the key into context

⚠️ OAuth keeps key out, no redaction

Zip-slip-safe / sandboxed downloads

✅ Yes

❌ No

❌ Can't sandbox local writes

Callable local EDA tool (compact pandas digest, never raw rows)

✅ Yes (dataset + competition)

❌ EDA prompt at best

❌ No

Competition train/test schema diff + target auto-detect

✅ Yes

❌ No

❌ No

Competition landscape triage (days-left, budget, metric)

✅ Yes

❌ Thin raw list

❌ Raw fields, no digest

Submission best-score digest (metric-aware best/trend/failures)

✅ Yes

❌ Raw list

❌ Raw list

Leaderboard delta tracking (local snapshots + rank moves)

✅ Yes

❌ No

❌ No API endpoint either

Session audit ledger of mutating actions (redacted)

✅ Yes

❌ No

❌ No

Read-only discussion + write-up digest, injection-fenced

✅ Yes (untrusted-fenced)

⚠️ Yes but unfenced (Galaxy-Dawn)

⚠️ Unfenced

One-call competition kickoff (data + EDA + baseline plan)

✅ Yes

❌ No

❌ No

Output discipline (ranked/capped tables, pagination, top-N)

✅ Yes

❌ Undocumented

❌ Client's job

Modern KGAT_ token + legacy username/key auth

✅ Both

⚠️ Mostly legacy-only

✅ OAuth 2.0

Install

Local stdio (PyPI + git, uvx)

Local (pip/uv)

✅ Zero-install remote

Raw tool breadth

41 tools (no benchmark listing — API exposes none)

up to ~51

~35–57

The two honest places we don't lead: the official remote server is zero-install, and the broadest community server (Galaxy-Dawn, ~51 tools) has more raw endpoints (e.g. benchmarks). Where they expose ~10 forum tools unfenced, we expose read-only discussion search + read with every body fenced as <untrusted-content> — and no posting tool, because the API has none.

Related MCP server: Kaggle-MCP

What you can do with it

Drive your whole Kaggle workflow from a Claude chat, in plain language:

Ask Claude…

What happens under the hood

"Triage active competitions — prize, metric, days left."

kaggle_competition_landscape (one digested, deadline-sorted report)

"Download titanic data, infer the target, and do an EDA."

kaggle_eda_competition → train/test schema diff (auto-target) + compact pandas digest

"Find a good Titanic dataset and show me what it looks like."

kaggle_search_datasets → kaggle_dataset_preview (capped, untrusted-fenced rows)

"Summarize the iris dataset."

kaggle_eda_dataset → shape, dtypes, missingness, target dist, top correlations

"Submit predictions.csv to titanic and tell me the score."

kaggle_preview_submission → kaggle_submit_to_competition (token + budget gate) → kaggle_get_submission_score

"Is it worth iterating — what's my best score so far?"

kaggle_submission_best_score (metric-aware best/trend/failures + today's budget)

"Did anyone pass me on the leaderboard since last check?"

kaggle_leaderboard_track (snapshot deltas, who passed you)

"What techniques are people discussing for this competition?"

kaggle_search_discussions → kaggle_get_discussion (read-only, every post untrusted-fenced)

"Find the winning solution write-ups for this competition."

kaggle_search_writeups → kaggle_get_discussion

"Kick off this competition for me."

kaggle_competition_kickoff — one call: metric + rules + data download + train/test EDA (auto-target) + baseline plan + budget

"What mutating actions have I taken this session?"

kaggle_audit_log (redacted ledger of every submit/create/delete)

"Run this notebook on Kaggle's free GPU and get the output."

kaggle_push_kernel → kaggle_kernel_status → kaggle_kernel_output

"Save my engineered features as a private dataset version."

kaggle_version_dataset — private by default

Higher-order workflows the agent chains itself: an autonomous competition loop (download → train → submit → read score → iterate, within the daily budget), Kaggle as a remote GPU/TPU backend, and cross-run memory via private dataset versions. Every irreversible step is gated, so the agent can run autonomously without risking your account.

What it won't do (honest limits)

Some competitors advertise capabilities the public Kaggle API can't actually deliver. We refuse to ship dishonest stubs:

  • No posting to forums/discussions. The API can read topics but has no create/reply/vote endpoint — so we don't pretend to.

  • No private-leaderboard or final-rank prediction. Private scores are withheld until the deadline; our tools label scores as public-only.

  • No historical leaderboard from Kaggle. There's no such endpoint — kaggle_leaderboard_track diffs against snapshots you captured locally, and says so.

  • No hidden test labels / private splits. We only ever serve files the competition exposes.

Install

# fastest: install + register with Claude Code
claude mcp add --transport stdio kaggle -- uvx --from safe-kaggle-mcp kaggle-mcp

# or straight from this repo (no PyPI):
claude mcp add --transport stdio kaggle -- uvx --from git+https://github.com/parkseokjune/kaggle-mcp kaggle-mcp

# or for development
uv sync --extra dev && uv run kaggle-mcp

The PyPI distribution is safe-kaggle-mcp (the name kaggle-mcp was taken); the command it installs is still kaggle-mcp, so launch it with uvx --from safe-kaggle-mcp kaggle-mcp.

Get a token at https://www.kaggle.com/settings → API → Create New Token. Both schemes work (resolved in order):

# 1) legacy username/key (env or ~/.kaggle/kaggle.json)
export KAGGLE_USERNAME=your_user
export KAGGLE_KEY=your_40_char_key

# 2) current API token (KGAT_...): the client reads it automatically
mkdir -p ~/.kaggle && echo "KGAT_..." > ~/.kaggle/access_token && chmod 600 ~/.kaggle/access_token

Claude Desktop — edit claude_desktop_config.json, then fully restart:

{ "mcpServers": { "kaggle": {
  "command": "uvx", "args": ["--from", "safe-kaggle-mcp", "kaggle-mcp"],
  "env": { "KAGGLE_USERNAME": "your_user", "KAGGLE_KEY": "your_key" } } } }

Safety switches (default OFF → read-only / private posture)

Env var

Default

Effect when 1

KAGGLE_MCP_ENABLE_DESTRUCTIVE

0

Exposes kaggle_delete_dataset / kaggle_delete_model

KAGGLE_MCP_ENABLE_PUBLISH

0

Allows creating public datasets

KAGGLE_MCP_SUBMISSION_CAP

5

Per-competition daily submission budget

Even when enabled, each destructive call still needs a one-time confirm_token from its *_preview_* tool, and is recorded in kaggle_audit_log.

Tools

41 tools across account, competitions, datasets, discussions, kernels, models — plus kaggle:// resources (metadata, leaderboard, rules) and /kaggle-eda, /kaggle-submit-checklist, /kaggle-landscape, /kaggle-solution-research prompts. Run kaggle_status to see your auth + submission budget.

Verified live against the Kaggle API (kaggle 2.2.2) with both auth schemes; 53 offline + 6 live read-only tests pass.

Develop

uv run pytest                              # offline unit + integration tests
KAGGLE_LIVE=1 uv run pytest tests/test_live_readonly.py   # live read-only smoke (needs creds)
uv run mcp dev src/kaggle_mcp/server.py    # MCP Inspector

License

MIT

Available Tools

41 tools
kaggle_accept_competition_rulesA

There is NO API to accept competition rules (it is a legal agreement). This returns the rules URL and instructs the user to accept it manually in the browser. It NEVER auto-accepts.

Inputs: competition (required). Returns: object

kaggle_audit_logA
Read-only

Return the session's append-only ledger of mutating actions (submit / create / version / delete) with timestamps and the submission budget at the time — every field redacted. Makes the safety machinery inspectable, which no other Kaggle MCP can offer (none track tokens or budgets).

Inputs: limit. Returns: object

kaggle_competition_kickoffA

One-call competition kickoff: fetch the metric/deadline/rules, download the data if rules are accepted (otherwise tell you to accept first), run a train/test EDA with target auto-detection, and return a baseline plan plus your remaining submission budget. Collapses the manual setup ritual into a single decision-ready bundle — no other Kaggle MCP does this.

Inputs: competition (required). Returns: object

kaggle_competition_landscapeA
Read-only

Pre-digested triage report of competitions: for each, the slug, prize, evaluation metric, deadline, and days_left — sorted by soonest deadline so you can decide what to enter at a glance. A single decision-ready artifact rather than raw endpoint output (which is what other Kaggle MCPs return).

Inputs: limit, search, category, include_ended. Returns: object

kaggle_competition_leaderboardA
Read-only

Public leaderboard capped to top-N (default 20) to protect context.

Inputs: competition (required), top_n. Returns: object

kaggle_create_datasetA

Create a NEW dataset from a local folder. PRIVATE by default. Making it public requires KAGGLE_MCP_ENABLE_PUBLISH=1 AND a confirm_token from a preview. Async — returns 'queued'; poll kaggle_dataset_status. The folder must contain a valid dataset-metadata.json (id, title, licenses).

Inputs: folder (required), public, confirm_token. Returns: object

kaggle_dataset_previewA

Safe first-N-rows preview of a dataset CSV — headers, dtypes, and up to n (<=50) width-capped rows, wrapped as untrusted content. 'What does the data look like?' without dumping the whole file or unbounded rows.

Inputs: dataset (required), n, file. Returns: object

kaggle_dataset_statusB
Read-only

Poll the processing status of a dataset create/version op. Read-only.

Inputs: dataset (required). Returns: object

kaggle_delete_datasetA
Destructive

Delete a dataset and ALL its versions — IRREVERSIBLE. Disabled unless the server was started with KAGGLE_MCP_ENABLE_DESTRUCTIVE=1, AND requires a confirm_token. Never defaults to yes.

Inputs: dataset (required), confirm_token (required). Returns: object

kaggle_delete_modelA
Destructive

Delete a model — IRREVERSIBLE. Disabled unless KAGGLE_MCP_ENABLE_DESTRUCTIVE=1, and requires a confirm_token from kaggle_preview_delete_model.

Inputs: model (required), confirm_token (required). Returns: object

kaggle_download_competition_filesA

Download competition data into an isolated work dir (zip auto-extracted with a zip-slip guard). Returns local paths + metadata, NOT file contents. Requires the competition's rules accepted (403 otherwise).

Inputs: competition (required), file, unzip. Returns: object

kaggle_download_datasetA

Download a dataset (or single file) into an isolated work dir; zip auto-extracted with a zip-slip guard. Returns local paths + metadata.

Inputs: dataset (required), file, unzip. Returns: object

kaggle_download_modelA

Download a specific model instance version's artifacts into a work dir. model_version is 'owner/model/framework/variation/version'. Returns paths.

Inputs: model_version (required). Returns: object

kaggle_eda_competitionA

Download a competition's data and return a pre-first-submission view: a compact pandas digest per CSV (shape/dtypes/missingness/correlations) PLUS a train-vs-test column diff that auto-infers the target — the orientation no other Kaggle MCP ships. Requires the competition rules accepted (403 else).

Inputs: competition (required), target, max_files. Returns: object

kaggle_eda_datasetA

Download a dataset and return a COMPACT exploratory summary — shape, dtypes, missingness, target distribution, and top numeric correlations — computed locally with pandas. Never streams raw rows into context. This is the 'find data -> understand it' primitive that most Kaggle MCP servers lack (they dump raw files or just emit a prompt). dataset is 'owner/slug'.

Inputs: dataset (required), file, target, max_files. Returns: object

kaggle_get_competitionA
Read-only

Fetch one competition's details and a truncated, untrusted-wrapped rules digest. competition is the BARE slug (e.g. 'titanic'). Read-only.

Inputs: competition (required). Returns: object

kaggle_get_dataset_metadataA
Read-only

Fetch a dataset's metadata + file listing. dataset is 'owner/slug'. Description text is untrusted-wrapped and truncated. Read-only.

Inputs: dataset (required). Returns: object

kaggle_get_discussionA
Read-only

Read a discussion topic's messages. Each message body is fenced as and truncated. READ-ONLY — no reply/comment/vote.

Inputs: topic_id (required), max_messages. Returns: object

kaggle_get_modelA
Read-only

Fetch a model's metadata and instances/variations. model is 'owner/slug'. Description is untrusted-wrapped. Read-only.

Inputs: model (required). Returns: object

kaggle_get_submission_scoreA
Read-only

Poll the newest submission until scoring completes (bounded polling with backoff — NOT a hot loop) and return its public score. Closes the submit loop.

Inputs: competition (required), timeout_s, interval_s. Returns: object

kaggle_kernel_outputC

Download a completed kernel's output files and logs into a local work dir. Log tail is untrusted-wrapped and truncated. Read-only fetch.

Inputs: kernel (required), file_pattern. Returns: object

kaggle_kernel_statusB
Read-only

Poll a kernel run's status (running|complete|error|cancelAcknowledged).

Inputs: kernel (required). Returns: object

kaggle_leaderboard_trackA
Read-only

Snapshot the public top-N and diff it against the LAST snapshot you took: per-team rank deltas, new entrants, biggest climbers, and (if your_team is given) your movement + who passed you. Kaggle has no historical-leaderboard endpoint, so this stateful local tracking is unique. PUBLIC leaderboard only; deltas are vs your previous snapshot, not an absolute time series.

Inputs: competition (required), top_n, your_team. Returns: object

kaggle_list_competitionsA
Read-only

List/triage competitions as a compact ranked table (title, slug, prize, deadline, evaluation metric, category). Paginated. Read-only.

Inputs: page, group, search, sort_by, +2 more. Returns: object

kaggle_list_kernelsA
Read-only

List/search notebooks (kernels) as a compact table. Paginated. Read-only.

Inputs: mine, page, search, sort_by, +3 more. Returns: object

kaggle_list_modelsA
Read-only

List/search published models as a compact table. Paginated. Read-only.

Inputs: page, owner, search, sort_by, +1 more. Returns: object

kaggle_list_submissionsB
Read-only

List submission history with status and scores. Read-only.

Inputs: competition (required), limit. Returns: object

kaggle_preview_delete_datasetA
Read-only

Issue a confirm_token for an irreversible dataset delete. No side effects.

Inputs: dataset (required). Returns: object

kaggle_preview_delete_modelB
Read-only

Issue a confirm_token for an irreversible model delete. No side effects.

Inputs: model (required). Returns: object

kaggle_preview_publish_datasetB
Read-only

Issue a confirm_token to publish a dataset publicly. Surfaces that the data WILL become world-visible. No side effects.

Inputs: folder (required). Returns: object

kaggle_preview_submissionA
Read-only

Dry-run a submission: validate the file exists/size, report the budget impact, and return a single-use confirm_token required by kaggle_submit_to_competition. No side effects.

Inputs: message (required), file_path (required), competition (required). Returns: object

kaggle_pull_kernelA

Pull a kernel's source (and optionally metadata) into a local work dir. Source code is untrusted-wrapped and truncated. kernel is 'owner/slug'.

Inputs: kernel (required), with_metadata. Returns: object

kaggle_push_kernelA

Push (create/update AND queue-run) a notebook from a local folder, using Kaggle's free GPU/TPU. Requires a valid kernel-metadata.json. PRIVATE by default (set is_private:true in metadata). Async — poll kaggle_kernel_status.

Inputs: folder (required). Returns: object

kaggle_search_datasetsB
Read-only

Search datasets; return top ~10 as a compact ranked table (ref, title, downloads, updated, usability) — not raw JSON. Paginated.

Inputs: search (required), page, sort_by, file_type, +1 more. Returns: object

kaggle_search_discussionsA
Read-only

Search/list Kaggle discussion topics. Returns a compact table (title, author, votes, comments, forum, url). READ-ONLY — there is intentionally no post/reply/vote tool (the API has none). Titles are external untrusted text; drill into a thread with kaggle_get_discussion(topic_id).

Inputs: search, sort_by, category, page_size. Returns: object

kaggle_search_writeupsA
Read-only

Search competition SOLUTION write-ups — the post-competition explanations of what actually won. The highest-signal source for strategy research; pairs with the /kaggle-solution-research prompt. Read-only and untrusted-fenced; drill into one with kaggle_get_discussion(topic_id). Powered by the Kaggle 'competition_write_ups' discussion category.

Inputs: search, sort_by, page_size. Returns: object

kaggle_statusA
Read-only

Health check: credential validity, current per-competition submission budgets for this session, enabled safety switches, and the work-dir root.

Inputs: no named parameters. Returns: object

kaggle_submission_best_scoreA
Read-only

Reduce raw submission history to the decision signal: best public score (respecting metric direction), first/best/latest trend, today's submission count, and any failure reasons — the 'is it worth iterating?' answer other servers leave as a raw list. Public scores only (private score is hidden until the deadline).

Inputs: competition (required), higher_is_better. Returns: object

kaggle_submit_to_competitionA
Destructive

Submit a predictions file. GATED: requires a valid confirm_token from kaggle_preview_submission AND available submission budget (~5/day/team). Consumes a daily slot — hard to undo. Returns submission status + remaining budget.

Inputs: message (required), file_path (required), competition (required), confirm_token (required). Returns: object

kaggle_version_datasetA

Push a new version/revision of an existing dataset from a local folder (persists engineered features across runs). Async; non-destructive (adds a version).

Inputs: folder (required), version_notes (required), delete_old_versions. Returns: object

kaggle_whoamiA
Read-only

Return the authenticated Kaggle username and credential source.

Does not transmit or echo the API key. Use to confirm the server resolved credentials for the expected account.

Inputs: no named parameters. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 41 tools

    Disambiguation5/5

    Each tool targets a distinct resource or action, with detailed descriptions that clearly differentiate them. For example, kaggle_get_competition, kaggle_competition_landscape, and kaggle_competition_leaderboard serve different purposes (details, triage, leaderboard). There is no ambiguity.

    Naming Consistency4/5

    All tools share the kaggle_ prefix and use underscore-separated names. Most follow a verb_noun pattern (e.g., kaggle_get_competition, kaggle_list_datasets), but some are noun-first (e.g., kaggle_competition_landscape, kaggle_competition_leaderboard). This minor inconsistency does not hinder readability.

    Tool Count3/5

    With 41 tools, the server covers a broad Kaggle domain (competitions, datasets, kernels, discussions, models). While each tool has a clear purpose, the count is at the high end considering the scope. A more streamlined set could reduce cognitive load.

    Completeness5/5

    The tool surface is remarkably complete for Kaggle workflows, covering competition lifecycle (list, get, download, EDA, submit, track), dataset management (search, create, version, delete), kernels (push/pull/status/output), discussions (search/get), models (list/download/delete), and admin (auth, audit, status). Obvious gaps like discussion posting are due to API limitations.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers