Skip to main content

MCP server for ESPN Fantasy Sports API

Project description

ESPN Fantasy MCP Server

Tests PyPI Python License: MIT

MCP (Model Context Protocol) server providing access to ESPN Fantasy Baseball data, for use with Claude Code and other MCP clients.

Features

  • Read league settings, standings, and team information
  • View rosters with player details and lineup positions
  • Look up players by name with fuzzy matching
  • Browse and add free agents, submit waiver claims
  • Modify lineups
  • Propose, accept, decline, and cancel trades

Quick Start

1. Get ESPN Cookies

To access private leagues, you need ESPN authentication cookies:

  1. Log in to ESPN Fantasy Baseball
  2. Open browser DevTools → Application → Cookies → https://fantasy.espn.com
  3. Copy espn_s2 (long string) and SWID (format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX})

2. Add to Claude Code

claude mcp add --scope user --transport stdio espn-fantasy \
  --env ESPN_S2=your_espn_s2_cookie \
  --env ESPN_SWID={your_espn_swid_cookie} \
  --env ESPN_LEAGUE_ID=your_league_id \
  --env ESPN_TEAM_ID=your_team_id \
  --env ESPN_SEASON_YEAR=2026 \
  -- uvx espn-fantasy-mcp

Keep the curly braces in the SWID value. uvx handles installation automatically — no separate install step needed.

3. Verify

Restart Claude Code or run /mcp and confirm "espn-fantasy" appears in the server list. Then try: "Show me my fantasy baseball league settings"

Documentation

Local Development

git clone https://github.com/i-am-david-weinstein/espn-fantasy-mcp.git
cd espn-fantasy-mcp
pip install -e ".[dev]"
pytest

To use a local install with Claude Code, replace the uvx ... portion of the claude mcp add command with python3 -m espn_fantasy_mcp.

Contributing

Contributions welcome — open an issue or submit a pull request.

License

MIT

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

espn_fantasy_mcp-0.2.0.tar.gz (31.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

espn_fantasy_mcp-0.2.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file espn_fantasy_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: espn_fantasy_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 31.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for espn_fantasy_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5dc6626184f89f3197ea3506c6770974f59d7df3380b6a61e15457829ca2255a
MD5 d739dd76d18f960b7f8000bda8368880
BLAKE2b-256 4d8d623e757709fc091b0ea2222bb887472c49f63ffd0579c4325f276eca32ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for espn_fantasy_mcp-0.2.0.tar.gz:

Publisher: publish.yml on i-am-david-weinstein/espn-fantasy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file espn_fantasy_mcp-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for espn_fantasy_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1cf38c62bf52ceecdb47e92ddea26e1e97aa420b5233c613e38563f3a86f5605
MD5 74b566e2dba50dd8939893aa1e731912
BLAKE2b-256 5a9d07736f238bca21a3c27f01db99cfb742dd72bb7bd862d7a4feaae2648122

See more details on using hashes here.

Provenance

The following attestation bundles were made for espn_fantasy_mcp-0.2.0-py3-none-any.whl:

Publisher: publish.yml on i-am-david-weinstein/espn-fantasy-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page