DunkAPI MCP server
Commit Nov 13, 2026Provides NBA, WNBA, and college basketball data including play-by-play, shot locations, sportsbook odds, and player prop history.
Also known as noahowsh/dunkapi-mcp, dunkapi-mcp
- Stars
- 0
- Tools
- 18
- Downloads, 30 days
- —
- Latest version
- 1.1.6
- Last commit
- Nov 13, 2026
- License
- MIT
What is DunkAPI MCP?
DunkAPI provides NBA, WNBA, and college basketball data including play-by-play, shot locations, sportsbook odds, and player prop history. It exposes 18 tools, such as list_teams, search_players, list_games.
Summary generated from the project's README
About DunkAPI MCP server
DunkAPI provides comprehensive basketball data for the NBA, WNBA, and Division I college basketball. It serves developers and analysts who need granular information such as play-by-play logs, shot locations with x/y coordinates, win probability, and team Elo ratings. The server also includes sportsbook data, covering moneyline, spread, and total lines, alongside detailed player prop history.
Users can connect to a hosted remote server via Streamable HTTP or run a local process using Node.js. Integration is straightforward for clients like Claude Desktop, Cursor, or Claude Code. Accessing specific tools requires a DunkAPI API key, which can be obtained through their website. The service offers 500 free monthly credits without requiring a credit card.
This server is unique because it offers specialized skills for basketball analysis, such as prop modeling and backtesting. It provides deep statistical insights through tools like get_shot_chart for spatial analysis and get_prop_history to track player performance against betting lines.
What you can do with it
- 1Analyze sportsbook closing spreadsA developer can request the closing spread for specific team home games across different sportsbooks.
- 2Evaluate player shot profilesAn analyst can identify which players are most effective at specific areas of the court, such as the rim.
- 3Track player prop performanceUsers can check how frequently a player meets or exceeds their specific betting lines during a season.
Written from the project's README. Every use case is checked against a quote from it.
How to install DunkAPI MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall DunkAPI MCP in Claude Code
$ claude mcp add --transport http dunkapi-mcp https://mcp.dunkapi.com/mcpInstall DunkAPI MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"dunkapi-mcp": {
"url": "https://mcp.dunkapi.com/mcp"
}
}
}Install DunkAPI MCP in VS Code
.vscode/mcp.json
{
"servers": {
"dunkapi-mcp": {
"type": "http",
"url": "https://mcp.dunkapi.com/mcp"
}
}
}Install DunkAPI MCP in VS Code CLI
$ code --add-mcp '{"name":"dunkapi-mcp","type":"http","url":"https://mcp.dunkapi.com/mcp"}'Install DunkAPI MCP in Codex
$ codex mcp add dunkapi-mcp --url https://mcp.dunkapi.com/mcpInstall DunkAPI MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.dunkapi-mcp] url = "https://mcp.dunkapi.com/mcp"
Install DunkAPI MCP in Gemini CLI
$ gemini mcp add -s user --transport http dunkapi-mcp https://mcp.dunkapi.com/mcpInstall DunkAPI MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"dunkapi-mcp": {
"url": "https://mcp.dunkapi.com/mcp",
"type": "http"
}
}
}DunkAPI MCP tools 18
Detected from the READMElist_teamssearch_playerslist_gamesget_scheduleget_standingsget_injuriesget_ratingsget_gameget_playerget_player_gamesget_leadersget_team_stats
| list_teams | — | |
| search_players | — | |
| list_games | — | |
| get_schedule | — | |
| get_standings | — | |
| get_injuries | — | |
| get_ratings | — | |
| get_game | — | |
| get_player | — | |
| get_player_games | — | |
| get_leaders | — | |
| get_team_stats | — |
Show all 18 toolsShow fewer tools
get_oddsget_playsget_shot_chartget_line_movementget_player_propsget_prop_history
| get_odds | — | |
| get_plays | — | |
| get_shot_chart | — | |
| get_line_movement | — | |
| get_player_props | — | |
| get_prop_history | — |
Configuration
DUNKAPI_API_KEY
| Name | Description | |
|---|---|---|
| DUNKAPI_API_KEY | — |
Automated checks
Ran Nov 14, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachablenoahowsh/dunkapi-mcp is public and reachablegithub.com/noahowsh/dunkapi-mcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-10-19github.com/noahowsh/dunkapi-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model18 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNo tool named like delete, drop or execPass
- Remote endpoint answers the MCP handshakeinitialize answered with protocol 2025-06-18 in 36 msPass
README
View on GitHubDunkAPI MCP server
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:
git clone https://github.com/noahowsh/dunkapi-mcp.git && cd dunkapi-mcp && npm install
DUNKAPI_API_KEY=your_key node index.js
{ "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.
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.
pip install dunkapi
export DUNKAPI_API_KEY=sk_live_...
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
claude mcp add --transport http dunkapi "https://mcp.dunkapi.com/mcp?key=YOUR_API_KEY"
Claude Desktop, Cursor and other clients
{
"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
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/:
examples/python/quickstart.pyandexamples/node/quickstart.mjs: schedule plus a headline call.examples/python/nba_player_props.py: Player prop lines against results.
export DUNKAPI_API_KEY=your_key
python3 examples/python/quickstart.py
node 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)
| Tool | What it returns |
|---|---|
list_teams |
Team ids, abbreviations and colours for a season |
search_players |
Find players by name |
list_games |
Games with scores by season, date, range or team |
get_schedule |
Upcoming games with the median line across sportsbooks |
get_standings |
Standings from every final game: overall, conference, home, away, last 10 |
get_injuries |
The latest injury report: status, injury and expected return (NBA, WNBA) |
get_ratings |
Our team Elo ratings, ranked |
get_game |
One game: both box scores, every player's line, each book's line, win probability |
get_player |
Profile, per-season averages and shooting splits, last 10 games |
get_player_games |
A player's full game log |
get_leaders |
Season leaders per game, by percentage or in total |
get_team_stats |
Pace, offensive, defensive and net rating, and the four factors |
get_odds |
Every sportsbook's moneyline, spread and total for a game (5) or a day (10), with results against the line |
get_plays |
Play-by-play with shot locations, zones, expected points and win probability |
get_shot_chart |
Shot profile by zone for a player, team or defence, with every shot's x/y |
get_line_movement |
Snapshots of each sportsbook's line before tip-off |
get_player_props |
Player prop lines by sportsbook, opening and closing |
get_prop_history |
A 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
- 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:
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):
export DUNKAPI_API_KEY=your_key
Codex sends it as a bearer token.
Use with Gemini CLI
export DUNKAPI_API_KEY=your_key
gemini 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.
DunkAPI MCP questions
How do I add DunkAPI MCP to Claude Code?
Run claude mcp add --transport http dunkapi-mcp https://mcp.dunkapi.com/mcp in your terminal. Add --scope user to make it available in every project.
How do I add DunkAPI MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does DunkAPI MCP provide?
It exposes 18 tools, including list_teams, search_players, list_games, get_schedule, get_standings.
How much does DunkAPI cost?
DunkAPI offers 500 free credits every month without requiring a card. Paid plans include Starter at $19/mo, Pro at $49/mo, and Scale at $149/mo.
What basketball leagues are covered?
The API covers the NBA, WNBA, and both men's and women's Division I college basketball.
Can I use DunkAPI with Python?
Yes, there is an official Python client available on PyPI named dunkapi.