Fantasy Football MCP Server
Provides sentiment analysis from Reddit for player buzz and injury updates.
Click on "Install 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., "@Fantasy Football MCP Serveroptimize my lineup for week 10"
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.
Fantasy Football MCP Server
A comprehensive Model Context Protocol (MCP) server for Yahoo Fantasy Football that provides intelligent lineup optimization, draft assistance, and league management through AI-powered tools.
๐ Features
Core Capabilities
Multi-League Support โ Automatically discovers and manages all Yahoo Fantasy Football leagues associated with your account
๐ Player Enhancement Layer โ Intelligent projection adjustments with bye week detection, recent performance stats, and breakout/declining player flags
Intelligent Lineup Optimization โ Advanced algorithms considering matchups, expert projections, and position-normalized value
Draft Assistant โ Real-time draft recommendations with strategy-based analysis and VORP calculations
Comprehensive Analytics โ Reddit sentiment analysis, team comparisons, and performance metrics
Multiple Deployment Options โ FastMCP, traditional MCP, Docker, and cloud deployment support
Advanced Analytics
Position Normalization โ Smart FLEX decisions accounting for different position baselines
Multi-Source Projections โ Combines Yahoo and Sleeper expert rankings with matchup analysis
Strategy-Based Optimization โ Conservative, aggressive, and balanced approaches
Volatility Scoring โ Floor vs ceiling analysis for consistent or boom-bust plays
Live Draft Support โ Real-time recommendations during active drafts
Related MCP server: flaim
๐ Player Enhancement Layer
The enhancement layer enriches player data with real-world context to fix stale projections and prevent common mistakes:
Key Features
โ Bye Week Detection โ Automatically zeros projections and displays "BYE WEEK - DO NOT START" for players on bye, preventing accidental starts
โ Recent Performance Stats โ Fetches last 1-3 weeks of actual performance from Sleeper API and displays trends (L3W avg: X.X pts/game)
โ Performance Flags โ Intelligent alerts including:
BREAKOUT_CANDIDATEโ Recent performance > 150% of projectionTRENDING_UPโ Recent performance exceeds projectionDECLINING_ROLEโ Recent performance < 70% of projectionHIGH_CEILINGโ Explosive upside potentialCONSISTENTโ Reliable, steady performance
โ Adjusted Projections โ Blends recent reality with stale projections for more accurate start/sit decisions (60/40 or 70/30 weighting based on confidence)
Example
Before Enhancement:
{
"name": "Rico Dowdle",
"sleeper_projection": 4.0,
"recommendation": "Bench"
}After Enhancement:
{
"name": "Rico Dowdle",
"sleeper_projection": 4.0,
"adjusted_projection": 14.8,
"performance_flags": ["BREAKOUT_CANDIDATE", "TRENDING_UP"],
"enhancement_context": "Recent breakout: averaging 18.5 pts over last 3 weeks",
"recommendation": "Strong Start"
}The enhancement layer is non-breaking and automatically applies to:
ff_get_roster(withinclude_external_data=True)ff_get_waiver_wire(withinclude_external_data=True)ff_get_players(withinclude_external_data=True)ff_build_lineup(automatic)
๐ ๏ธ Available MCP Tools
League & Team Management
ff_get_leaguesโ List all leagues for your authenticated Yahoo accountff_get_league_infoโ Retrieve detailed league metadata and team informationff_get_standingsโ View current league standings with wins, losses, and pointsff_get_rosterโ Inspect detailed roster information for any teamff_get_matchupโ Analyze weekly matchup details and projectionsff_compare_teamsโ Side-by-side team roster comparisons for trades/analysisff_build_lineupโ Generate optimal lineups using advanced optimization algorithms
Player Discovery & Waiver Wire
ff_get_playersโ Browse available free agents with ownership percentagesff_get_waiver_wireโ Smart waiver wire targets with expert analysis (configurable count)ff_get_draft_rankingsโ Access Yahoo's pre-draft rankings and ADP data
Draft Assistant Tools
ff_get_draft_recommendationโ AI-powered draft pick suggestions with strategy analysisff_analyze_draft_stateโ Real-time roster needs and positional analysis during draftsff_get_draft_resultsโ Post-draft analysis with grades and team summaries
Advanced Analytics
ff_analyze_reddit_sentimentโ Social media sentiment analysis for player buzz and injury updatesff_get_api_statusโ Monitor cache performance and Yahoo API rate limitingff_clear_cacheโ Clear cached responses for fresh data (with pattern support)ff_refresh_tokenโ Automatically refresh Yahoo OAuth tokens
๐ฆ Installation
Quick Start
git clone https://github.com/derekrbreese/fantasy-football-mcp-public.git
cd fantasy-football-mcp-public
pip install -r requirements.txtYahoo API Setup
Create a Yahoo Developer App at developer.yahoo.com
Note your Consumer Key (Client ID) and Consumer Secret (Client Secret)
Set up your
.envfile with these credentialsComplete OAuth flow using the included authentication scripts
โ๏ธ Configuration
Create a .env file with your API credentials:
# Yahoo API Credentials (Required)
YAHOO_CLIENT_ID=your_consumer_key_here
YAHOO_CLIENT_SECRET=your_consumer_secret_here
YAHOO_ACCESS_TOKEN=your_access_token
YAHOO_REFRESH_TOKEN=your_refresh_token
YAHOO_GUID=your_yahoo_guid
# Reddit API Credentials (Optional - for sentiment analysis)
REDDIT_CLIENT_ID=your_reddit_client_id
REDDIT_CLIENT_SECRET=your_reddit_client_secret
REDDIT_USERNAME=your_reddit_usernameNote: Reddit credentials are optional. The app will work without them, but Reddit sentiment analysis features will be unavailable. See Reddit API Setup Guide for detailed instructions.
Initial Authentication
First-time setup:
cd utils
python setup_yahoo_auth.pyRe-authentication (if tokens expired):
cd utils
python reauth_yahoo.pyToken refresh (when access token expires):
cd utils
python refresh_yahoo_token.pyThe authentication scripts will:
Open your browser for Yahoo OAuth authorization
Automatically update your
.envfile (preserving existing variable line positions)Automatically update MCP config files (Claude Desktop, Cursor, Antigravity) if they exist
Display confirmation messages
Important: After authentication or token refresh, restart your MCP client to use the new tokens.
๐ Deployment Options
Local Development (FastMCP)
python fastmcp_server.pyConnect via HTTP transport at http://localhost:8000
Claude Code Integration (Stdio)
python fantasy_football_multi_league.pyDocker Deployment
docker build -t fantasy-football-mcp .
docker run -p 8080:8080 --env-file .env fantasy-football-mcpCloud Deployment (Render/Railway/etc.)
The server includes multiple compatibility layers for various cloud platforms:
render_server.py- Render.com deploymentsimple_mcp_server.py- Generic HTTP/WebSocket serverfastmcp_server.py- FastMCP cloud deployments
๐งช Testing
# Run full test suite
pytest
# Test OAuth authentication
python tests/test_oauth.py
# Test MCP connection
python tests/test_mcp_client.py๐ Project Structure
fantasy-football-mcp-public/
โโโ fastmcp_server.py # FastMCP HTTP server implementation
โโโ fantasy_football_multi_league.py # Main MCP stdio server
โโโ lineup_optimizer.py # Advanced lineup optimization engine
โโโ matchup_analyzer.py # Defensive matchup analysis
โโโ position_normalizer.py # FLEX position value calculations
โโโ src/
โ โโโ agents/ # Specialized analysis agents
โ โโโ models/ # Data models for players, lineups, drafts
โ โโโ strategies/ # Draft and lineup strategies
โ โโโ services/ # Player enhancement and external integrations
โ โโโ utils/ # Utility functions and configurations
โโโ tests/ # Comprehensive test suite
โโโ utils/ # Authentication and token management
โโโ requirements.txt # Python dependencies๐ง Advanced Configuration
Strategy Weights (Balanced Default)
{
"yahoo": 0.40, # Yahoo expert projections
"sleeper": 0.40, # Sleeper expert rankings
"matchup": 0.10, # Defensive matchup analysis
"trending": 0.05, # Player trending data
"momentum": 0.05 # Recent performance
}Draft Strategies
Conservative: Prioritize proven players, minimize risk
Aggressive: Target high-upside breakout candidates
Balanced: Optimal mix of safety and ceiling potential
Position Scoring Baselines
RB: ~11 points (standard scoring)
WR: ~10 points (standard scoring)
TE: ~7 points (standard scoring)
FLEX calculations include position scarcity adjustments
๐ Performance Metrics
The optimization engine targets:
85%+ accuracy on start/sit decisions
+2.0 points per optimal decision on average
90%+ lineup efficiency vs. manual selection
Position-normalized FLEX decisions to avoid TE traps
๐ Troubleshooting
Common Issues
Authentication Errors
# Refresh expired tokens (expire hourly)
cd utils
python refresh_yahoo_token.py
# Full re-authentication if refresh fails
cd utils
python reauth_yahoo.py
# Or first-time setup
cd utils
python setup_yahoo_auth.pyNote: All authentication scripts automatically update your .env file and MCP config files. After running any authentication script, restart your MCP client (Claude Desktop, Cursor, etc.) to use the new tokens.
Only One League Showing
Verify
YAHOO_GUIDmatches your Yahoo accountEnsure leagues are active for current season
Check team ownership detection in logs
Rate Limiting
Yahoo allows 1000 requests/hour
Server implements 900/hour safety limit
Use
ff_get_api_statusto monitor usageClear cache with
ff_clear_cacheif needed
Stale Data
Cache TTLs: Leagues (1hr), Standings (5min), Players (15min)
Force refresh with
ff_clear_cachetoolCheck last update times in
ff_get_api_status
๐ค Contributing
This is the public version of the Fantasy Football MCP Server. For contributing:
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
๐ License
MIT License - see LICENSE file for details
๐ Acknowledgments
Yahoo Fantasy Sports API for comprehensive league data
Sleeper API for expert rankings and defensive analysis
Reddit API for player sentiment analysis
Model Context Protocol (MCP) framework
Note: This server requires active Yahoo Fantasy Football leagues and valid API credentials. Ensure you have proper authorization before accessing league data.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/derekrbreese/fantasy-football-mcp-public'
If you have feedback or need assistance with the MCP directory API, please join our Discord server