
arrismo/kaggle-mcp 是从 https://github.com/arrismo/kaggle-mcp. 导入的 MCP 服务器候选
概览
arrismo/kaggle-mcp 是从 https://github.com/arrismo/kaggle-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,向 Claude Desktop 等 MCP 客户端开放 Kaggle 数据集的搜索、下载和 EDA 提示生成。
特色
- 通过关键词搜索Kaggle数据集。
- 本地下载并解压Kaggle数据集。
- 为 Kaggle 数据集生成一个初始探索性数据分析(EDA)提示。
- 支持通过环境变量或标准
kaggle.json文件获取 Kaggle 凭证。 - 本地运行,在 Docker 中运行,或通过 Smithery 运行。
可用MCP功能
工具
search_kaggle_datasets(query: str)
在 Kaggle 中搜索匹配 query 的数据集,返回最多 10 条 JSON 结果。
返回字段包括:
reftitlesubtitledownload_countlast_updatedusability_rating
download_kaggle_dataset(dataset_ref: str, download_path: str | None = None)
下载并解压Kaggle数据集。
- [
dataset_ref:Kaggle 数据集引用格式为owner/dataset-slug,例如kaggle/titanic。 download_path:可选的本地输出路径。若省略,文件保存至./datasets/ /。
提示
generate_eda_notebook(dataset_ref: str)
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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.
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//.
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:
- Go to .
- 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_key
Option 2: kaggle.json
Place kaggle.json in the standard Kaggle location:
- macOS/Linux:
~/.kaggle/kaggle.json - Windows:
C:\Users\\.kaggle\kaggle.json
On macOS/Linux, make sure the file is not world-readable:
chmod 600 ~/.kaggle/kaggle.json
Installation
git clone
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
安装
docker run --rm -i --env-file .env kaggle-mcp配置
{
"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"
}
}
}
}