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 分