Sponsored by Deepsite.site

Flaim - Fantasy Sports AI Connector

Created By
jdguggs10a month ago
Connect ESPN & Yahoo fantasy leagues to AI assistants via MCP. Read-only tools for rosters, standings, matchups, free agents, and league info across football and baseball. Works with Claude, ChatGPT, and Gemini.
Overview

Flaim - Fantasy League AI Connector

Doc routing: see docs/INDEX.md.

Flaim connects your ESPN fantasy leagues to AI assistants like Claude, ChatGPT, and Gemini CLI. It's an MCP (Model Context Protocol) service that gives AI tools access to your live fantasy data.

How It Works

  1. Create a Clerk account & sign in — This is where your ESPN credentials and league info are stored
  2. Sync ESPN credentials — Install the Chrome extension to sync automatically, or enter them manually
  3. Leagues auto-discovered — Extension finds all your leagues + past seasons and saves them
  4. Pick a default — Select which league to use by default in AI conversations
  5. Connect your AI — Add Flaim as a custom MCP connector in Claude, ChatGPT, or Gemini CLI using the MCP URL
  6. Use MCP tools — Ask about your roster, matchups, standings, etc. directly in your AI

Bring your own LLM subscription. Flaim provides the data bridge.

Automation vs Manual (Quick Clarification)

  • Extension (automatic): Auto-pulls ESPN s2/swid and saves to supabase. Runs only when the user clicks Sync / Re-sync. It discovers leagues + past seasons and can set a default.
  • Site (manual): /leagues is independent. Users can add leagues by ID and manually trigger season discovery.

What Flaim Is

Flaim is an authentication and data service for fantasy sports AI integrations:

  • MCP Server: Exposes fantasy league data to Claude and ChatGPT via the Model Context Protocol
  • OAuth Provider: Handles secure authentication between AI clients and your ESPN data
  • Credential Manager: Securely stores and manages ESPN session cookies

Flaim is not a chatbot or AI product itself — it's the bridge that lets you use your preferred AI tool with your fantasy data.

Features

  • Chrome Extension (v1.5.0): Auto-capture ESPN credentials without manual cookie extraction
  • Auto-Discovery (v1.2.1+): Fan API-based discovery of leagues + past seasons, with granular status messaging and default selection
  • Claude + ChatGPT + Gemini CLI: Direct access via MCP protocol (OAuth 2.1)
  • Live ESPN Data: espn-client worker with real-time stats
  • Multi-League + Multi-Season Support: Store multiple seasons per league and discover past seasons

About

Flaim is a solo indie project — built with care, maintained for the long term. The focus is on reliability, security, and doing one thing well. No VC funding, no growth pressure, just a useful tool for fantasy sports fans who use AI.

Season Years

Season year defaults are deterministic and use America/New_York time:

  • Baseball (flb): Defaults to the previous year until Feb 1, then switches to the current year
  • Football (ffl): Defaults to the previous year until Jul 1, then switches to the current year

MCP Tools

The unified gateway (https://api.flaim.app/mcp) exposes these tools:

ToolDescription
get_user_sessionUser's leagues across all platforms with IDs
get_ancient_historyHistorical leagues and seasons (2+ years old)
get_league_infoLeague settings and members
get_rosterTeam roster with player stats
get_matchupsCurrent/upcoming matchups
get_standingsLeague standings
get_free_agentsAvailable free agents

All tools take explicit parameters: platform, sport, league_id, season_year.

Architecture

Chrome Extension → flaim.app → Auth Worker → Supabase
Claude/ChatGPT/Gemini CLI → Fantasy MCP Gateway → ESPN Client → ESPN API
  • Chrome Extension: Captures ESPN cookies, syncs to Flaim
  • Web App (Next.js): User dashboard, OAuth endpoints, league management
  • Auth Worker (Cloudflare): Token validation, rate limiting, credential storage
  • Fantasy MCP Gateway (Cloudflare): Unified MCP endpoint for all sports
  • ESPN Client (Cloudflare): ESPN API calls (internal, called by gateway)
  • Supabase: User data, OAuth tokens, ESPN credentials

For Contributors

Solo developer, hobby project. Keep it simple and stable.

  • Small changes — 1-2 hour tasks, one new concept at a time
  • Boring tech — Stick to the stack (Next.js, Vercel, Clerk, Cloudflare, Supabase)
  • Official docs first — Copy from examples before inventing patterns

Documentation

DocumentDescription
ArchitectureSystem design, deployment, troubleshooting
Current Execution StateWhat is done, in progress, and next
ChangelogRelease history
Web AppNext.js routes, components, environment
WorkersCloudflare Workers, MCP tools, ESPN API
Manual OAuth RunbooksClaude, ChatGPT, and Gemini verification checklists
ExtensionChrome extension build, Sync Host, CWS

Quick Start (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

Getting Help

This is a solo indie project with best-effort support. I'll do my best to respond, but it may take time.

License

MIT License - see LICENSE.

Server Config

{
  "mcpServers": {
    "flaim": {
      "url": "https://api.flaim.app/mcp"
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
RedisA Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
Amap Maps高德地图官方 MCP Server
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Tavily Mcp
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
CursorThe AI Code Editor
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Playwright McpPlaywright MCP server