NFL Analytics MCP
This server provides a comprehensive local NFL analytics platform backed by a DuckDB warehouse of play-by-play data since 1999 (1.28M plays). You can:
Query the Warehouse: Run ad-hoc SQL queries via
query_warehouseand inspect schemas withdescribe_warehouse, including data-dictionary notes and join conventions.Analyze Teams & Players: Get team form (record, EPA splits, rest/travel profiles), player bios and stats, coach profiles (career records, tendencies, ATS performance), and referee stats (penalty biases, home/over rates).
Generate Predictions & Ratings: Obtain model-based game predictions (win probability, margin), view team power ratings in EPA/play, and review model backtest reports.
Monitor Betting Markets: Explore Kalshi markets (game, spread, total, win totals, Super Bowl), get market details with bid/ask, implied probabilities, and fees, track price history, and use a betting board to compare Vegas lines vs. Kalshi prices highlighting dislocations.
Access News & Injuries: Search news by topic or player, get recent player news and injury info, and browse latest league headlines.
Manage Data: Check data freshness and refresh logs via
data_status, and trigger a manual refresh of the latest nflverse data withrefresh_data.
Provides tools for querying and analyzing a local DuckDB warehouse containing NFL play-by-play data, player/team stats, rosters, injuries, officials, draft history, and betting lines, enabling AI agents to answer football questions via SQL.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@NFL Analytics MCP which QBs perform best traveling east?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π NFL Analytics
A personal NFL analytics platform that runs entirely on your machine: a DuckDB warehouse of every NFL play since 1999, a dark token-themed web app ("Jarvis"), auto-updating data and news, a prediction-market tracker, and an AI analyst wired in through MCP. Questions get answered by running SQL against real data β computed answers, not vibes.
No API keys. No subscriptions for the core experience. One ~2 GB download.
What's inside
Piece | What it does |
Warehouse ( | 1.28M plays 1999β2025, schedules with odds through 2026, player/team stats across the v1/v2 nflverse eras, advanced stats, NGS, snap counts, depth charts, personnel/participation, FTN charting, combine, ESPN QBR β plus curated venue coordinates powering true travel distances |
Jarvis web app ( | FastAPI + React SPA: team HUDs, matchup cards (travel/rest/refs/coach-H2H/weather/market for any game 1999βupcoming), all-time H2H explorer, coaches with scheme fingerprints, referee intel, betting board (Vegas-vs-Kalshi dislocations), news, and a 16-chapter football Knowledge book |
Derived views | SQL views for the common questions: team-game workhorse with haversine travel miles, H2H series with relocations merged, referee tendencies 1999+, coach PROE/4th-down aggression, one unified weather answer per game |
News engine ( | ESPN + team feeds polled 6-hourly, categorized, player-tagged by gsis_id, full-text searchable |
Kalshi tracker ( | Market snapshots 6-hourly + Vegas line history per game |
Prediction model | Trained, validated and surfaced on its own Model Lab page ( |
MCP server | Tools ( |
Legacy dashboard ( | The original Streamlit UI, kept for friends β frozen |
Related MCP server: Feyod MCP Server
Architecture
nflverse releases βββΊ scripts/refresh_data.py βββΊ data/*.csv
β
Open-Meteo βββΊ fetch_weather.py
β
build_warehouse.py βββΊ nfl.duckdb βββ build_views.py (views, venues, macros)
β
βββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββ
β β β
MCP server FastAPI (web/api) pytest invariants (tests/)
β β
Claude Code React SPA (web/ui) ββ Playwright e2e
β
kalshi.duckdb ββ news.duckdb (sidecars, 6h pollers)Five Windows Task Scheduler jobs keep it fresh: weekly data refresh, 6-hourly news + Kalshi pollers, a daily smoke test, and a nightly headless Claude health check that audits the data and runs the test suite.
Quick start
See SETUP.md. Short version:
git clone https://github.com/parthakker/nfl-analytics && cd nfl-analytics
uv sync --extra dev # or: pip install -e ".[dev]"
python -m nfl_analytics.cli refresh --bootstrap # ~2 GB nflverse download
cd web/ui && npm ci && npm run build && cd ../..
python web/run_web.py # Jarvis on http://localhost:8000Testing
Three pytest tiers: tests/unit (no database), tests/warehouse (invariants
against the real DB β travel distances, H2H symmetry, venue resolution, era
continuity), tests/api (contract tests for every endpoint). CI runs the unit
tier plus warehouse/api against committed ~24 MB fixture databases
(nfl fixture rebuilds them). Playwright e2e (web/ui/e2e/) runs locally
against the real server: npm run e2e.
Design principles
Compute, don't retrieve β every answer is SQL with its filters cited.
Hand-curated where sources are wrong β
data/stadiums.jsonfixes venues nflverse mislabels (all seven 2025 international games); curated files are version-controlled and never overwritten by refreshes.Verification built in β row floors and sanity checks in the build, invariant tests in CI, a smoke test and an AI health check β both run by hand from the
/opspage; nothing is scheduled.Keep it simple β one machine, no cloud dependencies, boring tools.
Data credits
nflverse (play-by-play, stats, rosters), nfldata (schedules + odds), Open-Meteo (weather), ESPN (news, QBR), Kalshi (market data). MIT licensed; the data belongs to its sources.
Available Tools
19 toolsbetting_boardC
Upcoming games: Vegas lines vs live Kalshi prices with dislocation flags (market-vs-market, fee-adjusted) and situational angles.
Inputs: week.
coach_profileC
Head coach career: records, playoffs, ATS, 4th-down aggressiveness, pass-rate-over-expected, scheme identity (curated), rivalry records.
Inputs: name (required).
data_statusA
Coverage and staleness: latest season/week per core table, last refresh-log lines, and whether a refresh looks needed.
Inputs: no named parameters.
describe_warehouseA
List tables/views (no arg) or show one table's columns plus the relevant data-dictionary notes (gotchas, join keys, conventions).
Inputs: table.
kalshi_market_detailB
One market's full picture: current prices, top-of-book depth, implied probability at bid/mid/ask, spread width, and estimated fee.
Inputs: ticker (required).
kalshi_marketsA
Open Kalshi NFL markets. kind: game | spread | total | win_totals | superbowl. Optional team filter (canonical code, e.g. DET). Prices are probabilities in dollars (0.64 = 64c = 64% implied).
Inputs: kind, team.
kalshi_price_historyC
Recorded price history for one market from accumulated snapshots.
Inputs: ticker (required).
kalshi_snapshot_nowA
Record a price snapshot of ALL open NFL markets into kalshi.duckdb (adds to line-movement history). Also runs on the 6h schedule.
Inputs: no named parameters.
league_newsA
Latest league headlines (optionally filtered to one team) from the polled ESPN news feed.
Inputs: days, team.
model_reportB
Backtest summary and the honest verdict from the last training run.
Inputs: no named parameters.
news_searchA
Full-text search over ALL stored news (ESPN, team sites, PFT, Yahoo) ranked by relevance. e.g. 'Gibbs hamstring', 'coaching change Arizona'.
Inputs: query (required), limit.
player_lookupA
Find a player (name substring or gsis_id), return id bridge, bio, and recent season stat lines from the cross-era weekly view.
Inputs: name_or_id (required), season.
player_newsA
Recent news and injury-report entries for a player (name or gsis_id), from the polled ESPN feeds in news.duckdb.
Inputs: name_or_id (required), days.
power_ratingsC
Current model power ratings for all teams (EPA/play units; ratings entering the next game). net = mean(off) - mean(def); lower def is better.
Inputs: top.
predict_gameA
Model prediction for a matchup: home win probability, predicted margin, feature inputs. Uses schedule rest days if the game is scheduled; attaches the market line when available. Early-season caveat applies (weeks 1-3).
Inputs: away_team (required), home_team (required).
query_warehouseA
Run a read-only SELECT against the NFL warehouse (DuckDB). Multiple statements are rejected. See describe_warehouse for tables and gotchas.
Inputs: sql (required), max_rows.
referee_statsA
Head referee tendencies 2015+: penalties/game, home penalty bias, over rate, home win/cover rates. Empty name = all refs ranked.
Inputs: name.
refresh_dataA
Download latest nflverse data and rebuild the warehouse (~1-2 min). Runs as a subprocess so the server holds no DB handle during rebuild.
Inputs: full.
team_formB
Team record, EPA splits (season-to-date and last 5 games), rest/travel profile, and next scheduled game. through_week=0 means whole season.
Inputs: team (required), season (required), through_week.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 19 tools
Every tool targets a distinct resource and action: player vs team vs game vs market vs warehouse. Even the news trio is separated by scope, and the kalshi quartet clearly separates listing, detail, snapshot, and history.
Tool names mix conventions: some are verb-first (predict_game, refresh_data, query_warehouse, describe_warehouse), others are noun-first (team_form, player_lookup, kalshi_markets). The kalshi_ prefix provides local consistency, but the overall pattern is not uniform.
With 19 tools, the server is slightly above the ideal 3-15 range, but the comprehensive scopeβdata ingestion, analytics, news, betting markets, and model reportingβjustifies the count. Each tool earns its place.
The tool surface covers the full lifecycle: data refresh and status, warehouse querying and schema discovery, player/team/coach/referee analytics, news search, betting market analysis, and model prediction/reporting. No obvious dead ends or missing key operations.
Maintenance
Related MCP Connectors
Ask business questions in plain English. Get instant answers from your database, no SQL needed.
Ask questions in plain language, get answers from your business database. No SQL required.
Ask your Quickbase apps in plain language. Read-only by default; writes need human approval.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides access to over 12 years of NFL play-by-play data through a local DuckDB database. It enables users to query player performance, team statistics, and situational efficiency metrics like EPA and WPA using natural language.29 PyPI9MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language querying of Feyenoord football match data, converting questions to SQL queries and returning results.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural-language querying of historical NBA game data from a read-only SQLite database.ISC
- AlicenseCqualityBmaintenanceEnables querying and replaying deterministic market data for crypto and US equities from a local Parquet lake via natural language.574Apache 2.0