[Integrations](https://spiral.ai/integrations) › [Claude Code](https://spiral.ai/integrations/claude-code) › [ESPN team directory](https://spiral.ai/integrations/claude-code/espn-team-directory)

# How to Use ESPN team directory in Claude Code

Get ESPN's teams for a league, including team identities, abbreviations, locations and logos. Use it to match a club name before retrieving its schedule or to build a team selector.

|  |  |
| --- | --- |
| Model | ESPN team directory |
| Available through | Alexandria |
| Category | Sports |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with ESPN team directory in Claude Code

- Use ESPN team directory to retrieve NBA teams and replace the hard-coded team choices in this project's personal basketball dashboard with returned names and abbreviations.
- Use ESPN team directory to find Arsenal in the English Premier League and save its returned identity in this project's team configuration.
- Use ESPN team directory to retrieve NHL teams and generate a local lookup of returned team identities, names and abbreviations for this project's hockey views.
- Use ESPN team directory to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from ESPN team directory and tell me what changed since last week.

## How to set up ESPN team directory in Claude Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: This adds Spiral to the current project. Add `--scope user` to use it in every project.

```bash
claude mcp add --transport http spiral https://api.spiral.ai/mcp
```

2. **Sign in**: Start `claude`, type `/mcp`, choose spiral and Authenticate. Sign in to Spiral in the browser and click Authorize. No API key.

### Use the Spiral skill

1. **Send Claude Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run ESPN team directory**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "espn-com/sports-data/teams",
    "input": {
      "sport": "<sport>",
      "league": "<league>"
    }
  }'
```

Then paste one of the prompts above: Claude Code finds ESPN team directory on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/claude-code

## ESPN team directory tools and prices

- [ESPN · Teams](https://spiral.ai/tools/alexandria/espn-com/sports-data/teams) (Alexandria): $0.00873 per call.

## What can you do with ESPN team directory in Claude Code?

Build a personal sports app with a league team selector and a game calendar. A coding agent can connect ESPN team identities to fixtures, scores and explicit game status in your project's views.

### Personal game calendar

Match the Boston Celtics in the NBA directory, then turn their upcoming fixtures into a personal calendar with opponents and start times.

### Weekly basketball workload

Enumerate NBA teams, retrieve their schedules and count games in the coming week. Identify teams playing on consecutive dates for a fantasy basketball planning sheet.

### Recent results comparison

Resolve Arsenal and Chelsea within the Premier League, then compare their last five completed league games using opponents and scores.

### Schedule change checks

Keep a watchlist tied to ESPN team identities, then compare successive schedule responses for changed start times or game status.

### Personal sports app prototype

Populate a league team selector with names and abbreviations, then show the selected team's fixtures and completed results.

### Multi-team viewing plan

Identify the New York Knicks and Brooklyn Nets in the NBA directory, then compare upcoming start times to find overlapping games.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All Claude Code guides](https://spiral.ai/integrations/claude-code)

## ESPN team directory in other agents

- [Amp](https://spiral.ai/integrations/amp/espn-team-directory)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/espn-team-directory)
- [Claude](https://spiral.ai/integrations/claude-desktop/espn-team-directory)
- [Cline](https://spiral.ai/integrations/cline/espn-team-directory)
- [Codex](https://spiral.ai/integrations/codex/espn-team-directory)
- [Cursor](https://spiral.ai/integrations/cursor/espn-team-directory)
- [Devin](https://spiral.ai/integrations/devin/espn-team-directory)
- [dots](https://spiral.ai/integrations/dots/espn-team-directory)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/espn-team-directory)
- [Gemini](https://spiral.ai/integrations/gemini/espn-team-directory)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/espn-team-directory)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/espn-team-directory)
- [goose](https://spiral.ai/integrations/goose/espn-team-directory)
- [Grok](https://spiral.ai/integrations/grok/espn-team-directory)
- [Grok Build](https://spiral.ai/integrations/grok-build/espn-team-directory)
- [Hermes](https://spiral.ai/integrations/hermes/espn-team-directory)
- [Instinct](https://spiral.ai/integrations/instinct/espn-team-directory)
- [Manus](https://spiral.ai/integrations/manus/espn-team-directory)
- [Muse](https://spiral.ai/integrations/muse/espn-team-directory)
- [Muse Code](https://spiral.ai/integrations/muse-code/espn-team-directory)
- [n8n](https://spiral.ai/integrations/n8n/espn-team-directory)
- [Notion](https://spiral.ai/integrations/notion/espn-team-directory)
- [OpenClaw](https://spiral.ai/integrations/openclaw/espn-team-directory)
- [opencode](https://spiral.ai/integrations/opencode/espn-team-directory)
- [Perplexity](https://spiral.ai/integrations/perplexity/espn-team-directory)
- [Raycast](https://spiral.ai/integrations/raycast/espn-team-directory)
- [VS Code](https://spiral.ai/integrations/vscode/espn-team-directory)
- [Windsurf](https://spiral.ai/integrations/windsurf/espn-team-directory)
- [Zapier](https://spiral.ai/integrations/zapier/espn-team-directory)

## More Claude Code guides

- [ESPN team details](https://spiral.ai/integrations/claude-code/espn-team-details)
- [ESPN team roster](https://spiral.ai/integrations/claude-code/espn-team-roster)
- [ESPN team and player search](https://spiral.ai/integrations/claude-code/espn-team-and-player-search)
- [ESPN team schedule](https://spiral.ai/integrations/claude-code/espn-team-schedule)
- [ESPN sports and leagues](https://spiral.ai/integrations/claude-code/espn-sports-and-leagues)
- [FFToday season projections](https://spiral.ai/integrations/claude-code/fftoday-season-projections)

## Questions about ESPN team directory in Claude Code

**Can Claude Code use ESPN team directory?**

Yes. Add Spiral to Claude Code as an MCP server, and Claude Code can find and run ESPN team directory like any built-in tool.

**How much does ESPN team directory cost in Claude Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Claude Code plan is separate.

**Do I need an Alexandria account to use ESPN team directory in Claude Code?**

No. Spiral runs ESPN team directory on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up ESPN team directory in Claude Code?**

About two minutes: add the hosted server, then sign in.

**Does Claude Code wait while ESPN team directory runs?**

ESPN team directory runs in the background. Claude Code starts the run, checks on it and gives you the json when it's ready.

**Is ESPN's coverage limited to US sports?**

No. The documented coverage includes US and international sports, including the NFL, NBA, MLB and NHL. Its boundary is what ESPN exposes, so it is not a promise of every league worldwide.

**Where does this ESPN data come from?**

It comes from ESPN's public site and core JSON APIs. The team directory identifies clubs within a league, while the schedule data describes their games.

**Can two ESPN teams have the same name?**

Yes. ESPN's documented example includes Arsenal in both the Premier League and the Women's Super League. Match the competition as well as the club name before comparing records.

**Does ESPN guarantee this data will always be available?**

Disney's terms covering ESPN supply the products as is and as available. That is a limit on the source's warranty, not a guarantee of uninterrupted data availability.

**Does public access permit commercial reuse?**

Disney's terms prohibit commercial or business uses except as expressly licensed. Public accessibility alone does not establish permission to redistribute ESPN content commercially.

