Back to MCP Servers

Kaggle

This Kaggle MCP Server makes Kaggle more accessible by letting you browse competitions, leaderboards, models, datasets, and kernels directly within MCP, streamlining discovery for data scientists and developers.

data-science-tools
By KrishnaPramodParupudi
52Updated 10 months agoPythonMIT

Installation

npx -y kaggle-mcp-server

Configuration

{
  "mcpServers": {
    "kaggle-mcp-server": {
      "command": "npx",
      "args": ["-y", "kaggle-mcp-server"]
    }
  }
}

How to use

  1. Run the installation command above (if needed)
  2. Open your Claude Code settings file (~/.claude/settings.json)
  3. Add the configuration to the mcpServers section
  4. Restart Claude Code to apply changes

kaggle-mcp-server

This project provides an MCP (Model Context Protocol) server for interacting with Kaggle from Claude Desktop (or any MCP-compatible client)

πŸš€ Setup

1. Clone the repository and install dependencies

 pip install -r requirements.txt

2. Configure Kaggle API credentials

  Go to your Kaggle account -> Settings
  
  Scroll to API section β†’ click Create New API Token.
  This will download a file called kaggle.json.

  Place kaggle.json in the following location on your system:
  
  Linux/Mac:
  
  ~/.kaggle/kaggle.json
  
  Windows:
  
  C:\Users\<your-username>\.kaggle\kaggle.json

3. Configure Claude Desktop

 To connect Claude with this MCP server, create or update the file:
 
 Claude/claude_desktop_config.json
 
 with the following contents:
 
 {
   "mcpServers": {
     "Kaggle": {
       "command": "<path-to-your-python-executable>",
       "args": ["<path-to-your-kaggle-server.py>"]
     }
   }
 }
 
 Replace <path-to-your-python-executable> with the path to your Python interpreter (e.g. python or C:/Python/python.exe).
 
 Replace <path-to-your-kaggle-server.py> with the path to this repo’s kaggle-server.py file.

πŸ“œ Usage

 Once configured:
 
 Start Claude Desktop.
 
 Start the Kaggle MCP server (Run kaggle-server.py as a Python File).
 
 You can now use MCP tools defined in kaggle-server.py, for example:
 
 get_competitions_list: Fetches the list of available Kaggle competitions and returns them in a JSON-friendly format.

πŸ› οΈ About the Code

 kaggle-server.py registers MCP tools using the @mcp.tool() decorator.
 
 The server communicates with Claude via MCP and exposes Kaggle API methods.
 
 Example tool:
 
 @mcp.tool()
 def get_competitions_list() -> list[dict]:
     """
     Fetch the list of available Kaggle competitions.
     """

βœ… Requirements

  Python 3.10+
      
  Kaggle API credentials (kaggle.json)
      
  Dependencies listed in requirements.txt

πŸ”’ Security Notes

 Never commit your kaggle.json file.
 
 Ensure the .kaggle folder has restricted permissions.
View source on GitHub