# Kaggle — how to use (mcp.ai)

Connect your Kaggle account and use 35 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Kaggle is a platform for data science and machine learning competitions, offering datasets, notebooks, and a collaborative community.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_kaggle?ms=1787295900000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `kaggle_competition_download_files`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/kaggle`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/kaggle/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/kaggle/competition/download/files` — Downloads all data files for a Kaggle competition as a single zip archive. Returns a downloadable file object. Note: You must have accepted the competition's rules on Kaggle's website before downloadi
  - body: { id: string, path?: string, force?: boolean, quiet?: boolean }
- `POST https://api.mcp.ai/api/kaggle/competition/submit` — Submit an entry to a Kaggle competition using a previously uploaded file. Prerequisites: 1. You must have accepted the competition rules on Kaggle's website 2. You must have uploaded your submission f
  - body: { competition: string, blob_file_tokens: string, submission_description: string }
- `POST https://api.mcp.ai/api/kaggle/config/dir` — Tool to retrieve the directory of the Kaggle API configuration file. Use when you need to locate the directory containing your kaggle.json credentials.
  - body: { prefer_xdg?: boolean, platform_hint?: string, use_fallback_only?: boolean, xdg_config_home_override?: string, override_kaggle_config_dir?: string }
- `POST https://api.mcp.ai/api/kaggle/config/init` — Initialize Kaggle API client configuration. This action sets up the necessary configuration file for Kaggle API access by first attempting to use the Kaggle CLI's 'kaggle config init' command. If the 
- `POST https://api.mcp.ai/api/kaggle/config/keys` — Tool to list local Kaggle API configuration keys. Use when you need to see which configuration options are set without revealing values.
- `POST https://api.mcp.ai/api/kaggle/config/path` — Tool to retrieve local Kaggle API configuration file path. Use when you need to know the location of the Kaggle config before operations.
  - body: { prefer_xdg?: boolean, platform_hint?: string, use_fallback_only?: boolean, xdg_config_home_override?: string, override_kaggle_config_dir?: string }
- `POST https://api.mcp.ai/api/kaggle/config/reset` — Tool to reset local Kaggle CLI configuration to defaults. Clears CLI-managed keys ('competition', 'path', 'proxy').
- `POST https://api.mcp.ai/api/kaggle/config/set` — Tool to set a Kaggle CLI configuration parameter. Use when updating local CLI settings such as default download path or proxy. Ensure Kaggle CLI is installed.
  - body: { name: string, value: string }
- `POST https://api.mcp.ai/api/kaggle/config/unset` — Tool to unset a Kaggle CLI configuration parameter. Use when removing local CLI settings such as default download path or proxy. Ensure Kaggle CLI is installed.
  - body: { name: string }
- `POST https://api.mcp.ai/api/kaggle/config/view` — View local Kaggle API credentials and configuration settings. This action reads Kaggle configuration from local sources (does NOT make API calls to Kaggle). Configuration is retrieved in the following
- `POST https://api.mcp.ai/api/kaggle/dataset/create` — Create a new Kaggle dataset with metadata. IMPORTANT: Dataset creation requires at least one data file. Ensure files are uploaded before calling this action. The 'id' field must use your authenticated
  - body: { id: string, files?: object[], title: string, keywords?: string[], licenses: object[], subtitle?: string, resources?: object[], description?: string }
- `POST https://api.mcp.ai/api/kaggle/dataset/init` — Tool to initialize a dataset-metadata.json file in a local folder. Use when preparing a dataset folder before uploading to Kaggle.
  - body: { path?: string }
- `POST https://api.mcp.ai/api/kaggle/dataset/list/files` — Tool to list files in a Kaggle dataset. Use when you need to retrieve paginated file listings by owner and dataset slugs, with optional version and paging controls.
  - body: { page_size?: integer, owner_slug: string, page_token?: string, dataset_slug: string, dataset_version_number?: string }
- `POST https://api.mcp.ai/api/kaggle/dataset/status` — Check the processing status of a Kaggle dataset after creation or version update. This endpoint is used to monitor datasets that are currently being processed by Kaggle's servers. It returns status in
  - body: { owner_slug: string, dataset_slug: string }
