# FantasyData (SportsDataIO) MCP

> FantasyData (SportsDataIO) MCP Server connects your AI agent to live sports data. Get player profiles, current scores, and full schedules for NFL, NBA, and MLB. You can check rosters, pull historical scores for specific dates, and get deep player stats without leaving your chat window.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** sports-data, real-time-stats, betting-odds, player-intelligence, api-data-feed, sports-analytics

## Description

**FantasyData (SportsDataIO) MCP Server** connects your AI agent directly to live stats for the NFL, NBA, and MLB. You'll get player profiles, current scores, and full schedules for all three leagues, right from your chat window. You can check rosters, pull historical scores for specific dates, and get deep player stats without leaving your agent. 

When you use the `list_nfl_players` tool, your agent pulls the current roster for the NFL. If you need the NBA roster, it uses `list_nba_players`. To see the MLB active players, it calls `list_mlb_players`. 

Need to know what's going down with a specific player? You can use `get_nfl_player_details` to pull detailed stats and position info for any NFL player. For the NBA, use `get_nba_player_details`; for MLB, it's `get_mlb_player_details`. 

Want the whole league schedule? Use `get_nfl_schedule` to grab the full NFL calendar for a season. For the NBA, you'll use `get_nba_schedule`, and for MLB, you'll use `get_mlb_schedule`. 

Checking scores is simple. If you want the NFL scores for a specific day, you call `get_nfl_scores`. For the NBA, use `get_nba_scores`, or for MLB, use `get_mlb_scores` to get the final results for any date. 

If you're digging into MLB, you've got a few more tools. You can use `list_mlb_players` to see the entire active roster. You can get a full season calendar with `get_mlb_schedule`. You can pull the scores for any date with `get_mlb_scores`. Additionally, you can get specific player info with `get_mlb_player_details`. 

Your agent handles all the heavy lifting. When you ask it for stats, it just calls the right tool—no guesswork. You're talking to one server that handles football, basketball, and baseball data. You never gotta switch data feeds or deal with multiple APIs. **You're all set.**

## Tools

### get_mlb_player_details
Fetches detailed information for a specific Major League Baseball player.

### get_mlb_schedule
Retrieves the full MLB game schedule for a specified season.

### get_mlb_scores
Gets the MLB scores and results for a specific date.

### get_nba_player_details
Fetches detailed information for a specific National Basketball Association player.

### get_nba_schedule
Retrieves the full NBA game schedule for a specified season.

### get_nba_scores
Gets the NBA scores and results for a specific date.

### get_nfl_player_details
Fetches detailed information for a specific National Football League player.

### get_nfl_schedule
Retrieves the full NFL game schedule for a specified season.

### get_nfl_scores
Gets the NFL scores and results for a specific date.

### list_mlb_players
Lists every active player currently in Major League Baseball.

### list_nba_players
Lists every active player currently in the NBA.

### list_nfl_players
Lists every active player currently in the NFL.

## Prompt Examples

**Prompt:** 
```
List all active NFL players.
```

**Response:** 
```
I've retrieved the NFL player roster. You have over 2,000 active players including 'Patrick Mahomes' (QB, ID: 18877) and 'Justin Jefferson' (WR, ID: 21685). Which team or position should I filter by?
```

**Prompt:** 
```
Show me the NBA scores for last night.
```

**Response:** 
```
Fetching NBA scores for 2024-04-03... The Lakers beat the Celtics 112-105, and the Warriors won against the Mavericks 120-118. Would you like the box score for any of these games?
```

**Prompt:** 
```
Get the MLB schedule for the 2024 season.
```

**Response:** 
```
Retrieving 2024 MLB schedule... The regular season consists of 2,430 games starting from March 28th. Opening day featured match-ups like Yankees vs Astros and Dodgers vs Cardinals.
```

## Capabilities

### List all active players
Calls `list_nfl_players`, `list_nba_players`, or `list_mlb_players` to retrieve the current roster of athletes for a specified league.

### Get specific player details
Uses `get_nfl_player_details`, `get_nba_player_details`, or `get_mlb_player_details` to fetch a player's unique stats, position, and status.

### Check game scores for a date
Calls `get_nfl_scores`, `get_nba_scores`, or `get_mlb_scores` to get the final scores and results for games played on a specific date.

### Retrieve league schedules
Calls `get_nfl_schedule`, `get_nba_schedule`, or `get_mlb_schedule` to pull the full calendar of games for a given season.

