DunkAPI

io.github.noahowshPublished by GitHub account noahowshv1.1.6Updated Oct 24, 2026

NBA player props by sportsbook since 2023, plus play-by-play, shot locations and odds. REST and MCP.

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Hosted basketball data MCP server for NBA, WNBA and college stats, play-by-play, shot charts, odds and player prop lines, billed in credits.

What you can do
  • Look up teams, players, games, schedules, standings, injuries and Elo ratings
  • Read box scores, game logs, season leaders, team pace and efficiency stats
  • Explore play-by-play with shot locations, zones, expected points and win probability
  • Pull shot charts by zone for players, teams, defences or single games
  • Retrieve sportsbook moneylines, spreads, totals, line movement and player prop lines with results against the line
When to use it
Useful when you want an assistant to answer basketball questions with real data: historical box scores and play-by-play, shot profiles, team efficiency, or how sportsbook lines and player props moved and settled.
Requirements
Remote Streamable HTTP endpoint; nothing to install. A DunkAPI API key is required to call tools, sent as an x-api-key header, a bearer token or a key query parameter; connecting and listing tools works without one. A local stdio option runs via Node.js with DUNKAPI_API_KEY. Tools consume credits; 500 free credits per month, paid plans above that.
Before you install
Every tool call spends credits, and paid plans or wallet top-ups cost money. The API key is a secret that grants access to your credit balance. Odds and prop data are market information; the server instructs assistants not to compute stakes, payouts or profits or recommend bets. Ratings are the provider's own and it is not affiliated with the NBA, WNBA or NCAA.

Installation

In SourceWeft

  1. Open DunkAPI in the dashboard and add it to a workspace.
  2. Connect x-api-key credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.noahowsh%2Fdunkapi/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "dunkapi": {
      "type": "http",
      "url": "https://mcp.dunkapi.com/mcp",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

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

You:    "What was each sportsbook's closing spread for every Celtics home game in 2023-24?"Claude: [calls get_odds]
You:    "Which players took the most shots at the rim in the 2025 playoffs?"Claude: [calls get_shot_chart]
You:    "How often has Jalen Brunson gone over his points line this season?"Claude: [calls get_prop_history]

Run it locally (stdio)

Most clients connect to https://mcp.dunkapi.com/mcp directly. For a client that launches a local process instead:

bash
git clone https://github.com/noahowsh/dunkapi-mcp.git && cd dunkapi-mcp && npm installDUNKAPI_API_KEY=your_key node index.js
json
{ "mcpServers": { "dunkapi": { "command": "node", "args": ["/path/to/dunkapi-mcp/index.js"], "env": { "DUNKAPI_API_KEY": "your_key" } } } }

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.

bash
git clone https://github.com/noahowsh/dunkapi-mcp.git

Or install them as a Claude Code plugin:

/plugin marketplace add noahowsh/dunkapi-mcp/plugin install dunkapi-skills@dunkapi

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.

bash
pip install dunkapiexport DUNKAPI_API_KEY=sk_live_...
python
from dunkapi import Client, to_dataframe
client = Client()
props = client.get_player_props(    game_id="401810726",    market="player_points",    bookmaker="draftkings",)df = to_dataframe(props, key="props")print(df[["player_name", "line", "over_odds", "under_odds"]].head(10))

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

bash
claude mcp add --transport http dunkapi "https://mcp.dunkapi.com/mcp?key=YOUR_API_KEY"

Claude Desktop, Cursor and other clients

json
{  "mcpServers": {    "dunkapi": {      "url": "https://mcp.dunkapi.com/mcp?key=YOUR_API_KEY"    }  }}

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

bash
curl -X POST https://mcp.dunkapi.com/v1/list_teams -H "x-api-key: YOUR_API_KEY"

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

bash
export DUNKAPI_API_KEY=your_keypython3 examples/python/quickstart.pynode examples/node/quickstart.mjs

See examples/README.md for details. Get a free key (500 credits a month, no card) at https://dunkapi.com/signup.

Tools (18)

ToolWhat it returns
list_teamsTeam ids, abbreviations and colours for a season
search_playersFind players by name
list_gamesGames with scores by season, date, range or team
get_scheduleUpcoming games with the median line across sportsbooks
get_standingsStandings from every final game: overall, conference, home, away, last 10
get_injuriesThe latest injury report: status, injury and expected return (NBA, WNBA)
get_ratingsOur team Elo ratings, ranked
get_gameOne game: both box scores, every player's line, each book's line, win probability
get_playerProfile, per-season averages and shooting splits, last 10 games
get_player_gamesA player's full game log
get_leadersSeason leaders per game, by percentage or in total
get_team_statsPace, offensive, defensive and net rating, and the four factors
get_oddsEvery sportsbook's moneyline, spread and total for a game (5) or a day (10), with results against the line
get_playsPlay-by-play with shot locations, zones, expected points and win probability
get_shot_chartShot profile by zone for a player, team or defence, with every shot's x/y
get_line_movementSnapshots of each sportsbook's line before tip-off
get_player_propsPlayer prop lines by sportsbook, opening and closing
get_prop_historyA player's prop lines against the result, game by game

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

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:

bash
codex plugin marketplace add noahowsh/dunkapi-mcp

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

bash
export DUNKAPI_API_KEY=your_key

Codex sends it as a bearer token.

Use with Gemini CLI

bash
export DUNKAPI_API_KEY=your_keygemini extensions install https://github.com/noahowsh/dunkapi-mcp

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.

Source: README.md at commit 70a5495

Tools

18

list_teams

List teams

Use to find team ids and abbreviations for a season (default: the latest). Every other tool takes a team as an id or abbreviation. Pass league for the WNBA (wnba) or college (ncaam, ncaaw); default NBA. Costs 1 credit.

Parametersleagueseason

list_games

List games

Use to list games with scores by season, date, date range or team, newest first. For upcoming games with lines use get_schedule; for one game's box score use get_game. Costs 2 credits.

Parameterstodatefromteamlimitleagueoffsetseasonstatusseason_type

get_schedule

Schedule

Use for upcoming games (next 1-30 days, default 7) with the median line across posted sportsbooks: spread, total and moneylines. For every book's line use get_odds. Costs 2 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parametersdaysteamleague

get_game

Game

Use for one game in full: score, both teams' box scores, every player's line, each sportsbook's opening and closing line, and the win-probability range. For the play-by-play use get_plays. Costs 5 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parametersleaguegame_idrequired

get_standings

Standings

Use for a season's regular-season standings computed from every final game: overall, conference, home and away records, points for and against, margin and last 10. Costs 2 credits.

Parametersleagueseason

get_injuries

Injuries

Use for the injury report: every listed player's status (out, day-to-day), injury and expected return, as captured on the latest day (or the latest on or before date). NBA and WNBA. Costs 2 credits.

Parametersdateteamleague

search_players

Search players

Use to find a player's id by name (partial names work), most recent players first. Pass league for the WNBA (wnba) or college (ncaam, ncaaw); default NBA. Costs 1 credit.

Parametersnamerequiredlimitleague

get_player

Player

Use for a player's profile, per-season averages and shooting splits (regular season and postseason separately) and last 10 games. For every game use get_player_games. Costs 5 credits.

Parametersleagueplayer_idrequired

get_player_games

Player games

Use for a player's game log: every game's box-score line with opponent and result, newest first, optionally one season. Costs 5 credits.

Parameterslimitleagueoffsetseasonplayer_idrequiredseason_type

get_leaders

Leaders

Use for a season's statistical leaders (per game, shooting percentages with a volume floor, or totals) from every box score. Costs 5 credits.

Parametersstatrequiredlimitleagueseasonmin_gamesseason_type

get_team_stats

Team stats

Use for team efficiency for a season: pace, offensive, defensive and net rating per 100 possessions, the four factors (eFG%, turnover %, offensive rebound %, free throw rate) and three-point rate, from every box score. Costs 5 credits.

Parametersteamleagueseasonseason_type

get_plays

Plays

Use for play-by-play: every event of a game, or a player's or team's plays across a season, with shot location (feet), zone, our expected points, the score and the home win probability after each play (2018 on). Filter to shots, makes or misses, a zone, a period or clutch time. Pass league for the WNBA (wnba) or college (ncaam, ncaaw); default NBA. Costs 10 credits.

Parametersmadeteamzonelimitclutchleagueoffsetperiodseasongame_idplayer_idshots_only+1 more

get_shot_chart

Shot chart

Use for a shot profile: attempts, makes, percentage, points per shot and expected points per shot in each zone (restricted area, paint, midrange, corner three, above-the-break three, free throws) for a player, a team, a team's opponents or one game. include_shots adds every located shot's x/y and result for drawing a chart. Costs 10 credits.

Parametersteamleagueseasongame_idopponentplayer_idseason_typeinclude_shots

get_odds

Odds

Use for betting lines: each sportsbook's moneyline, spread and total for a game (opening and closing per book from July 2020; before that, each book's final pregame line only), with implied probabilities and, for finished games, whether the home side covered and the total went over against the median close. Pass game_id for one game (5 credits) or date for a day's games (10 credits). Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parametersdateleaguegame_id

