Sandbox
@arrismo/kaggle-mcp

MCP server for Kaggle dataset search and download

This repository exposes Kaggle dataset search, download, and EDA prompt generation through MCP. An agent can call the server to find datasets, fetch them locally, and ask for a starting analysis prompt without leaving the chat.

39 stars8 forksPythonUpdated 3mo ago
Who it's for

Builders who want their agent to search Kaggle datasets, download them, and draft EDA prompts.

What it delivers

You can move from dataset search to local files and a starter analysis prompt inside one agent session.

What it does

Search Kaggle datasets

Searches Kaggle by keyword and returns up to 10 dataset results as JSON.

Download and unzip datasets

Fetches a Kaggle dataset by `owner/dataset-slug` reference and saves it locally.

Generate an EDA prompt

Creates a prompt for basic Python exploratory analysis, including loading, missing-value checks, plots, and summary stats.

Use Kaggle credentials locally or in a file

Reads Kaggle API credentials from environment variables or the standard `kaggle.json` location.

Run in multiple setups

Works locally over stdio, in Docker, or through Smithery.

How to get it

  1. 1Run
    git clone <repository-url>
    cd kaggle-mcp
  2. 2Create and activate a virtual environment
    python -m venv .venv
    source .venv/bin/activate  # Windows: .venv\Scripts\activate
  3. 3Run
    uv sync
  4. 4Run
    pip install -r requirements.txt

README

Kaggle MCP Server

Kaggle MCP Server

A Model Context Protocol (MCP) server that exposes Kaggle dataset search, download, and EDA prompt generation to MCP clients such as Claude Desktop.

Features

  • Search Kaggle datasets by keyword.
  • Download and unzip Kaggle datasets locally.
  • Generate a starter Exploratory Data Analysis (EDA) prompt for a Kaggle dataset.
  • Supports Kaggle credentials via environment variables or the standard kaggle.json file.
  • Runs locally, in Docker, or through Smithery.

Available MCP Capabilities

Tools

search_kaggle_datasets(query: str)

Searches Kaggle for datasets matching query and returns up to 10 results as JSON.

Returned fields include:

  • ref
  • title
  • subtitle
  • download_count
  • last_updated
  • usability_rating

download_kaggle_dataset(dataset_ref: str, download_path: str | None = None)

Downloads and unzips a Kaggle dataset.

  • dataset_ref: Kaggle dataset reference in owner/dataset-slug format, for example kaggle/titanic.
  • download_path: Optional local output path. If omitted, files are saved to ./datasets/<dataset_slug>/.

Prompts

generate_eda_notebook(dataset_ref: str)

Creates a prompt for generating basic Python EDA code for the provided Kaggle dataset reference. The prompt asks for data loading, missing-value checks, visualizations, and summary statistics.

Requirements

  • Python 3.10+
  • Kaggle account and API token
  • An MCP-compatible client

Kaggle Credentials

Create a Kaggle API token from your Kaggle account settings:

  1. Go to https://www.kaggle.com/settings.
  2. Select Create New API Token.
  3. Download kaggle.json.

Use either environment variables or the standard Kaggle config file.

Option 1: Environment variables

Create a .env file in the project root:

KAGGLE_USERNAME=your_kaggle_username
KAGGLE_KEY=your_kaggle_api_key

Option 2: kaggle.json

Place kaggle.json in the standard Kaggle location:

  • macOS/Linux: ~/.kaggle/kaggle.json
  • Windows: C:\Users\<Your User Name>\.kaggle\kaggle.json

On macOS/Linux, make sure the file is not world-readable:

chmod 600 ~/.kaggle/kaggle.json

Installation

git clone <repository-url>
cd kaggle-mcp

Create and activate a virtual environment:

python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

Install dependencies with one of the following methods.

Using uv

uv sync

Using pip

pip install -r requirements.txt

Running Locally

With uv:

uv run kaggle-mcp

Or run the server module directly:

python src/server.py

The server communicates over MCP stdio and is intended to be launched by an MCP client.

Claude Desktop Configuration

Open Claude Desktop settings, then go to Developer > Edit Config and add this server to claude_desktop_config.json.

If installed in the project environment:

{
  "mcpServers": {
    "kaggle-mcp": {
      "command": "uv",
      "args": ["run", "kaggle-mcp"],
      "cwd": "/absolute/path/to/kaggle-mcp",
      "env": {
        "KAGGLE_USERNAME": "your_kaggle_username",
        "KAGGLE_KEY": "your_kaggle_api_key"
      }
    }
  }
}

If using kaggle.json, you can omit the env block.

Docker

Build the image:

docker build -t kaggle-mcp .

Run with credentials from .env:

docker run --rm -i --env-file .env kaggle-mcp

Smithery

This repository includes smithery.yaml. Smithery starts the server over stdio and passes these configuration values as environment variables:

  • kaggleUsername -> KAGGLE_USERNAME
  • kaggleKey -> KAGGLE_KEY

Example Workflow

  1. Ask your MCP client: "Search Kaggle for heart disease datasets."
  2. The client calls search_kaggle_datasets.
  3. Choose a dataset reference from the results, for example user/heart-disease-dataset.
  4. Ask: "Download user/heart-disease-dataset."
  5. Ask: "Generate an EDA notebook prompt for user/heart-disease-dataset."

Project Structure

.
├── Dockerfile
├── README.md
├── pyproject.toml
├── requirements.txt
├── smithery.yaml
├── src/
│   ├── __init__.py
│   └── server.py
└── uv.lock

Downloaded datasets are saved under datasets/ by default. This directory is created at runtime when downloads are requested.

Files in the repo

Repository payload9 top-level entries
  • src
  • .gitignore
  • Dockerfile
  • LICENSE
  • pyproject.toml
  • README.md
  • requirements.txt
  • smithery.yaml
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k