Yahoo Fantasy Baseball MCP
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., "@Yahoo Fantasy Baseball MCPShow me my roster for today"
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.
Yahoo Fantasy Baseball MCP
An MCP (Model Context Protocol) server that connects Claude to your Yahoo Fantasy Baseball team. Use it to set your daily lineup, scout free agents, and analyze your roster — all through natural conversation.
Features
View your roster, stats, standings, scoreboard, and matchup
Browse and filter available free agents by position
Set your daily lineup with a single request
All via Claude Desktop or any MCP-compatible client
Prerequisites
Python 3.10+
A Yahoo developer app with Fantasy Sports API access
Create one at developer.yahoo.com/apps/
Set the redirect URI to
oob(out-of-band / PIN-based)Note your Consumer Key and Consumer Secret
Installation
cd yahoo-fantasy-baseball-mcp
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtConfiguration
Copy the example config and fill in your credentials:
cp config.json.example config.jsonEdit config.json:
{
"yahoo_consumer_key": "your_consumer_key",
"yahoo_consumer_secret": "your_consumer_secret",
"league_id": "123456",
"team_id": 3,
"game_code": "mlb",
"game_id": 422,
"season": 2025,
"token_file": ".yahoo_token.json"
}Field | Description |
| From your Yahoo developer app |
| From your Yahoo developer app |
| Found in your league URL on Yahoo Fantasy |
| Your integer team ID (auto-discovered by setup) |
| Always |
| Yahoo's numeric MLB game ID for the season (auto-discovered) |
| Current season year |
| Path for storing OAuth token (relative to project dir) |
Authentication Setup
Run the setup script once to complete OAuth and save your token:
python setup_auth.pyThis will:
Open a browser window to Yahoo's OAuth page
Ask you to log in and authorize the app
Prompt you to paste the verification code
Save the token to
.yahoo_token.jsonAuto-discover and save your
team_idandgame_id
After setup, the server auto-refreshes the token — you won't need to re-authenticate.
Claude Desktop Integration
Add the server to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS) or Claude Code Config ($CLAUDE_CONFIG_DIR/.claude.json on macOS):
{
"mcpServers": {
"yahoo-fantasy-baseball": {
"command": "/path/to/yahoo-fantasy-baseball-mcp/.venv/bin/python",
"args": ["/path/to/yahoo-fantasy-baseball-mcp/baseball_mcp.py"]
}
}
}claude mcp add-json "yahoo-fantasy-baseball" '{"command": "/path/to/yahoo-fantasy-baseball-mcp/.venv/bin/python", "args": ["/path/to/yahoo-fantasy-baseball-mcp/baseball_mcp.py"]}'claude-personal mcp add-json "yahoo-fantasy-baseball" '{"command": "/Users/carrington/personal/fantasy-sports/yahoo-fantasy-baseball-mcp/.venv/bin/python", "args": ["/Users/carrington/personal/fantasy-sports/yahoo-fantasy-baseball-mcp/baseball_mcp.py"]}''{"command": "/Users/carrington/personal/fantasy-sports/yahoo-fantasy-baseball-mcp/.venv/bin/python", "args": ["/Users/carrington/personal/fantasy-sports/yahoo-fantasy-baseball-mcp/baseball_mcp.py"]}'
'{"type": "http", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "MYPAT" }}'
Restart Claude Desktop and you should see the baseball tools available.
Available Tools
Tool | Description |
| Team name, record, standings |
| Roster for a date with current position slots |
| Season stats for all rostered players |
| Available free agents filtered by position/sort |
| Stats + ownership for one player |
| League standings |
| Scoring period scoreboard |
| Your team's matchup detail |
| Scoring categories, roster positions, rules |
| Set your daily lineup via Yahoo API |
Example Prompts
"Show me my current roster for today"
"Who are the top available starting pitchers?"
"Find a better second baseman who is available — compare them to who I have"
"Set my lineup for today — put [player] on the bench and activate [player]"
"How does my team compare to my opponent this week?"
"What are the league standings?"
Setting Your Lineup
The baseball_set_lineup tool requires the complete roster — every player must be assigned a slot. The recommended workflow:
"Show me my roster for today" → Claude calls
baseball_get_roster"Move [player] to the bench and start [player] at SP" → Claude calls
baseball_set_lineupwith the full updated list
Valid starting positions: C, 1B, 2B, 3B, SS, OF, Util, SP, RP, P
Bench/IL slots: BN, IL, IL+, NA (availability depends on your league settings)
Troubleshooting
Token expired: The server auto-refreshes tokens. If you see auth errors, re-run python setup_auth.py.
Wrong team_id: Check your team URL on Yahoo Fantasy — the number at the end is your team ID.
game_id is wrong: Run python setup_auth.py again — it will auto-discover the current season's game ID.
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/ChrisArrington/yahoo-fantasy-baseball-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server