KA

Kaggle MCP Server: Competitions, Datasets, Models

Access Kaggle competitions, datasets, kernels, and models via an MCP server with seamless Kaggle API integration for MCP-compatible clients like Claude Desktop

Quick Install
npx -y @Seif-Sameh/Kaggle-mcp.git

Overview

The Kaggle MCP Server wraps the Kaggle API behind a Model Context Protocol (MCP)–compatible HTTP server so MCP-enabled clients (for example, Claude Desktop) can discover and interact with Kaggle competitions, datasets, kernels (notebooks), and models as first‑class tools. Instead of manually switching between a web browser and an LLM interface, the server exposes Kaggle resources programmatically through lightweight endpoints that return tool definitions and resource payloads usable by MCP clients.

This server is useful when you want to integrate Kaggle content into automated workflows, research assistants, or LLM-based development environments. It handles authentication against Kaggle, surfaces commonly used queries (search competitions, list datasets, fetch kernels), and serves file download links or metadata without forcing each client to implement the Kaggle API itself.

Features

  • Exposes Kaggle Competitions, Datasets, Kernels (notebooks), and Models as MCP-compatible tools
  • Seamless Kaggle API authentication using standard Kaggle credentials (kaggle.json or env vars)
  • Endpoints to search, list, inspect, and download Kaggle resources
  • Lightweight HTTP server suitable for local use, CI jobs, or as a private service
  • Intended for integration with MCP-capable clients such as Claude Desktop

Installation / Configuration

Clone the repository and choose an installation method (Docker or local runtime). The server requires valid Kaggle credentials.

Clone the repo:

git clone https://github.com/Seif-Sameh/Kaggle-mcp.git
cd Kaggle-mcp

Obtain credentials

  • Visit your Kaggle account -> “Create API Token” to download kaggle.json
  • Either place kaggle.json at ~/.kaggle/kaggle.json or export environment variables KAGGLE_USERNAME and KAGGLE_KEY

Example: set credentials with environment variables

export KAGGLE_USERNAME="your_kaggle_username"
export KAGGLE_KEY="your_kaggle_key"

Run with Docker (recommended for isolation)

# build
docker build -t kaggle-mcp:latest .

# run (exposes service on 3000)
docker run -d -p 3000:3000 \
  -e KAGGLE_USERNAME=$KAGGLE_USERNAME \
  -e KAGGLE_KEY=$KAGGLE_KEY \
  --name kaggle-mcp kaggle-mcp:latest

Run locally (Node.js example)

# install dependencies
npm ci

# configure env and start
export PORT=3000
export KAGGLE_USERNAME="your_kaggle_username"
export KAGGLE_KEY="your_kaggle_key"
npm start

If the repository uses Python, the equivalent steps are:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export KAGGLE_USERNAME="..."
export KAGGLE_KEY="..."
python server.py

Quick test (after server starts)

curl http://localhost:3000/health
# or list tools
curl http://localhost:3000/tools

Common environment variables

VariablePurposeDefault
KAGGLE_USERNAMEKaggle username or use kaggle.jsonrequired
KAGGLE_KEYKaggle API keyrequired
PORTHTTP port to listen on3000
LOG_LEVELServer log verbosityinfo

Available Resources

The server exposes a set of MCP-compatible tools that map to Kaggle concepts. Each tool usually supports query/list/get operations and returns metadata, preview text, and download links.

  • Competitions: search competitions, retrieve description, leaderboard info, and data files
  • Datasets: search datasets, list files, download dataset archives or individual files
  • Kernels (notebooks): list kernels for a dataset/competition, fetch kernel metadata and source
  • Models: list Kaggle models, fetch model metadata and artifacts
  • Files: download raw files (CSV, images, notebooks, model weights) through proxied links

Example endpoint mapping (typical)

EndpointPurpose
GET /toolsList available MCP tools
GET /tools/competitionsSearch or list competitions
GET /tools/datasetsSearch or list datasets
GET /tools/kernelsFetch kernels for given dataset/competition
GET /download?path=…Proxy/download a specific Kaggle file

Note: exact endpoint paths may vary; consult the server’s /tools or /openapi endpoint after startup to discover its live API.