Kaggle-MCP connects Claude AI to the Kaggle API through the Model Context Protocol (MCP), allowing you to interact with Kaggle competitions, datasets, and kernels directly through the Claude interface. This integration enables seamless access to Kaggle resources without leaving your AI assistant.
# Install with a single command
curl -LsSf https://raw.githubusercontent.com/54yyyu/kaggle-mcp/main/install.sh | sh
# Download and run the installer
powershell -c "Invoke-WebRequest -Uri https://raw.githubusercontent.com/54yyyu/kaggle-mcp/main/install.ps1 -OutFile install.ps1; .\install.ps1"
# Install with pip
pip install git+https://github.com/54yyyu/kaggle-mcp.git
# Or better, install with uv
uv pip install git+https://github.com/54yyyu/kaggle-mcp.git
After installing Kaggle-MCP, you need to configure Claude Desktop to recognize the MCP server:
Run the setup utility which will automatically locate and update your Claude Desktop configuration:
kaggle-mcp-setup
Alternatively, you can manually add the MCP server configuration to your Claude Desktop configuration file:
Locate your Claude Desktop configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Add the following to your configuration file:
{
"mcpServers": {
"kaggle": {
"command": "kaggle-mcp"
}
}
}
To interact with Kaggle, you need to set up API credentials:
kaggle.json
file containing your credentialsmkdir -p ~/.kaggle
~/.kaggle/kaggle.json
chmod 600 ~/.kaggle/kaggle.json
You can authenticate directly through Claude by using the authenticate()
tool:
authenticate(username='your_username', key='your_api_key')
Here are some example prompts to use with Claude once Kaggle-MCP is set up:
Authenticate with Kaggle using my username 'username' and key 'apikey'
List active Kaggle competitions
Show me the top 10 competitors on the Titanic leaderboard
Find datasets about climate change
Download the Boston housing dataset
Search for kernels about sentiment analysis
Access competition details, data, and leaderboards to stay informed about ongoing Kaggle competitions.
Find and download datasets for your analysis projects directly through Claude.
Locate relevant kernels and notebooks for specific topics to enhance your learning.
Find pre-trained models for various machine learning tasks available on Kaggle.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.