DunkAPI MCP server
[Smithery] [MCP Registry]
The basketball data API. NBA play-by-play with the location of every shot, box scores, win probability, standings, injuries, our own team Elo ratings, sportsbook lines and player prop lines, plus the WNBA and men's and women's Division I college basketball. REST API and MCP server. 500 free credits every month, no card.
Website: https://dunkapi.com · Docs: https://dunkapi.com/docs · Get a key: https://dunkapi.com/signup
Run it locally (stdio)
Most clients connect to https://mcp.dunkapi.com/mcp directly. For a client that launches a local process instead:
It forwards to the hosted server with your key, so every tool and credit cost is the same.
Skills
skills/ holds 16 free Claude skills that turn Claude into a basketball analyst for the NBA, WNBA and men's and women's college basketball. A skill is a markdown file: when to use it, which DunkAPI tools it calls and what they cost, the method (shot zones and expected points, pace and efficiency, rolling game logs, prop modeling, devigging, backtesting), and examples taken from real API responses.
Or install them as a Claude Code plugin:
Or with the skills CLI: npx skills add noahowsh/dunkapi-mcp.
Point Claude at the skills/ folder, connect the MCP server below, and ask a question. Start with the dispatch skill if you are not sure which one applies. Skills also work on your own CSV or JSON files, with no key. Full list: skills/README.md.
Python
The official Python client is on PyPI: dunkapi.
Typed errors for a bad key, no credits left, not found and rate limits, automatic retries, and to_dataframe for pandas.
Quick start
This is a hosted (remote) MCP server over Streamable HTTP. There is nothing to install.
Claude Code
Claude Desktop, Cursor and other clients
The key can also be sent as an x-api-key header or Authorization: Bearer. Connecting and listing tools works without a key; calling a tool needs one.
REST
Every tool is POST /v1/{tool} with a JSON body.
Examples
Runnable Python (standard library only) and Node 18+ (no dependencies) examples live in examples/:
See examples/README.md for details. Get a free key (500 credits a month, no card) at https://dunkapi.com/signup.
Tools (18)
Leagues: nba (default), wnba, ncaam, ncaaw (pass league to any tool).
Data
- NBA games since 2003-04 with play-by-play and shot locations (x/y, zone, expected points, win probability)
- The WNBA and men's and women's Division I college basketball through the same tools
- Team Elo ratings, standings from every final game, injury report (NBA, WNBA)
- Per-sportsbook moneylines, spreads and totals: 4 to 12 books per regular-season NBA game from 2013-14 to 2023-24 (10 to 12 from 2020-21), plus opening and closing lines since July 2020 (a median of 7 books per NBA game in 2020-21 to 2022-23, 8 since); pre-game line snapshots from launch: once a day, and every hour for games in the next two days
- Player prop lines by sportsbook (points, rebounds, assists, threes, points + rebounds + assists, blocks, steals) from May 2023 for the NBA and WNBA and from the 2023-24 season for men's college basketball, with the result against each line (
get_player_props, get_prop_history)
- Women's college basketball: opening and closing lines from November 2024 (a median of 4 books); no player props
Coverage by season, read live from the database: https://dunkapi.com/docs
Useful pages
- Live odds and lines: https://dunkapi.com/odds
- Player props today (best price per player across books, live from the 2026-27 opener): https://dunkapi.com/props
- College basketball player props today (live from the 2026-27 season): https://dunkapi.com/props/college-basketball
- College props history guides: points, rebounds
- Props guides: points prop history, threes prop history
- Guides (Python, run against the live API): https://dunkapi.com/guides
- Docs and endpoint reference: https://dunkapi.com/docs
- Coverage by season: https://dunkapi.com/docs/atlas
- Datasets: https://dunkapi.com/data (play-by-play, shot charts, odds history, player props)
- Pricing: https://dunkapi.com/pricing
- Comparisons: BallDontLie, nba_api and stats.nba.com, Basketball Reference, Sportradar, SportsDataIO
- Leagues: WNBA, men's college, women's college
Pricing
500 free credits every month, no card. Plans: Starter $19/mo (10,000 credits), Pro $49/mo (30,000), Scale $149/mo (125,000). Wallet top-ups from $5, never expire. https://dunkapi.com/pricing
Attribution
Ratings are ours. Not affiliated with the NBA, WNBA, NCAA or any team.
License
MIT for the contents of this repository. Data terms as above.
Use with Codex
Add this repo as a Codex plugin marketplace, then install the plugin:
Then open the plugin directory in Codex and install dunkapi-skills from the dunkapi marketplace. The plugin bundles the skills in skills/ and the DunkAPI MCP server (https://mcp.dunkapi.com/mcp). Set your key first (free at https://dunkapi.com/signup):
Codex sends it as a bearer token.
Use with Gemini CLI
The extension adds the DunkAPI MCP server (https://mcp.dunkapi.com/mcp) and sends the key in the x-api-key header. Get a free key (500 credits a month) at https://dunkapi.com/signup.