Skip to main content
kaggle-mcp logo

A full-featured MCP server wrapping the Kaggle API — 21 tools across competitions, datasets, kernels, models, and discussions.

PyPI License: MIT GitHub stars GitHub last commit

English | 中文

Why kaggle-mcp?

Kaggle provides an official remote MCP server (https://www.kaggle.com/mcp). Here's how kaggle-mcp compares:

Feature kaggle-mcp Kaggle Official MCP
Total tools 21 ~15
Discussions (search/list/detail/comments) ✅ 4 tools ❌
Dataset creation & file upload ✅ ❌
Architecture Local (stdio) Remote HTTP
Install uvx kaggle-mcp-server npx mcp-remote required
No remote MCP dependency ✅ ❌
Auth API token OAuth 2.0 / token

When to use kaggle-mcp: You need discussion tools, dataset creation/upload, or native stdio support without remote MCP dependency.

When to use the official MCP: You prefer OAuth 2.0 auth or want zero local installation.

kaggle-mcp architecture

Quick Navigation

Section Description
Prerequisites Kaggle API token setup
Installation uvx / pip / source
Configuration Claude Desktop, Claude Code, VS Code, Cursor
Tools (21) Competitions, Datasets, Kernels, Models, Discussions
Debugging MCP Inspector
Development Local development setup

Prerequisites

A Kaggle API token is required. You can authenticate using either method:

Option A: API Token (recommended)
  1. Go to https://www.kaggle.com/settings → API → Create New API Token
  2. Set the environment variable:
export KAGGLE_API_TOKEN="KGAT_xxxxxxxxxxxx"
Option B: kaggle.json

Download the token file from Kaggle settings, it will be saved to ~/.kaggle/kaggle.json:

{"username": "your_username", "key": "your_api_key"}

Installation

Note: MCP servers are launched automatically by MCP clients (Claude Code, VS Code, etc.) — you don't need to run them manually in the terminal. The commands below are what the client uses under the hood.

Using uvx (recommended)

No installation needed. uvx will automatically download and run the server:

# Used by MCP clients internally; no need to run this yourself
uvx kaggle-mcp-server

Using pip

pip install kaggle-mcp-server

From source

git clone https://github.com/Galaxy-Dawn/kaggle-mcp.git
cd kaggle-mcp
uv sync

Configuration

Claude Desktop

Add to your claude_desktop_config.json:

Using uvx (recommended)
{
  "mcpServers": {
    "kaggle": {
      "command": "uvx",
      "args": ["kaggle-mcp-server"],
      "env": {
        "KAGGLE_API_TOKEN": "KGAT_xxxxxxxxxxxx"
      }
    }
  }
}
Using pip
{
  "mcpServers": {
    "kaggle": {
      "command": "python",
      "args": ["-m", "kaggle_mcp.server"],
      "env": {
        "KAGGLE_API_TOKEN": "KGAT_xxxxxxxxxxxx"
      }
    }
  }
}

Claude Code

claude mcp add kaggle -- uvx kaggle-mcp-server

Or add to your project's .mcp.json (not settings.json):

{
  "mcpServers": {
    "kaggle": {
      "command": "uvx",
      "args": ["kaggle-mcp-server"],
      "env": {
        "KAGGLE_API_TOKEN": "KGAT_xxxxxxxxxxxx"
      }
    }
  }
}

VS Code

Install with UV in VS Code Install with UV in VS Code Insiders

Add to .vscode/mcp.json (note: the key is "servers", not "mcpServers"):

{
  "servers": {
    "kaggle": {
      "command": "uvx",
      "args": ["kaggle-mcp-server"],
      "env": {
        "KAGGLE_API_TOKEN": "KGAT_xxxxxxxxxxxx"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "kaggle": {
      "command": "uvx",
      "args": ["kaggle-mcp-server"],
      "env": {
        "KAGGLE_API_TOKEN": "KGAT_xxxxxxxxxxxx"
      }
    }
  }
}

Tip: If you already have KAGGLE_API_TOKEN in your shell environment (e.g. in .bashrc or .zshrc), you can omit the "env" block.

Tools (21)

Competitions (6)

Tool Description
competitions_list Search and list Kaggle competitions
competition_files List data files for a competition
competition_download Download competition data files
competition_submit Submit predictions to a competition
competition_submissions View submission history
competition_leaderboard View leaderboard (top 20)
Parameter details
  1. competitions_list — Search and list Kaggle competitions.

    • Inputs:
      • search (string, optional): Search term to filter competitions.
      • category (string, optional): Filter by category (e.g. featured, research, playground).
      • sort_by (string, optional): Sort order (latestDeadline, numberOfTeams, recentlyCreated).
      • page (integer, optional): Page number for pagination. Default 1.
    • Returns: List of competitions with title, ref, category, deadline, and team count.
  2. competition_files — List data files for a competition.

    • Inputs:
      • competition (string, required): Competition URL suffix (e.g. titanic).
    • Returns: List of file names and sizes.
  3. competition_download — Download competition data files. Returns download URL.

    • Inputs:
      • competition (string, required): Competition URL suffix.
      • file_name (string, optional): Specific file to download. Empty for all files.
    • Returns: Download URL.
  4. competition_submit — Submit predictions to a competition.

    • Inputs:
      • competition (string, required): Competition URL suffix.
      • blob_file_tokens (string, required): Blob file token from upload.
      • message (string, required): Submission description message.
    • Returns: Submission result details.
  5. competition_submissions — View submission history for a competition.

    • Inputs:
      • competition (string, required): Competition URL suffix.
    • Returns: List of submissions with date, score, status, and description.
  6. competition_leaderboard — View competition leaderboard (top 20).

    • Inputs:
      • competition (string, required): Competition URL suffix.
    • Returns: Top 20 team names and scores.

Datasets (6)

Tool Description
datasets_list Search and list Kaggle datasets
dataset_files List files in a dataset
dataset_download Download dataset files
dataset_metadata Get dataset metadata
dataset_create Create a new dataset
file_upload Upload a file to Kaggle
Parameter details
  1. datasets_list — Search and list Kaggle datasets.

    • Inputs:
      • search (string, optional): Search term.
      • sort_by (string, optional): Sort order (hottest, votes, updated, active).
      • file_type (string, optional): Filter by file type (csv, json, sqlite, etc).
      • page (integer, optional): Page number. Default 1.
    • Returns: List of datasets with title, ref, size, and download count.
  2. dataset_files — List files in a dataset.

    • Inputs:
      • owner (string, required): Dataset owner username.
      • dataset_slug (string, required): Dataset slug name.
    • Returns: List of file names and sizes.
  3. dataset_download — Download dataset files. Returns download URL.

    • Inputs:
      • owner (string, required): Dataset owner username.
      • dataset_slug (string, required): Dataset slug name.
      • file_name (string, optional): Specific file. Empty for all.
    • Returns: Download URL.
  4. dataset_metadata — Get dataset metadata.

    • Inputs:
      • owner (string, required): Dataset owner username.
      • dataset_slug (string, required): Dataset slug name.
    • Returns: Dataset metadata dictionary.
  5. dataset_create — Create a new dataset. Use file_upload first to get file tokens.

    • Inputs:
      • owner (string, required): Owner username.
      • slug (string, required): Dataset slug.
      • title (string, required): Dataset title.
      • file_tokens (string, optional): Comma-separated file tokens from file_upload.
      • license_name (string, optional): License (e.g. CC0-1.0, CC-BY-SA-4.0). Default CC0-1.0.
      • is_private (boolean, optional): Whether dataset is private. Default true.
    • Returns: Creation result details.
  6. file_upload — Upload a file to Kaggle and get a token for dataset_create.

    • Inputs:
      • file_name (string, required): File name (e.g. data.csv, config.json).
      • content (string, required): File content as text.
    • Returns: File token string.

Kernels (3)

Tool Description
kernels_list Search and list notebooks/kernels
kernel_pull Get a notebook's source code
kernel_push Push/save a notebook to Kaggle
Parameter details
  1. kernels_list — Search and list Kaggle notebooks/kernels.

    • Inputs:
      • search (string, optional): Search term.
      • competition (string, optional): Filter by competition.
      • dataset (string, optional): Filter by dataset.
      • sort_by (string, optional): Sort order (hotness, commentCount, dateCreated, dateRun, relevance, voteCount).
      • page (integer, optional): Page number. Default 1.
    • Returns: List of kernels with title, ref, votes, and language.
  2. kernel_pull — Get a notebook's source code.

    • Inputs:
      • user_name (string, required): Kernel owner username.
      • kernel_slug (string, required): Kernel slug name.
    • Returns: Kernel metadata and source code.
  3. kernel_push — Push/save a notebook to Kaggle.

    • Inputs:
      • title (string, required): Notebook title.
      • text (string, required): Notebook source code.
      • language (string, optional): Language (python, r). Default python.
      • kernel_type (string, optional): Type (notebook, script). Default notebook.
      • is_private (boolean, optional): Whether notebook is private. Default true.
    • Returns: Push result details.

Models (2)

Tool Description
models_list Search and list Kaggle models
model_get Get detailed model information
Parameter details
  1. models_list — Search and list Kaggle models.

    • Inputs:
      • search (string, optional): Search term.
      • owner (string, optional): Filter by owner.
      • sort_by (string, optional): Sort order (hotness, downloadCount, createTime, updateTime).
      • page_size (integer, optional): Number of results per page. Default 20.
    • Returns: List of models with title and ref.
  2. model_get — Get detailed information about a specific model.

    • Inputs:
      • owner (string, required): Model owner username.
      • model_slug (string, required): Model slug/name.
    • Returns: Model metadata dictionary.

Discussions (4)

Tool Description
discussions_search Search Kaggle discussions
discussions_list List discussions for a competition/dataset
discussion_detail Get discussion content by ID
discussion_comments Get comments for a discussion
Parameter details
  1. discussions_search — Search Kaggle discussions.

    • Inputs:
      • query (string, required): Search query string.
      • page_size (integer, optional): Number of results (max 50). Default 20.
    • Returns: List of discussions with ID, title, and votes.
  2. discussions_list — List discussions for a competition or dataset.

    • Inputs:
      • competition (string, optional): Competition slug to filter.
      • dataset (string, optional): Dataset ref to filter.
      • page_size (integer, optional): Number of results (max 50). Default 20.
    • Returns: List of discussions with ID, title, and votes.
  3. discussion_detail — Get discussion content by ID.

    • Inputs:
      • discussion_id (integer, required): Numeric discussion ID.
    • Returns: Discussion title, author, votes, forum, and body content.
  4. discussion_comments — Get comments for a discussion.

    • Inputs:
      • discussion_id (integer, required): Numeric discussion ID.
    • Returns: Link to discussion comments page.

Debugging

You can use the MCP Inspector to debug the server:

npx @modelcontextprotocol/inspector uvx kaggle-mcp-server

The Inspector will provide a URL to access debugging tools in your browser.

Development

git clone https://github.com/Galaxy-Dawn/kaggle-mcp.git
cd kaggle-mcp
uv sync

Then configure the server in your MCP client using the local path, or test with MCP Inspector.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for kaggle-mcp-server 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kaggle-mcp-server 0.2.0
File Size Uploaded Provenance Actions
kaggle_mcp_server-0.2.0.tar.gz 676.6 kB Without provenance Details for kaggle_mcp_server-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kaggle-mcp-server 0.2.0
File Interpreter ABI Platform Actions
kaggle_mcp_server-0.2.0-py3-none-any.whl Python 3 none any Details for kaggle_mcp_server-0.2.0-py3-none-any.whl

Total release size: 698.7 kB

Release files / kaggle_mcp_server-0.2.0.tar.gz

Download URL kaggle_mcp_server-0.2.0.tar.gz
Size 676.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cc236d2398a77a2b16e4df8777747c5ce828f903309bc04aa0352dd7a01319f7
BLAKE2b-256 checksum
How to use checksums
dc8d522b14c5c2699d61a9a70a84350fefc45e088e556d1f38cd7ba35f494f82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / kaggle_mcp_server-0.2.0-py3-none-any.whl

Download URL kaggle_mcp_server-0.2.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2449b01bb8dce45656ce8cbf8d0328ea35413e67a947ea07016e7bf0467c985
BLAKE2b-256 checksum
How to use checksums
9749a8a28757944335d022c6c15cb926cfc4a9d67c24f9990e2dd8eda00fa59c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for kaggle-mcp-server 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page