DunkAPI

io.github.noahowsh由 GitHub 帳號 noahowsh 發布v1.1.6更新於 Oct 24, 2026

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

已驗證Streamable HTTP可網頁執行金融資料與分析

概覽

AI 產生的概覽

託管式籃球資料 MCP 伺服器,提供 NBA、WNBA 與大學籃球的統計、逐回合資料、投籃圖、賠率與球員盤口,以點數計費。

可以做什麼
  • 查詢球隊、球員、比賽、賽程、排名、傷兵與 Elo 評分
  • 讀取技術統計、球員出賽紀錄、賽季數據領先者、球隊節奏與效率數據
  • 檢視含投籃位置、區域、預期得分與勝率的逐回合資料
  • 取得球員、球隊、防守方或單一比賽的分區投籃圖
  • 擷取各博彩公司的勝負盤、讓分、總分、盤口變化及球員盤口與對盤結果
適用情境
適合讓助理以真實資料回答籃球問題:歷史技術統計與逐回合資料、投籃分布、球隊效率,或博彩盤口與球員盤口的變化與結算情形。
執行需求
遠端 Streamable HTTP 端點,無需安裝。呼叫工具需要 DunkAPI API 金鑰,可透過 x-api-key 標頭、Bearer 權杖或金鑰查詢參數傳送;連線與列出工具不需金鑰。本機 stdio 方式需 Node.js 並設定 DUNKAPI_API_KEY。工具會消耗點數,每月 500 免費點數,超出需付費方案。
安裝前請注意
每次呼叫工具都會消耗點數,付費方案或錢包儲值需要花錢。API 金鑰是可存取點數餘額的機密。賠率與盤口屬市場資訊,伺服器要求助理不得計算投注金額、賠付或收益,也不得推薦投注。評分為服務商自有,且與 NBA、WNBA、NCAA 無關。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 DunkAPI,將其新增到工作區。
  2. 連接 x-api-key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.noahowsh%2Fdunkapi/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "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.

來源:README.md,提交 70a5495

工具

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.

輸入參數leagueseason

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.

輸入參數todatefromteamlimitleagueoffsetseasonstatusseason_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.

輸入參數daysteamleague

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.

輸入參數leaguegame_id必填

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.

輸入參數leagueseason

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.

輸入參數dateteamleague

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.

輸入參數name必填limitleague

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.

輸入參數leagueplayer_id必填

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.

輸入參數limitleagueoffsetseasonplayer_id必填season_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.

輸入參數stat必填limitleagueseasonmin_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.

輸入參數teamleagueseasonseason_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.

輸入參數madeteamzonelimitclutchleagueoffsetperiodseasongame_idplayer_idshots_only另有 1 個

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.

輸入參數teamleagueseasongame_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.

輸入參數dateleaguegame_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.

輸入參數leaguegame_id必填providerall_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.

輸入參數leagueseason

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.

輸入參數leaguemarketgame_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.

輸入參數limitleaguemarket必填to_datebookmakerfrom_dateplayer_id必填

版本歷史

2
  1. v1.1.6最新Oct 16, 2026
  2. v1.1.4Oct 11, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分