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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。