Skip to main content
ClaudeWave
cyanheads avatar
cyanheads

sports-mcp-server

View on GitHub

Get live scores, schedules, standings, team and player data for NFL, NBA, MLB, NHL, soccer, and more via MCP. STDIO or Streamable HTTP.

MCP ServersOfficial Registry1 stars0 forksTypeScriptApache-2.0Updated today
ClaudeWave Trust Score
95/100
Verified
Passed
  • Open-source license (Apache-2.0)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Last scanned: 8/22/2026
Install in Claude Code / Claude Desktop
Method: Manual
Claude Code CLI
git clone https://github.com/cyanheads/sports-mcp-server
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "sports": {
      "command": "node",
      "args": ["/path/to/sports-mcp-server/dist/index.js"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
💡 Clone https://github.com/cyanheads/sports-mcp-server and follow its README for install instructions.
Use cases

MCP Servers overview

<div align="center">
  <h1>@cyanheads/sports-mcp-server</h1>
  <p><b>Get live scores, schedules, standings, team and player data for NFL, NBA, MLB, NHL, soccer, and more via MCP. STDIO or Streamable HTTP.</b>
  <div>7 Tools</div>
  </p>
</div>

<div align="center">

[![Version](https://img.shields.io/badge/Version-0.1.4-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/sports-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/sports-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/sports-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0%2B-blueviolet.svg?style=flat-square)](https://bun.sh/)

</div>

<div align="center">

[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/sports-mcp-server/releases/latest/download/sports-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=sports-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvc3BvcnRzLW1jcC1zZXJ2ZXIiXX0=) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22sports-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fsports-mcp-server%22%5D%7D)

[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)

</div>

---

## Tools

Seven tools organized around what an agent needs — find a team or player, get today's scores, check the schedule, read the standings, or pull full team or player detail:

| Tool | Description |
|:-----|:------------|
| `sports_find_team` | Resolve a team name or partial name to its canonical record and source IDs. Use before any team-scoped query. |
| `sports_find_player` | Resolve a player name to their canonical record via TheSportsDB. Disambiguation step before player-scoped queries. |
| `sports_get_scores` | Live and final scores for a league on a given date, optionally scoped to a specific team. |
| `sports_get_schedule` | Upcoming and past fixtures for a team or league over a date range. |
| `sports_get_standings` | Current standings or league table for a league and season. |
| `sports_get_team` | Team detail: active roster, last 5 results, next 3 fixtures, venue, and metadata. |
| `sports_get_player` | Player detail: bio, current team, position, nationality, birth date, height/weight, and thumbnail. |

### `sports_find_team`

Resolve a fuzzy team name to its canonical record across ESPN, MLB StatsAPI, and TheSportsDB.

- Returns full name, league, logo URL, venue, and ESPN/MLB/TheSportsDB cross-reference IDs
- Use before `sports_get_scores`, `sports_get_schedule`, `sports_get_standings`, or `sports_get_team` to get a valid `team_name`
- Fuzzy match on display name, abbreviation, or location (e.g. "Mariners", "SEA", "Seattle Seahawks")

---

### `sports_find_player`

Resolve a player name to their canonical record.

- Multi-sport player search via TheSportsDB
- Optional `sport` filter to narrow ambiguous names (e.g. "Michael Jordan")
- Returns player ID, full name, current team, position, nationality, birth date, and thumbnail URL
- Use the returned `player_id` with `sports_get_player` for full bio detail

---

### `sports_get_scores`

Live and final scores for a league on a given date.

- Routes NFL/NBA/NHL/soccer → ESPN; MLB → MLB StatsAPI (more authoritative)
- Returns home/away teams, current score, status (`scheduled`/`in-progress`/`final`), period/clock, and UTC start time
- Omit `date` for today's games; use `team_name` to filter to one team's game
- Returns `games: [], reason: '...'` (not an error) when no games are scheduled

---

### `sports_get_schedule`

Upcoming and past fixtures for a team or league over a date range.

- Fetches full season from ESPN and applies `date_from`/`date_to` filtering server-side
- Returns opponent, home/away flag, UTC date/time, venue, and result for completed games
- Omit `team_name` for the full league calendar; provide it for a single team's fixtures

---

### `sports_get_standings`

Current standings or league table for a league and season.

- Returns rank, W/L (or points for soccer/NHL), division/conference, streak, and games behind
- Omit `season` for the current season; pass a YYYY year for historical standings
- NHL uses points system (`wins`/`otLosses`/`losses`); soccer returns `points` for the league table

---

### `sports_get_team`

Composite team detail combining multiple source calls.

- Active roster (or squad), last 5 results, next 3 fixtures, venue, and team metadata
- MLB teams use MLB StatsAPI for roster and schedule; all others use ESPN

---

### `sports_get_player`

Full player profile from TheSportsDB.

- Bio, current team, position, nationality, birth date, height/weight, career description
- Media thumbnail URL for display
- Accepts `tsdb:`-prefixed IDs (from `sports_find_player`) or raw numeric TheSportsDB IDs

---

## Features

Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):

- Declarative tool definitions — single file per tool, framework handles registration and validation
- Unified error handling — handlers throw, framework catches, classifies, and formats
- Pluggable auth: `none`, `jwt`, `oauth`
- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`
- Structured logging with optional OpenTelemetry tracing
- STDIO and Streamable HTTP transports

Sports-specific:

- Three keyless sources — ESPN site API, MLB StatsAPI, TheSportsDB (free tier key `3`) — no API credentials required
- League routing table internally routes each query to the best source per sport; agents never reference an upstream API
- Normalized output types across all sources — `NormalizedGame`, `NormalizedTeam`, `NormalizedPlayer`, `NormalizedStanding` — with source provenance on every record
- Graceful degradation — empty scoreboards (off-season, no games) return `games: []` with a `reason` string, not an error

Agent-friendly output:

- Source provenance on every record — `source: 'espn' | 'mlbstats' | 'thesportsdb'` so agents can reason about data authority
- Structured `reason` field on empty score responses so agents can explain the result to users
- Cross-source IDs surfaced by `sports_find_team` — `espnId`, `mlbId`, `tsdbId` — for seamless downstream routing without re-resolving names

## Getting started

Add the following to your MCP client configuration file.

```json
{
  "mcpServers": {
    "sports": {
      "type": "stdio",
      "command": "bunx",
      "args": ["@cyanheads/sports-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}
```

Or with npx (no Bun required):

```json
{
  "mcpServers": {
    "sports": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@cyanheads/sports-mcp-server@latest"],
      "env": {
        "MCP_TRANSPORT_TYPE": "stdio",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}
```

Or with Docker:

```json
{
  "mcpServers": {
    "sports": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "MCP_TRANSPORT_TYPE=stdio",
        "ghcr.io/cyanheads/sports-mcp-server:latest"
      ]
    }
  }
}
```

For Streamable HTTP, set the transport and start the server:

```sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
```

### Prerequisites

- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).
- No API keys required — ESPN and MLB StatsAPI are fully keyless; TheSportsDB ships with a free public test key (`3`).

### Installation

1. **Clone the repository:**

```sh
git clone https://github.com/cyanheads/sports-mcp-server.git
```

2. **Navigate into the directory:**

```sh
cd sports-mcp-server
```

3. **Install dependencies:**

```sh
bun install
```

4. **Configure environment:**

```sh
cp .env.example .env
# edit .env to override defaults (all optional)
```

## Configuration

| Variable | Description | Default |
|:---------|:------------|:--------|
| `THESPORTSDB_API_KEY` | TheSportsDB API key. Replace with a paid key for higher rate limits. | `3` |
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |
| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |
| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |

See [`.env.example`](./.env.example) for the full list of optional overrides.

## Running the server

### Local development

- **Build and run:**

  ```sh
  # One-time build
  bun run rebuild

  # Run the built server
  bun run start:stdio
  # or
  bun run start:http
  ```

- **Run checks and tests:**

  ```sh
  bun run devcheck   # Lint, format, typecheck, security
  bun run test       # Vitest test suite
  bun run lint:mcp   # Validate MCP definitions against spec
  ```

### Docker

```sh
do
ai-agentsai-toolscyanheadsespnmcpmcp-servermlbmodel-context-protocolscoressportstypescript

What people ask about sports-mcp-server

What is cyanheads/sports-mcp-server?

+

cyanheads/sports-mcp-server is mcp servers for the Claude AI ecosystem. Get live scores, schedules, standings, team and player data for NFL, NBA, MLB, NHL, soccer, and more via MCP. STDIO or Streamable HTTP. It has 1 GitHub stars and its last recorded update is dated 2026-08-21.

How do I install sports-mcp-server?

+

You can install sports-mcp-server by cloning the repository (https://github.com/cyanheads/sports-mcp-server) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is cyanheads/sports-mcp-server safe to use?

+

Our security agent has analyzed cyanheads/sports-mcp-server and assigned a Trust Score of 95/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains cyanheads/sports-mcp-server?

+

cyanheads/sports-mcp-server is maintained by cyanheads. The last recorded GitHub activity is dated 2026-08-21, with 7 open issues.

Are there alternatives to sports-mcp-server?

+

Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.

Deploy sports-mcp-server to your cloud

Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.

Maintain this repo? Add a badge to your README

Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.

Featured on ClaudeWave: cyanheads/sports-mcp-server
[![Featured on ClaudeWave](https://claudewave.com/api/badge/cyanheads-sports-mcp-server)](https://claudewave.com/repo/cyanheads-sports-mcp-server)
<a href="https://claudewave.com/repo/cyanheads-sports-mcp-server"><img src="https://claudewave.com/api/badge/cyanheads-sports-mcp-server" alt="Featured on ClaudeWave: cyanheads/sports-mcp-server" width="320" height="64" /></a>

More MCP Servers

sports-mcp-server alternatives