ESPN Fantasy MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ESPN Fantasy MCP Server Show me my league standings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: MLB V3 Scores MCP Server
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.comCopy
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-mcpKeep 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]"
pytestTo 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
Available Tools
16 toolsaccept_tradeA
Accept a pending trade offer from another team. Uses a confirmation pattern: first call (confirm=false) previews the acceptance, second call (confirm=true) executes it. You need the transaction ID from the trade proposal.
Inputs: confirm, team_id, league_id, season_year, +2 more. Returns: result
add_free_agentA
Add a free agent to your team, optionally dropping a player. Uses a confirmation pattern: first call (confirm=false) previews the changes, second call (confirm=true) executes them. If your roster is full, you must specify a player to drop.
Inputs: confirm, team_id, league_id, season_year, +3 more. Returns: result
cancel_tradeA
Cancel a pending trade proposal you sent. Uses a confirmation pattern: first call (confirm=false) previews the cancellation, second call (confirm=true) executes it. You need the transaction ID from the original trade proposal.
Inputs: confirm, team_id, league_id, season_year, +2 more. Returns: result
cancel_waiverA
Cancel a pending waiver claim. Uses a confirmation pattern: first call (confirm=false) previews the cancellation, second call (confirm=true) executes it. You need the transaction ID from the original waiver claim to cancel it.
Inputs: confirm, team_id, league_id, season_year, +2 more. Returns: result
claim_waiverA
Submit a waiver claim with optional FAAB bid. Uses a confirmation pattern: first call (confirm=false) previews the changes, second call (confirm=true) executes them. Waiver claims are processed during waiver periods and have a pending status until processed. If your roster is full, you must specify a player to drop.
Inputs: confirm, team_id, league_id, bid_amount, +4 more. Returns: result
decline_tradeA
Decline a trade offer from another team. Uses a confirmation pattern: first call (confirm=false) previews the decline, second call (confirm=true) executes it.
Inputs: comment, confirm, team_id, league_id, +3 more. Returns: result
drop_playerA
Drop a player from your team. Uses a confirmation pattern: first call (confirm=false) previews the changes, second call (confirm=true) executes them.
Inputs: confirm, team_id, league_id, player_id, +2 more. Returns: result
get_free_agentsA
Get list of available free agents on the waiver wire.
Inputs: size, position, league_id, season_year. Returns: result
get_league_settingsB
Get league configuration including scoring categories, roster settings, and league rules.
Inputs: league_id, season_year. Returns: result
get_pending_transactionsA
Get waiver claims and trade proposals for a team, including all statuses (PENDING, EXECUTED, CANCELED). Each entry includes its status field. For trades, returns both sent and received proposals.
Inputs: team_id, league_id, season_year. Returns: result
get_player_infoA
Look up a player by name and get detailed information including stats, position, team, and roster status. Supports fuzzy matching for misspelled names.
Inputs: player_name (required), league_id, season_year. Returns: result
get_rosterB
Get current roster for a team with player details and lineup positions.
Inputs: team_id, league_id, season_year. Returns: result
get_standingsA
Get current league standings with team records and rankings.
Inputs: league_id, season_year. Returns: result
get_teamB
Get detailed information about a specific team.
Inputs: team_id, league_id, season_year. Returns: result
modify_lineupA
Modify team lineup by moving players between lineup slots. Uses a confirmation pattern: first call (confirm=false) previews the changes, second call (confirm=true) executes them. Can move a single player or swap multiple players in one transaction.
Inputs: moves, confirm, team_id, league_id, +2 more. Returns: result
propose_tradeA
Propose a trade with another team. Uses a confirmation pattern: first call (confirm=false) previews the trade, second call (confirm=true) sends it. Returns a transaction ID that can be used to cancel the proposal.
Inputs: comment, confirm, team_id, league_id, +6 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a clearly distinct purpose, covering different aspects of fantasy sports management. There is no ambiguity between similar tools like add_free_agent and claim_waiver, as they are differentiated by immediate vs. pending actions.
All tool names follow a consistent verb_noun pattern using snake_case (e.g., get_team, modify_lineup, propose_trade). The naming is predictable and intuitive.
With 16 tools, the server is well-scoped for a fantasy sports platform. The count is sufficient to cover essential operations without being excessive.
The tool set provides comprehensive CRUD operations for team, roster, waivers, and trades. All core fantasy sports actions are covered, including lineup modifications, free agent management, waiver claims, and trade proposals.
Maintenance
Related MCP Connectors
MLB Stats API MCP — official MLB statistics (keyless).
ESPN MCP — keyless multi-sport live scores, teams, and news via ESPN's public site API.
Remote MCP server for live sports data. Ask for scores, standings, player stats and Elo ratings across 9 sports directly from Claude or any MCP client. Backed by the Big Balls Sports API, with one unified schema for every sport.
MCP server for Financial Modeling Prep API with 250+ financial data tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with MLB (Major League Baseball) v3 projections through the SportsData.io API, allowing access to baseball statistics and projections through natural language.-
- FlicenseNot gradedqualityDmaintenanceAn MCP Server that enables interaction with MLB scores and statistics via the SportsData.io MLB V3 Scores API, allowing users to access baseball data through natural language queries.-
- AlicenseNot gradedqualityBmaintenanceConnect ESPN & Yahoo fantasy leagues to AI assistants via MCP. Read-only tools for rosters, standings, matchups, free agents, and league info across football and baseball.23MIT
- FlicenseNot gradedqualityDmaintenanceMCP server for Fantrax fantasy baseball that provides tools to read league info, rosters, standings, free agents, and related data.-