Kaggle MCP server

Integrates with Kaggle's API to enable competition participation, dataset management, kernel operations, and model submissions for data scientists and machine learning practitioners.
Back to servers
Provider
gh-54yyyu
Release date
Apr 07, 2025
Language
Python
Package
Stats
611 downloads
7 stars

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.

Installation Options

Quick Installation

macOS / Linux

# Install with a single command
curl -LsSf https://raw.githubusercontent.com/54yyyu/kaggle-mcp/main/install.sh | sh

Windows

# 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"

Manual Installation

# 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

Configuration Setup

After installing Kaggle-MCP, you need to configure Claude Desktop to recognize the MCP server:

Automatic Configuration

Run the setup utility which will automatically locate and update your Claude Desktop configuration:

kaggle-mcp-setup

Manual Configuration

Alternatively, you can manually add the MCP server configuration to your Claude Desktop configuration file:

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the following to your configuration file:

{
  "mcpServers": {
    "kaggle": {
      "command": "kaggle-mcp"
    }
  }
}

Setting Up Kaggle API Credentials

To interact with Kaggle, you need to set up API credentials:

Method 1: Using Kaggle's Website

  1. Go to your Kaggle account settings
  2. In the API section, click "Create New API Token"
  3. Download the kaggle.json file containing your credentials
  4. Create the Kaggle directory: mkdir -p ~/.kaggle
  5. Move the file to ~/.kaggle/kaggle.json
  6. Set the correct permissions: chmod 600 ~/.kaggle/kaggle.json

Method 2: Authenticate Through Claude

You can authenticate directly through Claude by using the authenticate() tool:

authenticate(username='your_username', key='your_api_key')

Using Kaggle-MCP

Here are some example prompts to use with Claude once Kaggle-MCP is set up:

Authentication

Authenticate with Kaggle using my username 'username' and key 'apikey'

Competitions

List active Kaggle competitions
Show me the top 10 competitors on the Titanic leaderboard

Datasets

Find datasets about climate change
Download the Boston housing dataset

Kernels

Search for kernels about sentiment analysis

Common Use Cases

Competition Research

Access competition details, data, and leaderboards to stay informed about ongoing Kaggle competitions.

Dataset Discovery

Find and download datasets for your analysis projects directly through Claude.

Learning Resources

Locate relevant kernels and notebooks for specific topics to enhance your learning.

Model Discovery

Find pre-trained models for various machine learning tasks available on Kaggle.

System Requirements

  • Python 3.8 or newer
  • Claude Desktop or API access
  • Kaggle account with API credentials
  • MCP Python SDK 1.6.0+

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later