Flaim MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "FLAIM_API_KEY=${FLAIM_API_KEY}" flaim -- npx -y @flaim/mcp
Required:FLAIM_API_KEY
README.md

Connect ESPN, Yahoo, and Sleeper leagues to AI assistants via MCP.

Flaim Fantasy

Connect your ESPN, Yahoo, and Sleeper leagues to ChatGPT, Claude, and Gemini CLI so you can ask about your actual team, matchup, standings, and waiver wire. Flaim combines live league data with built-in fantasy analyst guidance, so the answers are grounded in your league instead of generic rankings.

Read-only by design. No trades, no drops, no roster changes — just advice.

How It Works

The Flaim skill teaches your AI assistant how to behave like a fantasy analyst — which data to pull, how to interpret it, and how to turn it into useful advice. The MCP tools feed it your actual league data. Together, they give a general-purpose AI enough structure to answer like it knows your specific league.

Get Started

  1. Sign up at flaim.app
  2. Connect your platforms — ESPN via Chrome extension, Yahoo via OAuth, Sleeper by username
  3. Leagues auto-discovered — all your leagues and past seasons are found automatically
  4. Pick a default league for AI conversations
  5. Install the skill — recommended for agent-skill tools; copy .agents/skills/flaim-fantasy/ into your project or home directory (see The Skill below)
  6. Add Flaim to your AI — use the MCP URL in Claude, ChatGPT, or Gemini CLI
  7. Ask questions — "Who should I start this week?", "What's on the waiver wire?", etc.

The Skill

The Flaim skill teaches your AI assistant how to behave like a fantasy analyst — when to use which tools, how to interpret league data, and how to turn that context into useful advice.

Install for Claude Code (or any Agent Skills-compatible tool):

Place the skill in your project's .agents/skills/ directory (cross-platform convention) or in ~/.agents/skills/ for global use:

# Clone or copy the skill directory
cp -r flaim/.agents/skills/flaim-fantasy ~/.agents/skills/flaim-fantasy

The AI will detect and activate the skill automatically when you ask fantasy questions.

MCP Tools

Tool What it does
get_user_session Your leagues across all platforms
get_ancient_history Historical leagues and seasons (2+ years old)
get_league_info League settings and members
get_roster Team roster with player stats
get_matchups Weekly matchups and scores
get_standings League standings and rankings
get_free_agents Available free agents sorted by ownership
get_players Player lookup with ownership context
get_transactions Recent adds, drops, waivers, and trades

All tools connect through a single MCP endpoint: https://api.flaim.app/mcp

Supported Platforms

Platform Sports Auth
ESPN Football, Baseball, Basketball, Hockey Chrome extension or manual cookies
Yahoo Football, Baseball, Basketball, Hockey OAuth 2.0
Sleeper Football, Basketball Username (public API)

Architecture

Chrome Extension → flaim.app → Auth Worker → Supabase
                      ↓
Claude/ChatGPT/Gemini CLI → Fantasy MCP Gateway → ESPN/Yahoo/Sleeper Clients → Platform APIs
  • Web App (Next.js on Vercel) — dashboard, OAuth, league management
  • MCP Gateway (Cloudflare Workers) — unified endpoint for all platforms and sports
  • Platform Clients (Cloudflare Workers) — ESPN, Yahoo, Sleeper API normalization
  • Auth Worker (Cloudflare) — token validation, rate limiting, credential storage
  • Supabase — user data, OAuth tokens, credentials

About

Solo indie project — built with care, maintained for the long term. No VC funding, no growth pressure, just a useful tool for fantasy sports fans who use AI.

Development

git clone https://github.com/jdguggs10/flaim.git
cd flaim && npm install
cp web/.env.example web/.env.local  # add keys
npm run dev
Document Description
Architecture System design, deployment, troubleshooting
Changelog Release history
Web App Next.js routes, components, environment
Workers Cloudflare Workers, MCP tools, ESPN API
Extension Chrome extension build, Sync Host, CWS

Getting Help

Best-effort support — I'll respond when I can.

License

MIT License — see LICENSE.

Tools (9)

get_user_sessionRetrieves your leagues across all platforms.
get_ancient_historyRetrieves historical leagues and seasons (2+ years old).
get_league_infoRetrieves league settings and members.
get_rosterRetrieves team roster with player stats.
get_matchupsRetrieves weekly matchups and scores.
get_standingsRetrieves league standings and rankings.
get_free_agentsRetrieves available free agents sorted by ownership.
get_playersPerforms player lookup with ownership context.
get_transactionsRetrieves recent adds, drops, waivers, and trades.

Environment Variables

FLAIM_API_KEYrequiredAPI key for accessing the Flaim MCP gateway.

Configuration

claude_desktop_config.json
{"mcpServers": {"flaim": {"command": "npx", "args": ["-y", "@flaim/mcp"], "env": {"FLAIM_API_KEY": "your_api_key"}}}}

Try it

Who should I start in my flex position this week based on my current roster and matchup?
What are the best available free agents on the waiver wire for my league?
Can you analyze my current league standings and tell me what I need to do to make the playoffs?
Who are the most recent players added or dropped in my league?

Frequently Asked Questions

What are the key features of Flaim?

Unified MCP endpoint for ESPN, Yahoo, and Sleeper fantasy leagues. Read-only access to rosters, matchups, standings, and waiver wire data. Automatic league discovery across multiple platforms and past seasons. Integration with AI assistants to provide grounded, league-specific fantasy advice.

What can I use Flaim for?

Getting personalized start/sit advice based on your actual team roster and weekly opponent. Identifying high-value waiver wire pickups by analyzing current free agent ownership. Reviewing recent league transaction trends to stay ahead of competitors. Analyzing historical performance data from past seasons to improve draft strategy.

How do I install Flaim?

Install Flaim by running: cp -r flaim/.agents/skills/flaim-fantasy ~/.agents/skills/flaim-fantasy

What MCP clients work with Flaim?

Flaim works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Flaim docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare