
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
league-analysis-mcp-server
Advanced tools
Model Context Protocol server for Yahoo Fantasy Sports API with advanced historical analysis and manager profiling
A comprehensive Model Context Protocol (MCP) server that provides AI assistants with access to Yahoo Fantasy Sports data, including advanced historical analysis and manager profiling capabilities.
# Install uv (one-time setup)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
The server automatically downloads when you configure your MCP client. Just add the configuration below - no separate package installation needed!
How it works:
uv
(the package manager)uvx league-analysis-mcp-server
uvx
automatically downloads the server from PyPIFrom Source:
git clone https://github.com/ari1110/League-Analysis-MCP.git
cd League-Analysis-MCP
uv sync --all-extras
Then set up authentication using the conversational MCP tools (see streamlined setup below).
No more complex setup scripts! Authentication is now handled entirely through conversational MCP tools with two OAuth options:
5-Step Setup Process:
check_setup_status()
create_yahoo_app()
save_yahoo_credentials(key, secret)
start_automated_oauth_flow()
for fully automated setup✨ Fully Automated Experience:
5-Step Setup Process:
check_setup_status()
create_yahoo_app()
save_yahoo_credentials(key, secret)
start_oauth_flow()
and complete_oauth_flow(code)
📋 Manual Code Entry:
That's it! ✨ Everything happens in your conversation with the AI assistant. No file editing, no command line scripts, no leaving the interface.
For Best Results:
Why this matters:
SSL Certificate Handling:
When using automated OAuth, your browser may show a security warning for https://localhost:8080
. This is normal and safe:
Troubleshooting:
You: "Show me my fantasy league standings"
AI: Let me check that for you. First, I need to check your authentication setup.
→ Runs check_setup_status()
AI: I see you need to create a Yahoo Developer app first. Here are the exact steps:
→ Runs create_yahoo_app()
→ Shows step-by-step instructions with exact values to use
You: "I created the app! My key is dj0yJmk9... and secret is abc123..."
AI: Perfect! Let me save those credentials for you.
→ Runs save_yahoo_credentials(key, secret)
→ Automatically saves to your environment
AI: Great! Now let's complete the OAuth authorization. Please visit this URL:
→ Runs start_oauth_flow()
→ Shows authorization URL and clear instructions
You: "I authorized it and got code: xyz789"
AI: Excellent! Let me complete the setup.
→ Runs complete_oauth_flow("xyz789")
AI: 🎉 Setup complete! Now let me get your league standings...
→ Runs get_standings() and shows your data
Total time: ~2 minutes. No technical knowledge required!
For development or troubleshooting, you can also run the server manually after installing dependencies with uv sync --all-extras
.
# PyPI Installation (recommended):
uvx league-analysis-mcp-server
# Or if installed with pip:
league-analysis-mcp-server
# Development/Source:
uv run python -m src.server
For detailed setup instructions for all MCP clients, see MCP_INTEGRATION_GUIDE.md
Quick setup for Claude Desktop:
Add to claude_desktop_config.json
:
{
"mcpServers": {
"league-analysis": {
"command": "uvx",
"args": ["league-analysis-mcp-server"]
}
}
}
The integration guide covers configuration for Claude Desktop, Claude Code, Continue.dev, and other MCP clients with complete examples and troubleshooting.
After adding to your MCP client:
get_server_info()
Common issues:
Server not found:
uv run python -m src.server
Authentication errors:
check_setup_status()
https://localhost:8080/
)Permission issues:
Environment variables:
.env
file in project root with credentialscheck_setup_status()
- Check current authentication state and get next stepscreate_yahoo_app()
- Step-by-step Yahoo Developer app creation guidesave_yahoo_credentials(consumer_key, consumer_secret)
- Save Yahoo app credentialsstart_automated_oauth_flow()
- 🚀 Fully automated OAuth with callback server (recommended)start_oauth_flow()
- Begin manual OAuth authorization with clear instructionscomplete_oauth_flow(verification_code)
- Complete manual setup with verification codetest_yahoo_connection()
- Test API connectivity and troubleshoot issuesreset_authentication()
- Clear all auth data to start freshget_server_info()
- Server status and configurationget_setup_instructions()
- Comprehensive setup help (includes new tools guidance)list_available_seasons(sport)
- Available historical seasonsget_league_info(league_id, sport, season?)
- League settings and metadataget_standings(league_id, sport, season?)
- Current or historical standingsget_team_roster(league_id, team_id, sport, season?)
- Team roster informationget_matchups(league_id, sport, week?, season?)
- Weekly matchup dataget_historical_drafts(league_id, sport, seasons?)
- Draft results across seasonsget_season_transactions(league_id, sport, season)
- Transaction history for seasonanalyze_manager_history(league_id, sport, seasons?, team_id?)
- Manager performance patternscompare_seasons(league_id, sport, seasons)
- Season-to-season analysisanalyze_draft_strategy(league_id, sport, seasons?, team_id?)
- Draft pattern analysispredict_trade_likelihood(league_id, sport, team1_id?, team2_id?, seasons?)
- Trade predictionsevaluate_manager_skill(league_id, sport, seasons?, team_id?)
- Comprehensive skill evaluationclear_cache(cache_type?)
- Clear cached data ('all', 'current', 'historical')Access read-only data through these resource URIs:
league_overview://sport/league_id[/season]
- Comprehensive league overviewcurrent_week://sport/league_id
- Current week activity and focus areasleague_history://sport/league_id
- Multi-season history and trendsmanager_profiles://sport/league_id[/team_id]
- Manager profiling information# Get basic league info
result = get_league_info("123456", "nfl")
# Analyze manager performance across last 3 seasons
analysis = analyze_manager_history("123456", "nfl", ["2022", "2023", "2024"])
# Get draft strategies for all managers
draft_analysis = analyze_draft_strategy("123456", "nfl", ["2022", "2023", "2024"])
# Evaluate manager skill levels
skill_eval = evaluate_manager_skill("123456", "nfl", ["2022", "2023", "2024"])
# Predict trade likelihood between specific managers
trade_pred = predict_trade_likelihood("123456", "nfl", "team1", "team2")
The server includes game ID mappings for seasons 2015-2024 across all supported sports. These are automatically used when specifying historical seasons.
Authentication Errors
check_setup_status()
start_automated_oauth_flow()
for easiest setupreset_authentication()
to start freshget_setup_instructions()
for detailed guidanceOAuth Troubleshooting
start_oauth_flow()
)No Historical Data
Cache Issues
clear_cache("all")
to reset all cached dataget_server_info()
Rate Limiting
For issues and feature requests, please check the documentation or create an issue in the project repository.
MIT License - see LICENSE file for details.
Contributions welcome! Please read the contributing guidelines and submit pull requests for any improvements.
FAQs
Model Context Protocol server for Yahoo Fantasy Sports API with advanced historical analysis and manager profiling
We found that league-analysis-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.