### Search for players by league
Allows you to list all active players across MLB, NBA, or NFL using specialized list tools.

## Use Cases

### Checking a fantasy matchup quickly
A user needs to know if a specific NFL player is active and what their last few game stats were. They ask their agent to 'Check Patrick Mahomes' status and recent stats.' The agent runs `get_nfl_player_details` and immediately provides the status and performance data, saving the user from visiting multiple team pages.

### Analyzing seasonal betting patterns
A betting enthusiast needs to model a full season's performance and look at historical scores. They prompt the agent: 'What were the MLB scores for the last three weekends?' The agent calls `get_mlb_scores` multiple times, providing a structured, historical data dump perfect for modeling.

### Cross-sport player comparison
A sports analyst wants to compare the typical career stats of a star NBA player vs. a star MLB player. They ask the agent to pull data for both. The agent uses `get_nba_player_details` and `get_mlb_player_details` sequentially, normalizing the results into a single comparison table.

### Building a season calendar for a client
A marketing team needs a full, reliable calendar of games for a client presentation. They ask the agent to 'Get the complete 2024 NBA schedule.' The agent runs `get_nba_schedule`, delivering a clean, comprehensive schedule that the team can copy directly into a presentation.

## Benefits

- See a player's full profile instantly. Use `get_nba_player_details` or `get_nfl_player_details` to get detailed metadata and performance background without navigating multiple team websites.
- Track results for any day. The `get_nba_scores` and `get_nfl_scores` tools let you query scores for a specific date, making historical or live score checks simple.
- Plan your season easily. Use `get_mlb_schedule` or `get_nba_schedule` to pull the entire season's calendar. This is faster than manually checking league websites.
- Manage rosters in bulk. Instead of searching, run `list_nfl_players` to get a complete roster list, which you can then filter using your AI agent.
- Compare leagues in one chat. You don't need separate APIs for football, basketball, and baseball. This single integration handles all three major sports.
- Get deep context. By resolving specific player IDs, you can pull deep-dive performance data that goes beyond a simple stat sheet.

## How It Works

The bottom line is: you talk to your agent, and it handles the API calls to pull specific sports data for you.

1. Subscribe to the FantasyData (SportsDataIO) server and input your API key.
2. Your AI client sends a natural language request (e.g., 'What were the NBA scores for last night?').
3. The server identifies the correct tool (e.g., `get_nba_scores`), executes it, and returns the structured sports data to your agent.

## Frequently Asked Questions

**Can I get all active NFL players using the list_nfl_players tool?**
Yes, the `list_nfl_players` tool retrieves the current roster of all active NFL players. It's the quickest way to get a complete list to start your analysis.

**Does get_nba_scores only provide the final score?**
No, `get_nba_scores` provides the results for the specified date. It gives you the final scores and outcomes, helping you track the results for a whole slate of games.

**How do I use get_mlb_player_details to get stats?**
You run `get_mlb_player_details` and provide the player's ID. The tool returns a deep set of metadata and performance background for that specific player.

**Can I get the MLB schedule for multiple years?**
No, the `get_mlb_schedule` tool retrieves the full schedule for one specified season. You must call the tool once for each season you want data from.

**What if I need to compare scores from different sports?**
You ask your agent to compare them. The agent uses `get_nfl_scores` and `get_nba_scores` (and others) and presents the results side-by-side for easy comparison.

**How do I use get_nba_player_details if I only know the player's name, not their ID?**
You must first use list_nba_players to get the player's unique ID. Then, pass that ID to get_nba_player_details. This ensures the data is accurate.

**What is the best way to handle historical data using get_mlb_scores?**
You simply provide the specific date(s) you want to check. The tool handles fetching scores for any date within the available historical range.

**Can I combine data from different sports, like NFL and MLB, in a single prompt?**
Yes, your AI client can call multiple tools in one sequence. Just mention both NFL and MLB data needs in your prompt.

**How do I obtain a SportsDataIO (FantasyData) API Key?**
You can sign up for a free trial or a paid plan at [**sportsdata.io**](https://sportsdata.io/developers). Once registered, you can find your API key in the developer portal dashboard.

**Does this support live scores during games?**
Yes! The `get_scores` tools for NFL, NBA, and MLB retrieve the most recent game data available for the specified date, including live updates if supported by your API plan.

**Can I search for players in multiple sports?**
Absolutely. This integration provides dedicated tools for NFL, NBA, and MLB player directories, allowing you to query rosters across all three major sports.