kaggle-mcp
This server enables interaction with Kaggle through the following capabilities:
Search Kaggle datasets: Use
search_kaggle_datasetswith a query string to find datasets, returning details like title, reference, download count, and last updated date.Download Kaggle datasets: Use
download_kaggle_datasetwith a dataset reference to download and unzip dataset files.Generate EDA notebook prompts: Create structured prompts for AI models to generate Python code for Exploratory Data Analysis on specified datasets.
Enables running the MCP server in a containerized environment with Docker, maintaining Kaggle API credentials through environment variables.
Supports loading Kaggle API credentials from environment variables stored in a .env file.
Provides tools for searching and downloading Kaggle datasets, and generating prompts for exploratory data analysis (EDA) notebooks on specific datasets.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kaggle-mcp search for datasets about housing prices in California"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.jsonfile.Runs locally, in Docker, or through Smithery.
Related MCP server: Kaggle-MCP
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:
reftitlesubtitledownload_countlast_updatedusability_rating
download_kaggle_dataset(dataset_ref: str, download_path: str | None = None)
Downloads and unzips a Kaggle dataset.
dataset_ref: Kaggle dataset reference inowner/dataset-slugformat, for examplekaggle/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:
Select Create New API Token.
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_keyOption 2: kaggle.json
Place kaggle.json in the standard Kaggle location:
macOS/Linux:
~/.kaggle/kaggle.jsonWindows:
C:\Users\<Your User Name>\.kaggle\kaggle.json
On macOS/Linux, make sure the file is not world-readable:
chmod 600 ~/.kaggle/kaggle.jsonInstallation
git clone <repository-url>
cd kaggle-mcpCreate and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activateInstall dependencies with one of the following methods.
Using uv
uv syncUsing pip
pip install -r requirements.txtRunning Locally
With uv:
uv run kaggle-mcpOr run the server module directly:
python src/server.pyThe 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-mcpSmithery
This repository includes smithery.yaml. Smithery starts the server over stdio and passes these configuration values as environment variables:
kaggleUsername->KAGGLE_USERNAMEkaggleKey->KAGGLE_KEY
Example Workflow
Ask your MCP client: "Search Kaggle for heart disease datasets."
The client calls
search_kaggle_datasets.Choose a dataset reference from the results, for example
user/heart-disease-dataset.Ask: "Download
user/heart-disease-dataset."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.lockDownloaded datasets are saved under datasets/ by default. This directory is created at runtime when downloads are requested.
Available Tools
2 toolsdownload_kaggle_datasetC
Downloads files for a specific Kaggle dataset. Args: dataset_ref: The reference of the dataset (e.g., 'username/dataset-slug'). download_path: Optional. The path to download the files to. Defaults to '<project_root>/datasets/<dataset_slug>'.
Inputs: dataset_ref (required), download_path.
search_kaggle_datasetsC
Searches for datasets on Kaggle matching the query using the Kaggle API.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one downloads a specific dataset, while the other searches for datasets. There is no overlap in functionality, making it easy for an agent to choose the correct tool for each task without confusion.
Both tools follow a consistent verb_noun pattern (download_kaggle_dataset and search_kaggle_datasets), using snake_case and clear action verbs. This consistency makes the tool set predictable and easy to understand at a glance.
With only two tools, the server feels thin for a Kaggle integration, lacking essential operations like listing datasets, uploading data, or managing competitions. While the tools are functional, the scope is incomplete for typical Kaggle workflows, making the count too low for the domain.
The tool set is severely incomplete for a Kaggle MCP server. It covers downloading and searching datasets but misses critical operations such as uploading datasets, accessing competition data, or interacting with notebooks. This creates significant gaps that will hinder agents from performing common Kaggle tasks.
Maintenance
Related MCP Connectors
Access Pollinations models and API capabilities through agent tools.
Machine-readable utilities and datasets for AI agents.
List datasets, schemas, run APL queries, and use prompts for exploration, anomalies, and monitoring.
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables interaction with the Hugging Face Dataset Viewer API, allowing users to browse, search, filter, and analyze datasets hosted on the Hugging Face Hub.831MIT
- AlicenseNot gradedqualityDmaintenanceConnects Claude AI to the Kaggle API through the Model Context Protocol, enabling users to browse competitions, search and download datasets, analyze kernels, and access pre-trained models through natural language interactions.MIT
- AlicenseDqualityCmaintenanceEnables AI assistants to interact with Kaggle competitions, including listing competitions, downloading files, submitting predictions, and viewing submission history.410MIT
- AlicenseNot gradedqualityDmaintenanceA full-featured MCP server with 96 tools for the Kaggle API, enabling users to manage competitions, datasets, notebooks, models, discussions, and workflows via natural language.MIT