Fantasy Football MCP Server is a comprehensive tool that leverages Model Context Protocol (MCP) to optimize Yahoo Fantasy Football teams. It provides intelligent lineup optimization, draft assistance, and league management through AI-powered analytics, combining data from multiple sources to deliver actionable insights for fantasy managers.
This layer enriches player data with real-world context:
git clone https://github.com/derekrbreese/fantasy-football-mcp-public.git
cd fantasy-football-mcp-public
pip install -r requirements.txt
Create a .env file with your Yahoo API credentials:
YAHOO_CONSUMER_KEY=your_consumer_key_here
YAHOO_CONSUMER_SECRET=your_consumer_secret_here
YAHOO_ACCESS_TOKEN=your_access_token
YAHOO_REFRESH_TOKEN=your_refresh_token
YAHOO_GUID=your_yahoo_guid
# First-time setup
python setup_yahoo_auth.py
# Or manual authentication
python reauth_yahoo.py
python fastmcp_server.py
Connect via HTTP transport at http://localhost:8000
python fantasy_football_multi_league.py
docker build -t fantasy-football-mcp .
docker run -p 8080:8080 --env-file .env fantasy-football-mcp
{
    "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
}
Authentication Errors
# Refresh expired tokens (expire hourly)
python utils/refresh_token.py
# Full re-authentication if refresh fails
python reauth_yahoo.py
Only One League Showing
YAHOO_GUID matches your Yahoo accountRate Limiting
ff_get_api_status to monitor usageff_clear_cache if neededStale Data
ff_clear_cache toolff_get_api_statusTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "fantasy-football-mcp" '{"command":"python","args":["-m","fantasy_football_multi_league.py"]}'See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:
{
    "mcpServers": {
        "fantasy-football-mcp": {
            "command": "python",
            "args": [
                "-m",
                "fantasy_football_multi_league.py"
            ]
        }
    }
}To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json2. Add this to your configuration file:
{
    "mcpServers": {
        "fantasy-football-mcp": {
            "command": "python",
            "args": [
                "-m",
                "fantasy_football_multi_league.py"
            ]
        }
    }
}3. Restart Claude Desktop for the changes to take effect