mcp_espn_ff: Instructions file for Claude Code

CLAUDE.md

mcp_espn_ff CLAUDE.md is an instructions file for Claude Code from KBThree13/mcp_espn_ff. It costs 812 tokens per session, scanned A, original, MIT.

Repository instructions for an MCP server that lets AI assistants use the ESPN Fantasy Football API. MCP is a standard way for AI clients to call external tools.

In plain words
What is it for?
Use them to start and test the server, understand its single-file structure, manage league sessions, and connect it to an MCP client.
Why use it?
They explain how the server works and how to run it, including handling credentials and separating public from private leagues.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is KBThree13/mcp_espn_ff's own configuration. It tells Claude Code how to work on mcp_espn_ff itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp_espn_ff configures →

Reuse

Borrowing it

Nothing to install: this file belongs to KBThree13/mcp_espn_ff. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/KBThree13/mcp_espn_ff/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/KBThree13/mcp_espn_ff

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp_espn_ff CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kbthree13/mcp_espn_ff/claude-md/github.svg)](https://agentmods.dev/instructions/kbthree13/mcp_espn_ff/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kbthree13/mcp_espn_ff/claude-md"><img src="https://agentmods.dev/badge/instructions/kbthree13/mcp_espn_ff/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp_espn_ff CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/kbthree13/mcp_espn_ff/claude-md"><img src="https://agentmods.dev/badge/instructions/kbthree13/mcp_espn_ff/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 812 This file is loaded in full into every session.
When invoked 812 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00812 $0.00812
Opus 5.5 $0.00325 $0.00325
Sonnet 5.5 $0.00162 $0.00162
Haiku 4.5 $0.00081 $0.00081

Measured 2mo ago against content hash da805a8aa57d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp_espn_ff CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is an MCP (Model Context Protocol) server that provides LLMs like Claude with tools to interact with the ESPN Fantasy Football API. The server wraps the espn-api Python library and exposes its functionality through MCP tools.

Running the Server

The server is designed to be run by MCP clients like Claude Desktop. To test locally:

uv run espn_fantasy_server.py

Architecture

Single-File MCP Server

The entire server implementation is in espn_fantasy_server.py. It uses the FastMCP framework to define MCP tools.

Core Components

  1. ESPNFantasyFootballAPI Class (lines 29-72)

    • Manages ESPN league instances with caching
    • Handles per-session credential storage (ESPN_S2 and SWID cookies)
    • Uses cache keys that include authentication info to support both public and private leagues
  2. Session Management

    • Uses a simple SESSION_ID = "default_session" approach
    • Credentials are stored in memory per-session in the api.credentials dict
    • League instances are cached with keys that include auth info: {league_id}_{year}_{espn_s2}_{swid}
  3. Football Year Logic (lines 23-25)

    • Defaults to current calendar year
    • If before July, uses previous year (since NFL season spans calendar years)

MCP Tools

The server exposes 8 tools (all async functions decorated with @mcp.tool()):

  • authenticate() - Store ESPN credentials for accessing private leagues
  • get_league_info() - Basic league information
  • get_team_roster() - Player roster for a specific team
  • get_team_info() - Team statistics and transaction info
  • get_player_stats() - Stats for a specific player by name
  • get_league_standings() - Current standings sorted by wins/points
  • get_matchup_info() - Weekly matchup details
  • logout() - Clear stored credentials

Error Handling

All tools:

  • Use try/except blocks with logging to stderr via log_error()
  • Check for 401 errors or "Private" in exceptions to detect private league access issues
  • Return user-friendly string messages (not JSON) since MCP converts them

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 89 lines · 812 tokens per session scan A da805a8aa57d

Subscribe to this mod's changes

mcp_espn_ff CLAUDE.md is an instructions file published in the GitHub repository KBThree13/mcp_espn_ff (48 stars, last pushed 10mo ago), licensed MIT. It adds 812 tokens to every session, about $0.0032 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

mcp_espn_ff CLAUDE.md compared with instructions from other repositories

mcp_espn_ff CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcp_espn_ff CLAUDE.mdKBThree13/mcp_espn_ffInstructions file4810mo agoMITA812Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode