Get the FREE Ultimate OpenClaw Setup Guide →

kaggle

MCP server for Kaggle

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio arrismo-kaggle-mcp uvx kaggle-mcp \
  --env KAGGLE_KEY="your_kaggle_api_key" \
  --env KAGGLE_USERNAME="your_kaggle_username"

How to use

This Kaggle MCP server provides tooling to search Kaggle datasets, download selected datasets, and generate a ready-to-use prompt for creating an Exploratory Data Analysis (EDA) notebook. The available tools are: 1) search_kaggle_datasets(query: str) which returns the top Kaggle datasets that match the query with details like reference, title, download counts, and last updated date; 2) download_kaggle_dataset(dataset_ref: str, download_path: str | None = None) which downloads and unzips the chosen dataset into a local directory (defaulting to ./datasets/<dataset_slug>/); and 3) generate_eda_notebook(dataset_ref: str) which creates a prompt you can give to a code-generation model to produce a basic EDA notebook for the specified dataset. To use the server, start it with the command shown in the README (uv run kaggle-mcp) and then issue the tool calls via an MCP client or compatible interface. Ensure your Kaggle credentials are available either as environment variables or via a kaggle.json file so the server can access Kaggle resources.

How to install

Prerequisites:

  • Python 3.8+ or a compatible uv environment
  • JavaScript-free environment for Python-based MCP (uv/uvx) or a container if using Docker
  • Kaggle API credentials (KAGGLE_USERNAME and KAGGLE_KEY) or kaggle.json placed in the default location
  1. Clone the repository git clone <repository-url> cd <repository-directory>

  2. Create and activate a virtual environment (recommended) python -m venv venv source venv/bin/activate # macOS/Linux venv\Scripts\activate # Windows

  3. Install dependencies Using pip: pip install -r requirements.txt Alternatively, with uv: uv sync

  4. Set up Kaggle API credentials

    • Environment variables (recommended): Create a .env file and add: KAGGLE_USERNAME=your_kaggle_username KAGGLE_KEY=your_kaggle_api_key
    • kaggle.json method: place kaggle.json in ~/.kaggle/kaggle.json (Linux/macOS) or C:\Users<User>.kaggle\kaggle.json (Windows)
  5. Run the MCP server uv run kaggle-mcp

  6. Optional: prepare for Docker usage Build or pull any required images as per the Docker section in the README, ensuring Kaggle credentials are provided to the container as environment variables.

Additional notes

Tips and common notes:

  • The server relies on Kaggle API credentials; ensure KAGGLE_USERNAME and KAGGLE_KEY are available to the process running the MCP server.
  • If you prefer Docker, you can pass credentials via an env file as described in the README's Docker section.
  • The download_path for datasets defaults to ./datasets/<dataset_slug>/ relative to the server script location; you can override it by providing a download_path when calling download_kaggle_dataset.
  • If you encounter rate limits or authentication errors from Kaggle, verify that the kaggle.json file is valid and that API tokens are active.
  • The EDA notebook prompt generated by generate_eda_notebook(dataset_ref) is intended for use with a code-generation model (e.g., Claude, Gemini) and should be adapted to your data and project structure after generation.

Related MCP Servers

Sponsor this space

Reach thousands of developers