Skip to main content

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

Metadata

Release files for espn-fantasy-mcp 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for espn-fantasy-mcp 0.2.0
File Size Uploaded
espn_fantasy_mcp-0.2.0.tar.gz 31.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for espn-fantasy-mcp 0.2.0
File Interpreter ABI Platform
espn_fantasy_mcp-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.9 kB

Release files / espn_fantasy_mcp-0.2.0.tar.gz

Download URL espn_fantasy_mcp-0.2.0.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5dc6626184f89f3197ea3506c6770974f59d7df3380b6a61e15457829ca2255a
BLAKE2b-256 checksum
How to use checksums
4d8d623e757709fc091b0ea2222bb887472c49f63ffd0579c4325f276eca32ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.

Transparency log

Release files / espn_fantasy_mcp-0.2.0-py3-none-any.whl

Download URL espn_fantasy_mcp-0.2.0-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1cf38c62bf52ceecdb47e92ddea26e1e97aa420b5233c613e38563f3a86f5605
BLAKE2b-256 checksum
How to use checksums
5a9d07736f238bca21a3c27f01db99cfb742dd72bb7bd862d7a4feaae2648122
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page