Get the FREE Ultimate OpenClaw Setup Guide →

mcp_espn_ff

ESPN Fantasy API with LLMs!

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio kbthree13-mcp_espn_ff uv --directory /absolute/path/to/directory run espn_fantasy_server.py \
  --env ESPN_PASSWORD="Your ESPN account password or placeholder" \
  --env ESPN_USERNAME="Your ESPN account username or placeholder"

How to use

The ESPN Fantasy Football MCP Server exposes tools to interact with the ESPN Fantasy Football API through a uniform MCP interface. You can fetch league information, view team rosters, retrieve player statistics, check league standings, and examine weekly matchup details. These tools are designed to be called by an LLM or other automation agents to programmatically query ESPN data for a fantasy football setup, including private leagues that require authentication. The authentication tool securely stores ESPN credentials for the current session so private leagues can be accessed without repeatedly re-authenticating.

To use the server, connect to it via your MCP-enabled environment (for example from Claude Desktop). The available tools map to API actions such as getting league info, listing rosters, pulling player stats, and retrieving matchup details. Each tool returns structured data that can be parsed and incorporated into your planning, decision-making, or natural language responses. When you need fresh data for a specific week or player, call the corresponding tool with the required parameters (e.g., league ID, team ID, player name) and use the returned data in your analysis or prompts.

How to install

Prerequisites:

  • Python 3.10 or higher
  • uv package manager (as used by Claude Desktop)
  • Claude Desktop for the best experience (optional but recommended)

Installation steps:

  1. Prepare your environment

    • Ensure Python is installed: python --version (should be 3.10+)
    • Install or configure the uv package manager as described by your environment (the README uses uv for running Python-based MCP servers).
  2. Create the MCP server entry

    • In a directory of your choice, place the server script espn_fantasy_server.py. This script should implement the MCP tools listed in the README (Authentication, League Info, Team Rosters, Player Stats, League Standings, Matchup Information).
  3. Configure Claude Desktop (or your MCP consumer)

    • Update your MCP config to reference the server using uv, with the directory of the server script and the entry script name, e.g.: { "mcpServers": { "espn-fantasy-football": { "command": "uv", "args": [ "--directory", "/absolute/path/to/directory", "run", "espn_fantasy_server.py" ], "env": { "ESPN_USERNAME": "Your ESPN username", "ESPN_PASSWORD": "Your ESPN password" } } } }
  4. Run and test

    • Ensure the server script is accessible at the specified path, then start Claude Desktop or your MCP client and verify the tools respond with expected data.
  5. Usage in production

    • Once verified, you can rely on the MCP server to fetch live ESPN data for leagues you have access to, including private leagues with authenticated sessions.

Additional notes

Notes and tips:

  • The ESPN credentials used for authentication should be kept secure and are only used for private leagues during the session.
  • If you rotate credentials, ensure the MCP server re-authenticates or you update the stored session data.
  • When querying data, ensure you pass the correct identifiers (league ID, team ID, player names) as expected by each tool.
  • If you encounter API rate limits, consider caching results and revalidating data before making repeated requests.
  • The provided mcp_config example uses the server name espn-fantasy-football to align with the README's CLI example; you can rename this key if desired, but ensure any consumer references are updated accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers