# Flaim - Fantasy Sports AI Connector [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/jdguggs10/flaim  
**GitHub Stars:** 21  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/flaim-fantasy-sports-ai-connector

## Description
Connect ESPN & Yahoo fantasy leagues to Claude, ChatGPT, and Gemini via MCP

## Tools
Capabilities this server exposes over MCP:

- **get_user_session** — Your leagues across all platforms
- **refresh_leagues** — Re-discover connected leagues and update Flaim's league records
- **get_ancient_history** — Past seasons and historical leagues outside the current season
- **get_league_info** — Baseline league context: settings, scoring, roster config, teams/owners
- **get_draft** — Confirmed draft results and provider-grounded draft-pick ownership
- **get_roster** — Team roster with player stats
- **get_matchups** — Weekly matchups and scores
- **get_standings** — League standings and rankings
- **get_free_agents** — Available players with a normalized envelope; ESPN/Yahoo include platform-wide ownership percentages, Sleeper returns identities only
- **get_players** — Player lookup; ESPN and Yahoo can add league ownership when available, Sleeper evaluates league ownership against current rosters outside live drafts
- **get_transactions** — Recent adds, drops, waivers, and trades

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "flaim-fantasy-sports-ai-connector": {
    "url": "https://api.flaim.app/mcp"
  }
}
```

## Documentation & README

# Flaim Fantasy

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![MCP Tools](https://img.shields.io/badge/MCP_Tools-11-green.svg)](https://api.flaim.app/mcp)
[![Chrome Web Store](https://img.shields.io/badge/Chrome_Extension-v1.5.2-yellow.svg)](https://chromewebstore.google.com/detail/flaim-espn-fantasy-connec/mbnokejgglkfgkeeenolgdpcnfakpbkn)

Connect your ESPN, Yahoo, and Sleeper leagues, then use Flaim Fantasy in ChatGPT or Claude for read-only analysis grounded in your real league. Advanced users can also add Flaim manually as a custom connector in compatible AI platforms.

Analysis tools are read-only by design. No trades, no drops, no roster changes — just advice. League refresh can update Flaim's connected-league records so newly available seasons show up.

## How It Works

The **Flaim skill** is an analyst playbook: how to reason about a start/sit call, a waiver claim, a trade, a keeper, or a matchup preview, and what context to gather in what order. The **MCP tools** feed it your actual league data and carry their own mechanics (parameters, response fields, platform differences) in their descriptions. Together, they give a general-purpose AI enough structure to answer like it knows your specific league.

## Get Started

1. **Create your Flaim account** at [flaim.app](https://flaim.app).
2. **Connect your fantasy leagues** — ESPN via [Chrome extension](https://chromewebstore.google.com/detail/flaim-espn-fantasy-connec/mbnokejgglkfgkeeenolgdpcnfakpbkn), Yahoo via Yahoo sign-in, or Sleeper by username. Flaim discovers supported leagues and shows them in [Your Leagues](https://flaim.app/leagues).
3. **Connect your AI app:** Open Flaim Fantasy in [ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_69a8f78087e081919e52cacacf00ff36) or [Claude](https://claude.ai/directory/connectors/f1a5b6a4-1f5b-470c-af23-71fc7ab13754), or follow the optional Perplexity custom-connector path in the [connection docs](https://github.com/jdguggs10/flaim/blob/HEAD/docs/CONNECTOR-DOCS.md). Public setup docs live at [flaim.app/docs](https://flaim.app/docs).

You are done. Ask questions such as "Who should I start this week?" or "What's on the waiver wire?" Defaults and additional league management are optional after setup.

## The Skill

The Flaim skill is the judgment layer. It covers what Flaim is and cannot do, how to gather league context in order, and a playbook per decision type: start/sit, waivers and pickups, trades, keepers and dynasty, matchup previews, draft picks, season history, and multi-league comparisons. Tool mechanics stay in the tool descriptions and the server instructions, which every MCP client reads live, so the skill does not restate them.

**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:

```bash
# 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 |
| `refresh_leagues` | Re-discover connected leagues and update Flaim's league records |
| `get_ancient_history` | Past seasons and historical leagues outside the current season |
| `get_league_info` | Baseline league context: settings, scoring, roster config, teams/owners |
| `get_draft` | Confirmed draft results and provider-grounded draft-pick ownership |
| `get_roster` | Team roster with player stats |
| `get_matchups` | Weekly matchups and scores |
| `get_standings` | League standings and rankings |
| `get_free_agents` | Available players with a normalized envelope; ESPN/Yahoo include platform-wide ownership percentages, Sleeper returns identities only |
| `get_players` | Player lookup; ESPN and Yahoo can add league ownership when available, Sleeper evaluates league ownership against current rosters outside live drafts |
| `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 |
| **Yahoo** | Football, Baseball, Basketball, Hockey | OAuth 2.0 |
| **Sleeper** | Football, Basketball | Username (public API) |

## Architecture

```
Chrome Extension → flaim.app → Auth Worker → Supabase
                      ↓
ChatGPT / Claude / manual MCP clients → Fantasy MCP Gateway → ESPN/Yahoo/Sleeper Clients → Platform APIs
```

- **Web App (Next.js on Vercel)** — landing/site pages, public live demo, 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

```bash
git clone https://github.com/jdguggs10/flaim.git
cd flaim
corepack pnpm install
cp web/.env.example web/.env.local  # add keys
corepack pnpm run dev
```

Root, web, and workers use `pnpm` via Corepack. The Chrome extension is intentionally npm-isolated under `extension/` with its own lockfile and release flow.

| Document | Description |
|----------|-------------|
| [Architecture](https://github.com/jdguggs10/flaim/blob/HEAD/docs/ARCHITECTURE.md) | System design, deployment, troubleshooting |
| [Changelog](https://github.com/jdguggs10/flaim/blob/HEAD/docs/CHANGELOG.md) | Release history |
| [Connection Docs](https://github.com/jdguggs10/flaim/blob/HEAD/docs/CONNECTOR-DOCS.md) | ChatGPT and Claude links plus optional custom-connector guidance (public version: [flaim.app/docs](https://flaim.app/docs)) |
| [Web App](https://github.com/jdguggs10/flaim/blob/HEAD/web/README.md) | Next.js routes, components, environment |
| [Workers](https://github.com/jdguggs10/flaim/blob/HEAD/workers/README.md) | Cloudflare Workers, MCP tools, ESPN API |
| [Extension](https://github.com/jdguggs10/flaim/blob/HEAD/extension/README.md) | Chrome extension build, Sync Host, CWS |

## Getting Help

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

- [GitHub Issues](https://github.com/jdguggs10/flaim/issues)
- [GitHub Discussions](https://github.com/jdguggs10/flaim/discussions)

## License

MIT License — see [LICENSE](https://github.com/jdguggs10/flaim/blob/HEAD/LICENSE).

