mcp-yahoo-fantasy: Instructions file for Claude Code

CLAUDE.md

mcp-yahoo-fantasy CLAUDE.md is an instructions file for Claude Code from michaelfromorg/mcp-yahoo-fantasy. It costs 1,399 tokens per session, scanned A, original, MIT.

Repository-specific instructions for Claude Code working on an MCP server that connects to Yahoo Fantasy Sports, a service for managing fantasy NFL, NHL, NBA, and MLB teams.

In plain words
What is it for?
Installing dependencies, completing Yahoo OAuth login, running the Python server, debugging with MCP Inspector, and checking tool registration.
Why use it?
They explain the project's commands, architecture, login setup, and debugging process so the coding assistant can work within its existing design.

Instructions file for Claude Code

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

This is michaelfromorg/mcp-yahoo-fantasy's own configuration. It tells Claude Code how to work on mcp-yahoo-fantasy 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-yahoo-fantasy configures →

Reuse

Borrowing it

Nothing to install: this file belongs to michaelfromorg/mcp-yahoo-fantasy. 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/michaelfromorg/mcp-yahoo-fantasy/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/michaelfromorg/mcp-yahoo-fantasy

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-yahoo-fantasy CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/michaelfromorg/mcp-yahoo-fantasy/claude-md/github.svg)](https://agentmods.dev/instructions/michaelfromorg/mcp-yahoo-fantasy/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/michaelfromorg/mcp-yahoo-fantasy/claude-md"><img src="https://agentmods.dev/badge/instructions/michaelfromorg/mcp-yahoo-fantasy/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-yahoo-fantasy CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/michaelfromorg/mcp-yahoo-fantasy/claude-md"><img src="https://agentmods.dev/badge/instructions/michaelfromorg/mcp-yahoo-fantasy/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,399 This file is loaded in full into every session.
When invoked 1,399 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.01399 $0.01399
Opus 5 $0.00700 $0.00700
Sonnet 5 $0.00280 $0.00280
Haiku 4.5 $0.00140 $0.00140

Measured 8d ago against content hash 8334a82fab66, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

mcp-yahoo-fantasy 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 8d 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 · 91 lines

How it starts

The opening of the file, as written. The whole thing — 91 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.

Overview

A single MCP (Model Context Protocol) server, in yahoo/, that wraps the Yahoo Fantasy Sports API for read and write access across NFL/NHL/NBA/MLB. It is a uv-managed Python 3.12 package. (The repo previously held an NHL server too; that has been removed and the project is now Yahoo-only.)

Commands

Run from the repo root unless noted.

  • Install deps: ./scripts/setup.sh (wraps cd yahoo && uv sync).
  • One-time Yahoo login: cd yahoo && uv run yahoo-login --client-id <id> --client-secret <secret> (out-of-band OAuth: open the printed URL, approve, paste back the verifier code). Writes credentials to .env in the working directory. Flags fall back to env vars / .env / prompt.
  • Run the server: cd yahoo && uv run yahoo (stdio transport).
  • Debug with the MCP Inspector: ./scripts/debug.sh.
  • Add a dependency: cd yahoo && uv add <pkg> (keeps pyproject.toml + uv.lock in sync).
  • Sanity-check tool registration without credentials: cd yahoo && uv run python -c "import asyncio; from yahoo.server import mcp; print(len(asyncio.run(mcp.list_tools())))"

Environment note: uv lock/uv sync need network; in a sandboxed shell run them with the sandbox disabled. Redirecting command output to /tmp also fails under the sandbox.

There is no automated test suite. Live behavior can only be exercised with real Yahoo credentials (a .env written by yahoo-login); without them the server starts and lists tools but tool calls raise a credentials error.

Architecture

Built on FastMCP (mcp.server.fastmcp). Three modules under src/yahoo/, each a deep layer hiding one concern:

  • server.py — the FastMCP("yahoo") instance and ~29 @mcp.tool() functions. Tools are intentionally thin: resolve args, call one client method, return the result. They return yahoo_fantasy_api's plain dicts/lists, which FastMCP serializes to JSON for the model. Each tool's docstring IS its description shown to the model, so keep them accurate.
  • client.pyYahooClient, the single seam over yahoo_fantasy_api. It owns the OAuth session (lazy), caches Game/League objects, and resolves defaults: an omitted league_key falls back to $YAHOO_LEAGUE_KEY; an omitted team_key falls back to the authenticated user's own team (League.team_key()). A module-level client singleton is shared by all tools.
  • auth.py — the OAuth2 bridge plus .env helpers. yahoo_fantasy_api reads credentials via yahoo_oauth's oauth2.json. auth.session() calls load_env_file() (loads .env into the environment without clobbering real vars), then bridges $YAHOO_CONSUMER_KEY/ SECRET (+ token vars) into a oauth2.json and returns a token-refreshed OAuth2. Credential source priority: existing oauth2.json -> .env/env vars. The bridged file is written to ~/.config/yahoo-fantasy-mcp/oauth2.json (override path with $YAHOO_OAUTH_FILE or dir with $YAHOO_MCP_CONFIG_DIR); .env defaults to ./.env (override $YAHOO_ENV_FILE).
  • login.py — the yahoo-login CLI (a [project.scripts] entry point). Runs yahoo_oauth's out-of-band OAuth flow (OAuth2(..., browser_callback=False, store_file=False)), then write_env()s the resulting client id/secret + access/refresh tokens to .env and deletes any stale oauth2.json so the server re-bridges from the fresh .env.

Read the full file on GitHub · 91 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. 8d ago First seen · 91 lines · 1,399 tokens per session scan A 8334a82fab66

Subscribe to this mod's changes

mcp-yahoo-fantasy CLAUDE.md is an instructions file published in the GitHub repository michaelfromorg/mcp-yahoo-fantasy (6 stars, last pushed 3mo ago), licensed MIT. It adds 1,399 tokens to every session, about $0.0070 per session on Opus 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-31.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens