Get the FREE Ultimate OpenClaw Setup Guide →

yahoo-fantasy-baseball

MCP Server for the Yahoo Fantasy Sports API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository: git clone <repository-url> cd yahoo-fantasy-baseball-MCP

  2. Install dependencies: npm install

  3. 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

  4. Build the TypeScript sources (if applicable): npm run build

  5. 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

Sponsor this space

Reach thousands of developers