ESPN Fantasy MCP Server
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:
- Log in to ESPN Fantasy Baseball
- Open browser DevTools → Application → Cookies →
https://fantasy.espn.com - Copy
espn_s2(long string) andSWID(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
- Tool Reference — all available tools and parameters
- Configuration — scopes, manual config, troubleshooting
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
- Built with MCP Python SDK
- Uses espn-api
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)
| File | Size | Uploaded | |
|---|---|---|---|
| espn_fantasy_mcp-0.2.0.tar.gz | 31.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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