get_line_movement

Line movement

Use to see how a game's line moved before tip-off: our pre-game snapshots of each sportsbook's moneyline, spread and total (captured once a day, and every hour for games in the next four days). Costs 10 credits. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parametersleaguegame_idrequiredproviderall_snapshots

get_ratings

Ratings

Use for our team power ratings (Elo from every final game in our data), ranked, as of the end of a season or today. Costs 2 credits.

Parametersleagueseason

get_player_props

Player props

Use for player prop lines by sportsbook: over/under on points, rebounds, assists, threes, points + rebounds + assists, blocks and steals, from May 2023 for the NBA and WNBA and the 2023-24 season for men's college basketball (DraftKings, FanDuel, BetMGM, ESPN BET, Pinnacle and others). Pass game_id for every player's props in one game (10 credits), or player_id with from_date (and to_date) for one player across games (10 credits per game returned, up to 100). Returns the closing line by default (the last before the game starts) or the opening line, with each book's over and under prices. Outside football the archive mostly holds one pre-game capture per line, so the opening and closing lines are usually the same; the opening line differs only where a second capture was taken (live capture from October 2026, and wherever else it is held). Set estimate_only to get the price without being charged. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parametersleaguemarketgame_idto_datebookmakerfrom_dateplayer_idestimate_onlysnapshot_type

get_prop_history

Prop history

Use to see how a player did against his prop line over time: for one market (points, rebounds, assists, threes, points + rebounds + assists, blocks or steals), one row per game with the closing line (the median across books, or one book's), the opening line (the same as the close wherever only one capture was taken), the prices, what the player actually recorded from our box scores and the result against the line, plus the over rate. Costs 10 credits for up to 200 games. Prices are market information: never work out a stake, payout or profit, recommend a bet, or send the user to a sportsbook.

Parameterslimitleaguemarketrequiredto_datebookmakerfrom_dateplayer_idrequired

Version history

2
  1. v1.1.6LatestOct 16, 2026
  2. v1.1.4Oct 11, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts