# SportIntel MCP (`epicmotionsd/sportintel-mcp`) Actor

is the first AI-powered sports analytics Actor built on the Model Context Protocol (MCP). It provides explainable player projections, lineup optimization, and real-time betting odds for Daily Fantasy Sports (DFS) and sports betting.

- **URL**: https://apify.com/epicmotionsd/sportintel-mcp.md
- **Developed by:** [Shawn Sonnier](https://apify.com/epicmotionsd) (community)
- **Categories:** Agents, Developer tools, AI
- **Stats:** 21 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SportIntel MCP - AI-Powered Sports Analytics

The first AI-powered sports analytics MCP (Model Context Protocol) server for Daily Fantasy Sports (DFS). Get explainable player projections, lineup optimization, and real-time odds with SHAP AI explanations.

### 🏀 Features

#### 1. **Player Projections** (`get_player_projections`)

Get AI-powered DFS player projections with:

- Real DraftKings/FanDuel salaries (200+ players per slate)
- Projected fantasy points with floor/ceiling ranges
- Value analysis (points per $1K salary)
- SHAP explainability - understand WHY the AI recommends each player
- Ownership estimates
- Confidence scores

#### 2. **Lineup Optimizer** (`optimize_lineup`)

Generate optimal DFS lineups with:

- Multiple strategies (cash game, tournament, balanced)
- Position constraints (PG, SG, SF, PF, C, G, F, UTIL)
- Player exclusions/inclusions
- Max players per team
- Stack identification
- Risk scoring

#### 3. **Live Odds** (`get_live_odds`)

Real-time betting odds from 10+ sportsbooks:

- Spreads, totals, moneylines, player props
- Best odds finder
- Line movement tracking
- Multi-bookmaker comparison

#### 4. **Explain Recommendation** (`explain_recommendation`)

SHAP-powered AI explainability:

- Feature importance rankings
- Human-readable reasoning
- Understand projection factors

### 🚀 Usage

#### Batch Mode (Default)

Run once and get results:

**Input Example:**

```json
{
  "mode": "batch",
  "tool": "get_player_projections",
  "arguments": {
    "sport": "NBA",
    "slate": "main",
    "minSalary": 8000
  }
}
```

**Output (Real Results from Production):**

```json
{
  "sport": "NBA",
  "slate": "main",
  "date": "2025-11-23",
  "projections": [
    {
      "playerName": "Giannis Antetokounmpo",
      "team": "MIL",
      "position": "PF",
      "salary": 5500,
      "projectedPoints": 63.4,
      "floor": 50.7,
      "ceiling": 76.1,
      "value": 11.53,
      "ownership": 45.2,
      "confidence": 0.95,
      "explanation": {
        "topFactors": [
          {
            "factor": "recent_performance",
            "impact": 63.4375,
            "description": "Averaging 63.4 FP over last 8 games"
          }
        ]
      }
    },
    {
      "playerName": "LaMelo Ball",
      "team": "CHA",
      "position": "PG",
      "salary": 5500,
      "projectedPoints": 46.5,
      "value": 8.45,
      "confidence": 0.93
    }
  ]
}
```

*14 players retrieved in < 50 seconds with full SHAP explanations*

#### Server Mode

Keep running as MCP server for continuous use with Claude Desktop or other MCP clients.

**Input:**

```json
{
  "mode": "server"
}
```

### 🛠️ Available Tools

#### `get_player_projections`

**Arguments:**

- `sport` (required): "NBA", "NFL", "MLB", or "NHL"
- `slate` (optional): "main", "early", "afternoon", "evening"
- `date` (optional): ISO 8601 date (defaults to today)
- `minSalary` (optional): Filter by minimum salary
- `maxSalary` (optional): Filter by maximum salary
- `positions` (optional): Array of positions to filter

#### `optimize_lineup`

**Arguments:**

- `sport` (required): "NBA", "NFL", "MLB", or "NHL"
- `projections` (required): Array of player projections
- `strategy` (optional): "cash", "tournament", "balanced"
- `lineupCount` (optional): Number of lineups to generate (1-150)
- `requiredPlayers` (optional): Player IDs that must be in lineup
- `excludedPlayers` (optional): Player IDs to exclude
- `maxPlayersPerTeam` (optional): Max players from same team (default: 4)

#### `get_live_odds`

**Arguments:**

- `sport` (required): "NBA", "NFL", "MLB", or "NHL"
- `markets` (optional): \["spreads", "totals", "moneylines", "player_props"]
- `team` (optional): Filter by team name
- `bookmakers` (optional): Array of bookmaker names

#### `explain_recommendation`

**Arguments:**

- `playerId` (optional): Player ID to explain
- `playerName` (optional): Player name to explain
- `method` (optional): "shap", "lime", "feature_importance"

### 📊 Output

Results are saved to:

- **Dataset**: Player projections, lineups, odds data
- **Key-Value Store**: Metadata, cache, status

### 💡 Use Cases

#### DFS Players

- Get daily player projections with explainable AI
- Optimize lineups for cash games or tournaments
- Understand ownership levels to find leverage
- Research players with SHAP explanations

#### Sports Bettors

- Compare odds across multiple sportsbooks
- Find best available lines
- Track line movements
- Analyze player props

#### Data Scientists

- Access structured sports data via API
- Train custom models on projections
- Backtest lineup strategies
- Research AI explainability

#### Content Creators

- Generate data-driven content
- Create talking points with AI explanations
- Produce lineup articles
- Analyze player trends

### 🔑 API Keys (Optional)

#### The Odds API

Get free API key at https://the-odds-api.com/

- Free tier: 500 requests/month
- Used for live odds data
- Not required for projections

#### RotoGrinders API

Get API key at https://rotogrinders.com/

- Has free tier
- Used for DFS salaries (fallback to DraftKings API if not provided)
- Optional but recommended

### 📈 Data Sources

- **BallDontLie API**: Free NBA stats
- **DraftKings API**: Real-time DFS salaries
- **RotoGrinders API**: DFS salaries & ownership (optional)
- **The Odds API**: Live betting odds (optional)

### 🎯 Sports Supported

#### Currently

- ✅ **NBA** (fully functional)

#### Coming Soon

- 🔜 **NFL** (architecture ready)
- 🔜 **MLB** (architecture ready)
- 🔜 **NHL** (architecture ready)

### 🧪 Example Scenarios

#### Scenario 1: Get Tonight's NBA Projections

```json
{
  "mode": "batch",
  "tool": "get_player_projections",
  "arguments": {
    "sport": "NBA",
    "slate": "main"
  }
}
```

#### Scenario 2: Find Value Plays Under $7K

```json
{
  "mode": "batch",
  "tool": "get_player_projections",
  "arguments": {
    "sport": "NBA",
    "maxSalary": 7000
  }
}
```

#### Scenario 3: Generate Tournament Lineups

```json
{
  "mode": "batch",
  "tool": "optimize_lineup",
  "arguments": {
    "sport": "NBA",
    "projections": [...],
    "strategy": "tournament",
    "lineupCount": 20
  }
}
```

#### Scenario 4: Compare NBA Spreads

```json
{
  "mode": "batch",
  "tool": "get_live_odds",
  "arguments": {
    "sport": "NBA",
    "markets": ["spreads"]
  }
}
```

### 🏆 Advantages

#### vs. Traditional DFS Sites

- ✅ **Explainable AI** - Understand WHY, not just WHAT
- ✅ **Free tier** - No subscription required
- ✅ **Open source** - Transparent algorithms
- ✅ **API access** - Integrate with your tools

#### vs. Manual Research

- ✅ **AI-powered** - Advanced projections using ML
- ✅ **Automated** - Instant results, no manual work
- ✅ **Multi-source** - Aggregates data from multiple APIs
- ✅ **Real-time** - Always up-to-date

### 📖 Documentation

- **GitHub**: https://github.com/roizenlabs/sportintel-mcp
- **MCP Protocol**: https://modelcontextprotocol.io
- **API Docs**: See README in repository

### 🤝 Support

- **Issues**: https://github.com/roizenlabs/sportintel-mcp/issues
- **Email**: support@sportintel.ai
- **Discord**: Coming soon

### 📜 License

MIT License - Free to use for personal and commercial projects

### 🚀 Getting Started

1. Click "Try for free"
2. Select your mode (batch or server)
3. Choose a tool to run
4. Provide arguments
5. Click "Start"
6. View results in Dataset

That's it! Get AI-powered sports analytics in seconds.

***

**Built with ❤️ by RoizenLabs**

**Powered by**: Claude AI, TypeScript, Apify, MCP Protocol

# Actor input Schema

## `mode` (type: `string`):

Run as MCP server or batch processor

## `tool` (type: `string`):

Which tool to run (batch mode only)

## `arguments` (type: `object`):

Arguments to pass to the tool (batch mode only)

## Actor input object example

```json
{
  "mode": "batch",
  "tool": "get_player_projections",
  "arguments": {
    "sport": "NBA",
    "slate": "main",
    "includeExplanations": true
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "arguments": {
        "sport": "NBA",
        "slate": "main",
        "includeExplanations": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("epicmotionsd/sportintel-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "arguments": {
        "sport": "NBA",
        "slate": "main",
        "includeExplanations": True,
    } }

# Run the Actor and wait for it to finish
run = client.actor("epicmotionsd/sportintel-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "arguments": {
    "sport": "NBA",
    "slate": "main",
    "includeExplanations": true
  }
}' |
apify call epicmotionsd/sportintel-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,epicmotionsd/sportintel-mcp"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/OdaJN92JUkidz02uv/builds/GWzTPQ2cDce0GxFpF/openapi.json
