# ESPN MCP Server (`maximedupre/espn-mcp-server`) Actor

Get ESPN scoreboards, schedules, standings, teams, rosters, athlete data, news, rankings, odds, and game details. Save structured sports data for AI research or export it from an Actor run.

- **URL**: https://apify.com/maximedupre/espn-mcp-server.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Sports, MCP servers, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.01 / 1,000 sports data

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

### 🏟️ ESPN sports research for AI and data teams

ESPN MCP Server helps sports analysts, app builders, and AI teams get structured ESPN sports data. Find scores, schedules, standings, teams, athletes, news, rankings, odds, and game details without copying pages by hand.

- Give an AI tool access to sports research with **[ESPN MCP Server](https://apify.com/maximedupre/espn-mcp-server/examples/espn-mcp-server)**.
- Save sports data for apps and reports with **[ESPN API](https://apify.com/maximedupre/espn-mcp-server/examples/espn-api)**.
- Check games across leagues with **[ESPN Scores](https://apify.com/maximedupre/espn-mcp-server/examples/espn-scores)**.
- Get a current or dated board with **[ESPN Scoreboard](https://apify.com/maximedupre/espn-mcp-server/examples/espn-scoreboard)**.
- Review league or team games with **[ESPN Schedule](https://apify.com/maximedupre/espn-mcp-server/examples/espn-schedule)**.
- Compare team records with **[ESPN Standings](https://apify.com/maximedupre/espn-mcp-server/examples/espn-standings)**.
- Find recent league stories with **[ESPN News](https://apify.com/maximedupre/espn-mcp-server/examples/espn-news)**.
- Get supported polls and lists with **[ESPN Rankings](https://apify.com/maximedupre/espn-mcp-server/examples/espn-rankings)**.

#### 📦 Returned data

Each sports entry is one dataset row. Rows can hold game IDs, dates, scores, teams, standings, athletes, news, rankings, odds, and ESPN links. ESPN does not provide every field for every sport or league. Missing values are not guessed.

#### 🚀 Running the Actor

1. Open the Actor input.
2. Choose one `target`.
3. Fill in the options for that target. Options for other targets are ignored.
4. For a league target, choose a `sport` and add ESPN league slugs.
5. Run the Actor and open **Sports results**.

#### 🎛️ Input

| Field | Type | What it does |
|---|---|---|
| `target` | string | Required. Chooses scoreboards, schedules, standings, teams, roster, gameAnalysis, odds, athlete, news, rankings, or search. |
| `scoreboardDate` | string | Gets games on this date. Leave it empty for the current scoreboard. |
| `scheduleTeamId` | string | Limits a schedule to one ESPN team ID. Leave it empty for the full league schedule. |
| `scheduleStartDate` | string | Gets schedule rows on or after this date. |
| `scheduleEndDate` | string | Gets schedule rows on or before this date. |
| `rosterTeamId` | string | Sets the ESPN team ID for a roster. |
| `gameId` | string | Sets the ESPN game ID for game analysis. |
| `oddsGameId` | string | Sets the ESPN game ID for available odds and win chance. |
| `athleteQuery` | string | Finds an athlete by name or gets details by ESPN athlete ID. |
| `newsKeywords` | string[] | Narrows ESPN news. Leave it empty for recent league news. |
| `rankingType` | string | Chooses a supported college, MMA, boxing, or tennis ranking. |
| `searchQuery` | string | Searches ESPN for a player, team, or league. |
| `sport` | string | Sets the sport for league-based targets. |
| `leagues` | string[] | Sets one or more ESPN league slugs for a league-based target. |

Successful default-input QA run:

```json
{
  "target": "scoreboards",
  "sport": "football",
  "leagues": [
    "nfl",
    "college-football"
  ],
  "scoreboardDate": "2025-11-29"
}
````

#### 📤 Output

The dataset uses the shape for the chosen target. Optional fields appear only when ESPN provides them.

##### Scoreboard row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `scoreboard`. |
| `eventId` | string | ESPN game ID. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `name` | string | Game name. |
| `date` | string | Game date and time. |
| `status` | string | Game status. |
| `competitors` | object\[] | Teams in the game. |
| `competitors.teamId` | string | ESPN team ID. |
| `competitors.name` | string | Team name. |
| `competitors.abbreviation` | string | Team short name. |
| `competitors.homeAway` | string | Home or away side. |
| `competitors.score` | string | Team score. |
| `competitors.winner` | boolean | Whether the team won. |
| `venue` | object | Game venue. |
| `venue.name` | string | Venue name. |
| `venue.city` | string | Venue city. |
| `venue.state` | string | Venue state. |
| `venue.country` | string | Venue country. |
| `sourceUrl` | string | ESPN game link. |

```json
{
  "resultType": "scoreboard",
  "eventId": "401752921",
  "sport": "football",
  "league": "college-football",
  "name": "Ohio State Buckeyes at Michigan Wolverines",
  "date": "2025-11-29T17:00Z",
  "status": "Final",
  "competitors": [
    {
      "teamId": "130",
      "name": "Michigan Wolverines",
      "abbreviation": "MICH",
      "homeAway": "home",
      "score": "9",
      "winner": false
    },
    {
      "teamId": "194",
      "name": "Ohio State Buckeyes",
      "abbreviation": "OSU",
      "homeAway": "away",
      "score": "27",
      "winner": true
    }
  ],
  "venue": {
    "name": "Michigan Stadium",
    "city": "Ann Arbor",
    "state": "MI",
    "country": "USA"
  },
  "sourceUrl": "https://www.espn.com/college-football/game/_/gameId/401752921/ohio-state-michigan"
}
```

##### Schedule row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `schedule`. |
| `eventId` | string | ESPN game ID. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `teamId` | string | Team filter ID, when used. |
| `name` | string | Game name. |
| `date` | string | Game date and time. |
| `status` | string | Game status. |
| `competitors` | object\[] | Teams in the game. |
| `competitors.teamId` | string | ESPN team ID. |
| `competitors.name` | string | Team name. |
| `competitors.abbreviation` | string | Team short name. |
| `competitors.homeAway` | string | Home or away side. |
| `competitors.score` | string | Team score. |
| `competitors.winner` | boolean | Whether the team won. |
| `venue` | object | Game venue. |
| `venue.name` | string | Venue name. |
| `venue.city` | string | Venue city. |
| `venue.state` | string | Venue state. |
| `venue.country` | string | Venue country. |
| `sourceUrl` | string | ESPN game link. |

```json
{
  "resultType": "schedule",
  "eventId": "401772891",
  "sport": "football",
  "league": "nfl",
  "name": "Green Bay Packers at Detroit Lions",
  "date": "2025-11-27T18:00Z",
  "status": "Final",
  "competitors": [
    {
      "teamId": "8",
      "name": "Detroit Lions",
      "abbreviation": "DET",
      "homeAway": "home",
      "score": "24",
      "winner": false
    },
    {
      "teamId": "9",
      "name": "Green Bay Packers",
      "abbreviation": "GB",
      "homeAway": "away",
      "score": "31",
      "winner": true
    }
  ],
  "venue": {
    "name": "Ford Field",
    "city": "Detroit",
    "state": "MI",
    "country": "USA"
  },
  "sourceUrl": "https://www.espn.com/nfl/game/_/gameId/401772891/packers-lions"
}
```

##### Standing row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `standing`. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `group` | string | Conference or other group. |
| `position` | number | Team place in the group. |
| `teamId` | string | ESPN team ID. |
| `teamName` | string | Team name. |
| `teamAbbreviation` | string | Team short name. |
| `record` | string | Win-loss record. |
| `stats` | object | League-specific standing facts. |
| `sourceUrl` | string | ESPN team link. |

```json
{
  "resultType": "standing",
  "sport": "football",
  "league": "nfl",
  "group": "American Football Conference",
  "position": 1,
  "teamId": "2",
  "teamName": "Buffalo Bills",
  "teamAbbreviation": "BUF",
  "record": "0-0",
  "stats": {
    "differential": 0,
    "gamesBehind": 0,
    "losses": 0,
    "playoffSeed": 0,
    "pointDifferential": 0,
    "pointsAgainst": 0,
    "pointsFor": 0,
    "streak": 0,
    "ties": 0,
    "winPercent": 0,
    "wins": 0,
    "divisionLosses": 0,
    "divisionRecord": 0,
    "divisionTies": 0,
    "divisionWins": 0,
    "overall": "0-0",
    "Home": "0-0",
    "Road": "0-0",
    "vs. Div.": "0-0",
    "vs. Conf.": "0-0"
  },
  "sourceUrl": "https://www.espn.com/nfl/team/_/name/buf/buffalo-bills"
}
```

##### Team row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `team`. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `teamId` | string | ESPN team ID. |
| `teamName` | string | Team name. |
| `abbreviation` | string | Team short name. |
| `location` | string | Team place. |
| `color` | string | Team color code. |
| `logoUrl` | string | Team logo link. |
| `sourceUrl` | string | ESPN team link. |

```json
{
  "resultType": "team",
  "sport": "hockey",
  "league": "nhl",
  "teamId": "25",
  "teamName": "Anaheim Ducks",
  "abbreviation": "ANA",
  "location": "Anaheim",
  "color": "fc4c02",
  "logoUrl": "https://a.espncdn.com/i/teamlogos/nhl/500/ana.png",
  "sourceUrl": "https://www.espn.com/nhl/team/_/name/ana/anaheim-ducks"
}
```

##### Roster row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `roster`. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `teamId` | string | ESPN team ID. |
| `teamName` | string | Team name. |
| `athleteId` | string | ESPN athlete ID. |
| `athleteName` | string | Athlete name. |
| `position` | string | Playing position. |
| `jersey` | string | Jersey number. |
| `headshotUrl` | string | Headshot link. |
| `sourceUrl` | string | ESPN athlete link. |

```json
{
  "resultType": "roster",
  "sport": "basketball",
  "league": "nba",
  "teamId": "13",
  "teamName": "Los Angeles Lakers",
  "athleteId": "5113969",
  "athleteName": "Cameron Carr",
  "position": "Guard",
  "headshotUrl": "https://a.espncdn.com/i/headshots/nba/players/full/5113969.png",
  "sourceUrl": "https://www.espn.com/nba/player/_/id/5113969/cameron-carr"
}
```

##### Game analysis row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `gameAnalysis`. |
| `eventId` | string | ESPN game ID. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `name` | string | Game name. |
| `date` | string | Game date and time. |
| `status` | string | Game status. |
| `venue` | object | Venue with `name`, `city`, `state`, and `country`. |
| `attendance` | integer | Reported crowd size. |
| `officials` | string\[] | Game officials. |
| `competitors` | object\[] | Teams and box-score facts. |
| `competitors.teamId` | string | ESPN team ID. |
| `competitors.name` | string | Team name. |
| `competitors.score` | string | Team score. |
| `competitors.winner` | boolean | Whether the team won. |
| `competitors.statistics` | object | Team statistics. |
| `leaders` | object\[] | Leaders with `category`, `athleteId`, `name`, and `value`. |
| `playerStatistics` | object\[] | Player rows with `athleteId`, `athleteName`, `teamName`, and `statistics`. |
| `scoringPlays` | object\[] | Plays with `period`, `clock`, `text`, and `score`. |
| `sourceUrl` | string | ESPN game link. |

```json
{
  "resultType": "gameAnalysis",
  "eventId": "401810171",
  "sport": "football",
  "league": "nfl",
  "name": "Game",
  "officials": [],
  "competitors": [],
  "leaders": [],
  "playerStatistics": [],
  "scoringPlays": []
}
```

##### Odds row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `odds`. |
| `eventId` | string | ESPN game ID. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `provider` | string | Odds provider. |
| `details` | string | Odds text. |
| `spread` | number | Point spread. |
| `overUnder` | number | Total line. |
| `homeMoneyline` | number | Home moneyline. |
| `awayMoneyline` | number | Away moneyline. |
| `homeWinProbability` | number | Home win chance from 0 to 1. |
| `awayWinProbability` | number | Away win chance from 0 to 1. |
| `sourceUrl` | string | ESPN game link. |

```json
{
  "resultType": "odds",
  "eventId": "401810171",
  "sport": "football",
  "league": "nfl"
}
```

##### Athlete row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `athlete`. |
| `athleteId` | string | ESPN athlete ID. |
| `athleteName` | string | Athlete name. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `teamId` | string | ESPN team ID. |
| `teamName` | string | Team name. |
| `position` | string | Playing position. |
| `jersey` | string | Jersey number. |
| `headshotUrl` | string | Headshot link. |
| `profile` | object | Profile facts. |
| `profile.displayName` | string | Display name. |
| `profile.age` | integer | Age. |
| `profile.height` | string | Height. |
| `profile.weight` | string | Weight. |
| `profile.birthPlace` | string | Birthplace. |
| `profile.status` | string | Athlete status. |
| `seasonStatistics` | object\[] | Season facts with `name`, `value`, and `displayValue`. |
| `careerStatistics` | object\[] | Career facts with `name`, `value`, and `displayValue`. |
| `gameLog` | object\[] | Games with `eventId`, `date`, `opponent`, and `statistics`. |
| `splits` | object\[] | Splits with `name` and `statistics`. |
| `sourceUrl` | string | ESPN athlete link. |

```json
{
  "resultType": "athlete",
  "athleteId": "1966",
  "athleteName": "LeBron James",
  "sport": "basketball",
  "league": "nba",
  "profile": {
    "displayName": "LeBron James"
  },
  "sourceUrl": "https://www.espn.com/nba/player/_/id/1966/lebron-james"
}
```

##### News row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `news`. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `headline` | string | Story headline. |
| `description` | string | Story summary. |
| `publishedAt` | string | Publish date and time. |
| `byline` | string | Writer or desk. |
| `imageUrl` | string | Story image link. |
| `sourceUrl` | string | ESPN story link. |
| `keyword` | string | First keyword that found the saved story. |

```json
{
  "resultType": "news",
  "sport": "baseball",
  "league": "mlb",
  "headline": "Fantasy baseball lineup advice for Saturday: Brewers' Gasser offers upside",
  "description": "Everything you need to know to set your fantasy baseball lineups for Saturday's MLB action.",
  "publishedAt": "2026-07-24T19:40:20Z",
  "byline": "ESPN Fantasy",
  "imageUrl": "https://a.espncdn.com/photo/2026/0724/r1693310_608x342_16-9.jpg"
}
```

##### Ranking row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `ranking`. |
| `rankingType` | string | Ranking family. |
| `rank` | number | Current rank. |
| `previousRank` | number | Prior rank. |
| `name` | string | Ranked name. |
| `entityId` | string | ESPN entity ID. |
| `record` | string | Team record. |
| `points` | number | Ranking points. |
| `sourceUrl` | string | ESPN link. |

```json
{
  "resultType": "ranking",
  "rankingType": "collegeFootball",
  "rank": 1,
  "previousRank": 1,
  "name": "Hoosiers",
  "entityId": "84",
  "record": "16-0",
  "points": 1650,
  "sourceUrl": "https://www.espn.com/college-football/team/_/id/84/indiana-hoosiers"
}
```

##### Search row

| Field | Type | What it does |
|---|---|---|
| `resultType` | string | Is `search`. |
| `entityType` | string | Athlete, team, or league. |
| `entityId` | string | ESPN entity ID. |
| `name` | string | Entity name. |
| `sport` | string | Sport slug. |
| `league` | string | League slug. |
| `description` | string | Entity details. |
| `imageUrl` | string | Entity image link. |
| `sourceUrl` | string | ESPN link. |

```json
{
  "resultType": "search",
  "entityType": "team",
  "entityId": "2",
  "name": "Boston Celtics",
  "sport": "basketball",
  "league": "nba",
  "sourceUrl": "https://www.espn.com/nba/team/_/name/bos/boston-celtics"
}
```

#### 💳 Pricing

This Actor uses pay-per-event pricing. You pay for each ESPN sports row saved to the dataset. A run with no saved sports rows does not create this charge. Cost depends on how many rows the chosen target returns.

#### 🔌 Integrations

Use the dataset with the Apify API, downloads, schedules, webhooks, and supported Apify integrations. This guide shows how to connect an Actor to other tools:

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Do I need an ESPN account or API key?

No ESPN account or ESPN API key is needed for this public sports research.

##### Can it place bets or give betting advice?

No. It only returns ESPN odds data when available. It does not place bets, make picks, or promise an outcome.

##### Why are some fields missing?

ESPN data differs by sport, league, game, and date. The Actor keeps available data and does not make up missing values.

##### Can I request several unrelated targets in one run?

No. Choose one `target` for each run. You can add several league slugs of the same sport to supported league targets.

##### Can I use the output outside an MCP client?

Yes. A regular Actor run saves structured rows to an Apify dataset for viewing and export.

### 📝 Changelog

#### 0.0: Initial release

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~espn-mcp-server/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [Sofascore Live Events Scraper](https://apify.com/maximedupre/sofascore-live-events-scraper) — Get live events, dated fixtures, teams, players, managers, and supported match pages from Sofascore.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `target` (type: `string`):

Choose the ESPN result you want. Options for other targets are ignored.

## `scoreboardDate` (type: `string`):

Get games on this calendar date. Leave it empty for the current scoreboard.

## `scheduleTeamId` (type: `string`):

Limit the schedule to one ESPN team ID. Leave it empty for the full league schedule.

## `scheduleStartDate` (type: `string`):

Get schedule rows on or after this calendar date.

## `scheduleEndDate` (type: `string`):

Get schedule rows on or before this calendar date.

## `rosterTeamId` (type: `string`):

Enter the ESPN team ID for the roster.

## `gameId` (type: `string`):

Enter the ESPN game ID for the game summary, box score, and other available details.

## `oddsGameId` (type: `string`):

Enter the ESPN game ID for available odds and win probability.

## `athleteQuery` (type: `string`):

Enter an athlete name to find a profile, or an ESPN athlete ID for detailed records.

## `newsKeywords` (type: `array`):

Enter words used to narrow ESPN news. Leave the list empty for recent league news.

## `rankingType` (type: `string`):

Choose a supported ESPN ranking family.

## `searchQuery` (type: `string`):

Enter a player, team, or league name to search on ESPN.

## `sport` (type: `string`):

Choose the ESPN sport used by league-based targets. It is ignored when the chosen Target does not use a sport.

## `leagues` (type: `array`):

Enter one or more ESPN league slugs. One list can make a cross-league briefing.

## `__isDebug` (type: `boolean`):

Internal debug setting.

## Actor input object example

```json
{
  "target": "scoreboards",
  "scoreboardDate": "2025-11-29",
  "scheduleTeamId": "12",
  "rosterTeamId": "12",
  "gameId": "401810171",
  "oddsGameId": "401810171",
  "athleteQuery": "LeBron James",
  "newsKeywords": [
    "trade",
    "injury"
  ],
  "searchQuery": "Boston Celtics",
  "sport": "football",
  "leagues": [
    "nfl",
    "college-football"
  ]
}
```

# Actor output Schema

## `results` (type: `string`):

Open the structured result rows from this run.

# 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 = {
    "target": "scoreboards",
    "scoreboardDate": "2025-11-29",
    "sport": "football",
    "leagues": [
        "nfl",
        "college-football"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/espn-mcp-server").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 = {
    "target": "scoreboards",
    "scoreboardDate": "2025-11-29",
    "sport": "football",
    "leagues": [
        "nfl",
        "college-football",
    ],
}

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

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

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

```

## CLI example

```bash
echo '{
  "target": "scoreboards",
  "scoreboardDate": "2025-11-29",
  "sport": "football",
  "leagues": [
    "nfl",
    "college-football"
  ]
}' |
apify call maximedupre/espn-mcp-server --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=maximedupre/espn-mcp-server",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "ESPN MCP Server",
        "description": "Get ESPN scoreboards, schedules, standings, teams, rosters, athlete data, news, rankings, odds, and game details. Save structured sports data for AI research or export it from an Actor run.",
        "version": "0.0",
        "x-build-id": "M9cFJA722pyS7AM5w"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/maximedupre~espn-mcp-server/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-maximedupre-espn-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/maximedupre~espn-mcp-server/runs": {
            "post": {
                "operationId": "runs-sync-maximedupre-espn-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/maximedupre~espn-mcp-server/run-sync": {
            "post": {
                "operationId": "run-sync-maximedupre-espn-mcp-server",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "target"
                ],
                "properties": {
                    "target": {
                        "title": "Target",
                        "enum": [
                            "scoreboards",
                            "schedules",
                            "standings",
                            "teams",
                            "roster",
                            "gameAnalysis",
                            "odds",
                            "athlete",
                            "news",
                            "rankings",
                            "search"
                        ],
                        "type": "string",
                        "description": "Choose the ESPN result you want. Options for other targets are ignored."
                    },
                    "scoreboardDate": {
                        "title": "Date",
                        "type": "string",
                        "description": "Get games on this calendar date. Leave it empty for the current scoreboard."
                    },
                    "scheduleTeamId": {
                        "title": "Team ID",
                        "type": "string",
                        "description": "Limit the schedule to one ESPN team ID. Leave it empty for the full league schedule."
                    },
                    "scheduleStartDate": {
                        "title": "Start date",
                        "type": "string",
                        "description": "Get schedule rows on or after this calendar date."
                    },
                    "scheduleEndDate": {
                        "title": "End date",
                        "type": "string",
                        "description": "Get schedule rows on or before this calendar date."
                    },
                    "rosterTeamId": {
                        "title": "Team ID",
                        "type": "string",
                        "description": "Enter the ESPN team ID for the roster."
                    },
                    "gameId": {
                        "title": "Game ID",
                        "type": "string",
                        "description": "Enter the ESPN game ID for the game summary, box score, and other available details."
                    },
                    "oddsGameId": {
                        "title": "Game ID",
                        "type": "string",
                        "description": "Enter the ESPN game ID for available odds and win probability."
                    },
                    "athleteQuery": {
                        "title": "Athlete name or ID",
                        "type": "string",
                        "description": "Enter an athlete name to find a profile, or an ESPN athlete ID for detailed records."
                    },
                    "newsKeywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Enter words used to narrow ESPN news. Leave the list empty for recent league news.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "rankingType": {
                        "title": "Ranking",
                        "enum": [
                            "collegeFootball",
                            "collegeBasketballMen",
                            "collegeBasketballWomen",
                            "mma",
                            "boxing",
                            "tennisMen",
                            "tennisWomen"
                        ],
                        "type": "string",
                        "description": "Choose a supported ESPN ranking family."
                    },
                    "searchQuery": {
                        "title": "Search words",
                        "type": "string",
                        "description": "Enter a player, team, or league name to search on ESPN."
                    },
                    "sport": {
                        "title": "Sport",
                        "enum": [
                            "football",
                            "basketball",
                            "baseball",
                            "hockey",
                            "soccer",
                            "mma",
                            "boxing",
                            "golf",
                            "racing",
                            "tennis"
                        ],
                        "type": "string",
                        "description": "Choose the ESPN sport used by league-based targets. It is ignored when the chosen Target does not use a sport."
                    },
                    "leagues": {
                        "title": "Leagues",
                        "type": "array",
                        "description": "Enter one or more ESPN league slugs. One list can make a cross-league briefing.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "__isDebug": {
                        "title": "Debug mode",
                        "type": "boolean",
                        "description": "Internal debug setting."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
