Yahoo Fantasy Baseball MCP Server
Manage your Yahoo Fantasy Baseball team via Claude — check rosters, scout free agents, set lineups, and pull advanced stats from Baseball Savant, FanGraphs, and MLB Stats API.
README
Fantasy Baseball for Claude
A Claude Desktop Extension — drag the .mcpb file into Claude and you're done. No npm, no terminal, no config files.
Let Claude look after your Yahoo Fantasy Baseball team: check your roster, scout free agents, review your matchup, and more. Everything runs on your own computer with your own Yahoo access.
Note: Adding/dropping players and setting lineups are not supported — Yahoo has deprecated the write-scope Fantasy Sports API (yfpy#79).
Part 1 · Install
- Download
yahoo-fantasy-baseball-vX.X.X.mcpbfrom the Releases page. - Open Claude Desktop — get it at claude.ai/download if needed.
- Go to Settings → Extensions.
- Drag the
.mcpbfile into the Extensions window and click Install.
Leave the Client ID / Client Secret boxes empty for now — you'll fill them in during setup.
Part 2 · Connect your Yahoo team
You only do this once. In a chat with Claude, type fantasy start and follow the prompts.
a) Create your free Yahoo app
Go to developer.yahoo.com/apps/create and fill in:
- Application Name: anything (e.g. "My Fantasy Helper")
- Homepage URL:
https://localhost:8488 - Redirect URI(s):
https://localhost:8488/callback - OAuth Client Type: Confidential Client
- API Permissions: Fantasy Sports → Read
- Click Create App
Yahoo gives you a Client ID and Client Secret.
b) Give those values to Claude
Paste them into the chat, or enter them in Settings → Extensions → Yahoo Fantasy Baseball, then say fantasy start again.
c) Authorize and finish
Click the link Claude gives you, then click Agree. If your browser warns about a self-signed certificate, click Advanced → Proceed to localhost. Once you see "Authorization complete!", say fantasy authorize. Claude will find your leagues, set your team as default, and you're ready. 🎉
Stuck? Type
fantasy statusand Claude will tell you what's left.
Part 3 · Talk to your team
| Say this… | …and Claude will |
|---|---|
fantasy show roster |
Show your current roster |
fantasy my matchup |
Summarize this week's matchup |
fantasy standings |
Show league standings |
fantasy who should I add |
Find the best free agents |
fantasy my stats this week |
Show your team's weekly totals |
fantasy recent moves |
List recent adds, drops, and trades |
analyze Shohei Ohtani |
Pull Statcast, xStats, FanGraphs WAR/wRC+, and recent splits |
analyze my roster |
Run the above for every player on your roster |
You can also ask naturally: "Who on my bench should I start tonight?" or "Is there a better closer available?"
What "analyze" pulls
| Source | Stats |
|---|---|
| MLB Stats API | Season totals + 14-day & 30-day splits |
| Baseball Savant | xBA, xSLG, xwOBA vs. actual; exit velocity, barrel %, hard-hit % |
| FanGraphs | WAR, wRC+/FIP/xFIP, K%, BB%, SwStr%, GB/FB% |
Analysis automatically targets your league's scoring categories. Results include links to each player's page on Baseball Savant, MLB.com, Baseball Reference, and FanGraphs. Leaderboard data is cached for one hour.
FAQ
Is my data safe? Your Yahoo keys are stored only on your computer (~/.yahoo-fantasy-mcp/config.json) and in your OS keychain. Nothing is sent anywhere but Yahoo's API.
Why do I need my own Yahoo app? Yahoo requires each person to use their own keys — no shared secrets.
Rate limit errors? Yahoo limits heavy use. Wait an hour and try again.
Does this cost anything? No. Both the Yahoo app and this extension are free.
analyze commands fail with a connection error? Claude may need explicit permission to reach the stats APIs. Go to Settings → Capabilities (Team/Enterprise: Organization settings → Capabilities) and add these under Additional allowed domains:
| Domain | Used for |
|---|---|
statsapi.mlb.com |
MLB Stats API |
baseballsavant.mlb.com |
Statcast / expected stats |
www.fangraphs.com |
FanGraphs WAR/wRC+ |
For developers
Local MCP server (Node.js + TypeScript, stdio transport) for the Yahoo Fantasy Sports v2 API.
npm install
npm run build # compile TypeScript → dist/
node dist/cli.js auth # optional terminal auth
node dist/cli.js serve # run MCP server over stdio
npm run pack # build .mcpb bundle
Use with Claude Code or any MCP client
claude mcp add yahoo-fantasy-baseball \
-e YF_CLIENT_ID=your_id -e YF_CLIENT_SECRET=your_secret \
-- node /absolute/path/to/dist/cli.js serve
Or add to claude_desktop_config.json:
{
"mcpServers": {
"yahoo-fantasy-baseball": {
"command": "node",
"args": ["/absolute/path/to/dist/cli.js", "serve"],
"env": { "YF_CLIENT_ID": "your_id", "YF_CLIENT_SECRET": "your_secret" }
}
}
}
Tools
Onboarding: fantasy_status, fantasy_login, fantasy_authorize, fantasy_logout, fantasy_select_team
Read: list_leagues, get_league, get_teams, get_team_roster, get_team_stats_week, get_team_stats_season, get_matchups, get_team_matchups, get_player_stats, rank_players, get_league_scoring_categories, get_transactions
Analysis (no Yahoo auth — public APIs): analyze_player_stats, analyze_roster_stats (accepts optional playerKeys array, max 10 per call)
Write (deprecated by Yahoo — require force: true): add_drop_player, set_lineup
Credentials resolve from the saved config or YF_CLIENT_ID / YF_CLIENT_SECRET env vars. Releases are published automatically by GitHub Actions on a v* tag.
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.