GregBaugues/tokenbowl-mcp
If you are the rightful owner of tokenbowl-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Token Bowl MCP Server is a high-performance Model Context Protocol server designed for the Token Bowl fantasy football league, providing seamless access to league data and real-time updates.
Token Bowl MCP Server
A Model Context Protocol (MCP) server for the Token Bowl fantasy football league, built with FastMCP and the Sleeper Fantasy Sports API.
Quick Start
Use the Hosted Server (Recommended)
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"tokenbowl": {
"url": "https://tokenbowl-mcp.haihai.ai/sse"
}
}
}
That's it! The server is already running and ready to use.
Run Your Own Instance
# Clone and setup
git clone https://github.com/GregBaugues/tokenbowl-mcp.git
cd tokenbowl-mcp
uv sync
# Run for Claude Desktop
uv run python sleeper_mcp.py
# Run as web server
uv run python sleeper_mcp.py http
Configuration
Create a .env
file:
# Your Sleeper league ID (defaults to Token Bowl)
SLEEPER_LEAGUE_ID=1266471057523490816
# Optional: Redis for caching
REDIS_URL=redis://localhost:6379
# Optional: Fantasy Nerds API for enhanced analytics
FFNERD_API_KEY=your_api_key_here
Available Tools
The server provides 27 MCP tools for fantasy football operations:
League Operations
get_league_info
- League settings and configurationget_league_rosters
- All team rostersget_roster
- Detailed roster with player dataget_league_users
- League participantsget_league_matchups
- Weekly matchupsget_league_transactions
- Trades and waiversget_league_winners_bracket
- Playoff brackets
Player Data
search_players_by_name
- Find players by nameget_player_by_sleeper_id
- Get player detailsget_trending_players
- Trending adds/dropsget_player_stats_all_weeks
- Season statsget_waiver_wire_players
- Available free agentsget_waiver_analysis
- Waiver recommendations
Utility
get_nfl_schedule
- Weekly game schedulehealth_check
- Server status
Development
# Run tests
uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format .
# Clear cache
uv run python clear_cache.py
See for detailed development instructions.
Project Structure
The codebase is modular and well-organized for maintainability:
sleeper-mcp/
āāā sleeper_mcp.py # MCP tool definitions (~2,400 lines)
āāā lib/ # Reusable business logic modules
ā āāā validation.py # Parameter validation utilities
ā āāā decorators.py # MCP tool decorator (logging, error handling)
ā āāā enrichment.py # Player data enrichment functions
ā āāā league_tools.py # League operation business logic
āāā cache_client.py # Cache interface for player data
āāā build_cache.py # Cache building and refreshing
āāā scripts/ # Utility scripts
āāā tests/ # Comprehensive test suite (166 tests)
āāā data/ # Data files and analyses
āāā picks/ # Weekly picks
āāā slopups/ # Weekly summaries
āāā scratchpads/ # Development notes
Architecture Highlights
Modular Design: Business logic is extracted into focused modules for:
- Validation - Reusable parameter validation across all tools
- Enrichment - Player data enrichment with stats, projections, trending data
- League Operations - Complex league business logic (rosters, matchups, transactions)
- Decorators - Shared logging and error handling patterns
Separation of Concerns: MCP tools in sleeper_mcp.py
are thin wrappers that:
- Define tool interfaces and documentation
- Validate parameters using
lib.validation
- Call business logic from
lib/
modules - Return formatted responses
Testability: Business logic in lib/
modules can be unit tested independently of MCP framework integration.
License
MIT
Built with ā¤ļø for my Tokenbowl Friends