yahoo-fantasy-baseball
MCP Server for the Yahoo Fantasy Sports API
claude mcp add --transport stdio jimbrig-yahoo-fantasy-baseball-mcp node path/to/yahoo-fantasy-baseball-MCP/build/index.js \ --env YAHOO_CLIENT_ID="your_yahoo_client_id" \ --env YAHOO_ACCESS_TOKEN="your_access_token" \ --env YAHOO_CLIENT_SECRET="your_yahoo_client_secret"
How to use
This MCP server provides programmatic access to Yahoo Fantasy Baseball data through a Claude-compatible interface. It uses OAuth 1.0a authentication to access the Yahoo Fantasy Sports API, enabling tools that fetch a team roster, player stats, and related information for your leagues. You can integrate this server with Claude so you can issue natural language requests like retrieving your current lineup or querying player stats and have responses returned in a structured format. The available tools are designed to be simple function calls within Claude's MCP protocol, returning data such as team rosters and upcoming matchups where available.
How to install
Prerequisites:
- Node.js v16 or higher
- npm (comes with Node.js)
- Yahoo Developer account with API credentials
- A Yahoo Fantasy baseball league
Install and run the server:
-
Clone the repository: git clone <repository-url> cd yahoo-fantasy-baseball-MCP
-
Install dependencies: npm install
-
Create and configure environment variables by editing the .env file (or setting them in your environment): YAHOO_CLIENT_ID=your_yahoo_client_id YAHOO_CLIENT_SECRET=your_yahoo_client_secret YAHOO_ACCESS_TOKEN=your_access_token
-
Build the TypeScript sources (if applicable): npm run build
-
Start the server: npm start
Optional: If you need to regenerate or refresh tokens, follow Yahoo's OAuth workflow and update the .env values accordingly.
Additional notes
Notes and tips:
- Ensure your Yahoo OAuth tokens are valid; tokens may expire and require refreshing according to Yahoo's OAuth workflow.
- The MCP configuration example uses a Node.js runtime and points to the built index.js file; adjust the path if your build output differs.
- If you encounter connection or authentication errors, verify that YAHOO_CLIENT_ID, YAHOO_CLIENT_SECRET, and YAHOO_ACCESS_TOKEN are correctly set in your environment or .env file.
- The available tools include get_team_roster (to fetch current roster), get_waiver_players (Coming Soon), and get_matchup (Coming Soon). As the API evolves, endpoints and capabilities may change; keep dependencies up to date and monitor the repository for updates.
Related MCP Servers
frontmcp
TypeScript-first framework for the Model Context Protocol (MCP). You write clean, typed code; FrontMCP handles the protocol, transport, DI, session/auth, and execution flow.
editor
MCP Server for AI automation of the PlayCanvas Editor
mcp-bun
Bun Javascript Runtime MCP Server for AI Agents
formula1
MCP server from Panth1823/formula1-mcp
mcp -weather-js
Simple Weather MCP Server Example
xgmem
Global Memory MCP server, that manage all projects data.