- `POST https://api.mcp.ai/api/kaggle/dataset/version` — Create a new version of an existing Kaggle dataset. Prerequisites: - You must own the dataset or have edit permissions - Files must be uploaded first to obtain upload tokens (required for the 'files' 
  - body: { files: object[], subtitle?: string, owner_slug: string, description?: string, category_ids?: string[], dataset_slug: string, version_notes: string, convert_to_csv?: boolean, delete_old_versions?: boolean }
- `POST https://api.mcp.ai/api/kaggle/download/competition/file` — Tool to download a specific data file from a Kaggle competition. Use when you need to retrieve a single file from a competition by specifying the competition slug and filename. Note: You must have acc
  - body: { id: string, fileName: string }
- `POST https://api.mcp.ai/api/kaggle/download/competition/leaderboard` — Tool to download the entire competition leaderboard as a CSV file packaged in a ZIP archive. Use when you need to analyze or review competition standings and scores.
  - body: { id: string, path?: string, force?: boolean }
- `POST https://api.mcp.ai/api/kaggle/download/dataset` — Tool to download all files from a Kaggle dataset as a zip archive. Supports downloading specific versions by providing the dataset_version_number parameter.
  - body: { owner_slug: string, dataset_slug: string, dataset_version_number?: string }
- `POST https://api.mcp.ai/api/kaggle/download/dataset/file` — Tool to download a specific file from a Kaggle dataset. Use when you need to retrieve a single file from a dataset by specifying the owner, dataset, and filename.
  - body: { file_name: string, owner_slug: string, dataset_slug: string, dataset_version_number?: string }
- `POST https://api.mcp.ai/api/kaggle/generate/competition/submission/url` — Tool to generate a pre-signed URL for uploading competition submission files. Use this before uploading your submission file to Kaggle. This action generates a temporary upload URL and token for submi
  - body: { id: string, fileName?: string, contentLength: integer, lastModifiedDateUtc: integer }
- `POST https://api.mcp.ai/api/kaggle/get/dataset/metadata` — Tool to get comprehensive metadata for a Kaggle dataset including title, description, licenses, and tags. Use when you need detailed information about a dataset's structure, schema, or properties.
  - body: { owner_slug: string, dataset_slug: string }
- `POST https://api.mcp.ai/api/kaggle/get/model` — Tool to get a Kaggle model's details including metadata and description. Use when you need information about a specific model on Kaggle.
  - body: { model_slug: string, owner_slug: string }
- `POST https://api.mcp.ai/api/kaggle/get/model/instance` — Tool to get details for a specific Kaggle model instance (variation). Returns metadata including overview, usage instructions, download URL, version information, and license details. Use when you need
  - body: { framework: string, model_slug: string, owner_slug: string, variation_slug: string }
- `POST https://api.mcp.ai/api/kaggle/kernel/init` — Initialize a kernel-metadata.json template file in a specified folder. This file is required before pushing/uploading a kernel to Kaggle. The template includes default values for kernel configuration 
  - body: { path?: string }
- `POST https://api.mcp.ai/api/kaggle/kernel/output` — Tool to download the output of a Kaggle kernel. Use when needing the latest kernel results locally.
  - body: { path?: string, force?: boolean, user_name: string, kernel_slug: string }
- `POST https://api.mcp.ai/api/kaggle/kernels/status` — Get the execution status of a Kaggle kernel (notebook). Returns current status (running, complete, error), timestamps, and output URL. Use this to monitor kernel execution after pushing/submitting a k
  - body: { userName: string, kernelSlug: string }
- `POST https://api.mcp.ai/api/kaggle/list/competition/files` — Tool to list all data files available for a Kaggle competition. Use when you need to retrieve file names, sizes, and metadata for competition datasets before downloading.
  - body: { id: string }
- `POST https://api.mcp.ai/api/kaggle/list/competitions` — Tool to list available Kaggle competitions with filters and pagination. Use when you need to discover competitions, search by keywords, or filter by category, group, and sorting options.
  - body: { page?: integer, group?: string, search?: string, sortBy?: string, category?: string }
- `POST https://api.mcp.ai/api/kaggle/list/datasets` — Tool to list Kaggle datasets with filters and pagination. Use after authenticating with Kaggle API key.
  - body: { page?: integer, size?: string, user?: string, group?: string, search?: string, tagids?: string, license?: string, sort_by?: string, filetype?: string, max_size?: integer, min_size?: integer }
- `POST https://api.mcp.ai/api/kaggle/list/kernel/output/files` — Tool to list output files for a specific kernel run. Use when you need to retrieve paginated file listings by kernel owner and slug.
  - body: { page_size?: integer, user_name: string, page_token?: string, kernel_slug: string }
- `POST https://api.mcp.ai/api/kaggle/list/kernels` — Tool to list Kaggle kernels (notebooks and scripts) with filters and pagination. Use to discover kernels by search terms, user, language, type, competition, or dataset.
  - body: { page?: integer, user?: string, group?: string, search?: string, sortBy?: string, dataset?: string, language?: string, pageSize?: integer, kernelType?: string, outputType?: string, competition?: string, parentKernel?: string }
- `POST https://api.mcp.ai/api/kaggle/list/model/instance/version/files` — Tool to list files for a specific version of a model variation. Use when you need to retrieve files for a particular model framework instance version by owner, model, framework, variation, and version
  - body: { framework: string, page_size?: integer, model_slug: string, owner_slug: string, page_token?: string, variation_slug: string, version_number: integer }
- `POST https://api.mcp.ai/api/kaggle/list/models` — Tool to list Kaggle models with optional filters for owner, sorting, search, and pagination. Use to discover available models on Kaggle's platform.
  - body: { owner?: string, search?: string, sortBy?: string, pageSize?: integer, pageToken?: string }
- `POST https://api.mcp.ai/api/kaggle/pull/kernel` — Tool to pull (download) the source code of a Kaggle kernel to local storage. Use when you need to retrieve a kernel's notebook, script, or metadata files. Optionally include metadata JSON file with ke
  - body: { path?: string, force?: boolean, metadata?: boolean, owner_slug: string, kernel_slug: string }
- `POST https://api.mcp.ai/api/kaggle/view/competition/leaderboard` — Tool to view competition leaderboard information showing rankings and scores of participants. Use when you need to check competition standings, team scores, or analyze leaderboard positions.
  - body: { id: string }

## Example prompts
- "What can I do in Kaggle?"
- "Show me a summary of my Kaggle account"

## More
- Page: https://mcp.ai/kaggle
- Agent spec (llms.txt): https://mcp.ai/kaggle/llms.txt
- Postman collection: https://mcp.ai/kaggle/postman.json
