MCP server for ESPN Fantasy Sports API
Project description
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 --from git+https://github.com/i-am-david-weinstein/espn-fantasy-mcp 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file espn_fantasy_mcp-0.1.0.tar.gz.
File metadata
- Download URL: espn_fantasy_mcp-0.1.0.tar.gz
- Upload date:
- Size: 34.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f288b91f9cf7d83610f6f1bf209d42d63ae2a63aeb168b6809d71662c44dd71
|
|
| MD5 |
ff89cbf1c54806680c5ec732edd0e197
|
|
| BLAKE2b-256 |
2c2cc5ee729a7fbef8558294577c55cb12020bf9d076c27ff4c524089e38f984
|
Provenance
The following attestation bundles were made for espn_fantasy_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on i-am-david-weinstein/espn-fantasy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
espn_fantasy_mcp-0.1.0.tar.gz -
Subject digest:
6f288b91f9cf7d83610f6f1bf209d42d63ae2a63aeb168b6809d71662c44dd71 - Sigstore transparency entry: 1096904964
- Sigstore integration time:
-
Permalink:
i-am-david-weinstein/espn-fantasy-mcp@53e84c8df4bd4bddaab222068777e6b6690ba6bb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/i-am-david-weinstein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@53e84c8df4bd4bddaab222068777e6b6690ba6bb -
Trigger Event:
push
-
Statement type:
File details
Details for the file espn_fantasy_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: espn_fantasy_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f3e1383cf75137b577b9996c0ba6f8b29268543fd2ccc8918ffbff1f1e32789
|
|
| MD5 |
c1dca64b90c0899236a2ffd153528fce
|
|
| BLAKE2b-256 |
ca58b1d1f0a42380f3ef9daf36bb98f5ff83238b7888ab1e8b78bbcd7204f7e4
|
Provenance
The following attestation bundles were made for espn_fantasy_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on i-am-david-weinstein/espn-fantasy-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
espn_fantasy_mcp-0.1.0-py3-none-any.whl -
Subject digest:
1f3e1383cf75137b577b9996c0ba6f8b29268543fd2ccc8918ffbff1f1e32789 - Sigstore transparency entry: 1096904966
- Sigstore integration time:
-
Permalink:
i-am-david-weinstein/espn-fantasy-mcp@53e84c8df4bd4bddaab222068777e6b6690ba6bb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/i-am-david-weinstein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@53e84c8df4bd4bddaab222068777e6b6690ba6bb -
Trigger Event:
push
-
Statement type: