MCP server
NBA data for AI agents, over MCP
DunkAPI is a hosted MCP server: one URL gives Claude, ChatGPT, Cursor or your own agent 24 read-only basketball data tools. 500 free credits every month, no card.
Connect in one step
Claude and ChatGPT: no key needed
Add a custom connector with this URL. The first time a tool runs, you sign in to your DunkAPI account and press Allow; new users can create a free account from the same screen. In Claude: Settings, Connectors, Add custom connector. In ChatGPT: follow the ChatGPT steps below.
https://mcp.dunkapi.com/mcpClaude Code
claude mcp add --transport http dunkapi https://mcp.dunkapi.com/mcpThen run /mcp in Claude Code and sign in. To use an API key instead, add ?key=YOUR_API_KEY to the URL.
Claude Desktop, Cursor and other clients
{
"mcpServers": {
"dunkapi": {
"url": "https://mcp.dunkapi.com/mcp",
"headers": { "x-api-key": "YOUR_API_KEY" }
}
}
}Listing tools works without signing in; calling one needs your account or an API key, and uses its credits.
Use it in ChatGPT
ChatGPT adds outside MCP servers through developer mode. OpenAI currently offers it on workspace plans (Business, Enterprise and Edu), where an admin may need to turn it on, and it moves its menus often. Its developer mode guide has the current location of each setting.
- Turn on developer mode in ChatGPT's settings (or ask your workspace admin to).
- Create a custom MCP app or connector. Name it DunkAPI, paste the server URL below, and choose OAuth as the authentication.url
https://mcp.dunkapi.com/mcp - ChatGPT opens a DunkAPI sign-in page. Sign in, or create a free account on the same page, and press Allow. There is no API key to copy, so none ends up in a chat.
- Start a new chat, add DunkAPI from the tools menu, and ask something like “Who led the NBA in points per game last season among players with 60 games, and what were their shooting splits?”
No developer mode on your plan? Use Claude (steps above), or call the REST API from your own computer: your key stays on your machine and the responses save straight to files. See save the raw JSON in the docs.
Other assistants and editors
The same URL works anywhere that takes a remote MCP server. Where the app signs you in, use your DunkAPI account; where it asks for headers, send your key as x-api-key.
Gemini CLI
gemini extensions install https://github.com/noahowsh/dunkapi-mcpThen set DUNKAPI_API_KEY to your key before starting Gemini CLI.
VS Code
// .vscode/mcp.json
{
"servers": {
"dunkapi": { "type": "http", "url": "https://mcp.dunkapi.com/mcp" }
}
}Zed
// settings.json
{
"context_servers": {
"dunkapi": {
"url": "https://mcp.dunkapi.com/mcp",
"headers": { "x-api-key": "YOUR_API_KEY" }
}
}
}Or leave out headers and Zed signs you in to DunkAPI instead.
Google Sheets
Copy the template sheet, add your key under Extensions, then type=SDHQ("dunkapi","get_standings") for a live table.Grok
At grok.com/connectors choose New connector, then Custom, paste the server URL and sign in to DunkAPI.Perplexity and Le Chat
Both take a custom remote connector: Perplexity on Pro, Max and Enterprise plans, Le Chat from the account owner's connector settings. Paste the server URL and sign in, or add your key as an API key.Ask it things like
- “Who led the NBA in points per game last season among players with 60 games, and what were their shooting splits?”
- “Show every book's spread and total for tonight's games, and the median line for each.”
- “Which teams had the best net rating after the All-Star break last season?”
- “Chart Stephen Curry's made and missed threes by distance for the 2015-16 season.”
24 tools
Credits per call. The same tools are REST endpoints; see the docs.
Team ids, abbreviations and colours for a season
Find players by name
Games with scores by season, date, range or team
Upcoming games with the median line across sportsbooks
Standings from every final game: overall, conference, home, away, last 10
The latest injury report: status, injury and expected return (NBA, WNBA)
Our team Elo ratings, ranked
One game: both box scores, every player's line, each book's line, win probability
Profile, per-season averages and shooting splits, last 10 games
A player's full game log
Season leaders per game, by percentage or in total
Pace, offensive, defensive and net rating, and the four factors
Every sportsbook's moneyline, spread and total for a game (5) or a day (10), with results against the line
Play-by-play with shot locations, zones, expected points and win probability
Shot profile by zone for a player, team or defence, with every shot's x/y
Snapshots of each sportsbook's line before tip-off
Player prop lines by sportsbook: the closing line (one pre-game capture per line before October 2026)
A player's prop lines against the result, game by game
How one player's prop line moved before a game, every capture by sportsbook
Opening and closing lines by sportsbook for the half and quarter markets (history from May 2023)
Alternate spreads and totals by sportsbook: every point on each book's ladder, opening and closing, NBA, WNBA and men's college from 2023-24
What the market thinks of a game: average implied and fair probability for the moneyline, spreads and totals
What the market thinks of a game's player props: average implied and fair probability for each player and line
How often a kind of player prop hit against what the market implied, by your filters, since May 2023
Questions
What is the DunkAPI MCP server?
A hosted Model Context Protocol server at https://mcp.dunkapi.com/mcp. Add that URL to Claude, ChatGPT, Cursor or any MCP client and the assistant can call 24 read-only basketball data tools directly: no scraping, no local install.
Do I need to run anything locally?
No. It is a remote server over Streamable HTTP at one URL. Claude and ChatGPT connect with no key: they ask you to sign in to your DunkAPI account the first time. Other clients send your API key as an x-api-key header or a ?key= parameter.
What does it cost?
Every account gets 500 free credits every month and no card. Connecting from an app starts you with 50 while you confirm your email, which adds the other 450. Tools cost 1 to 25 credits a call, a call that returns no data is refunded, and plans start at $19/month for 10,000 credits.
Is it the same data as the REST API?
Yes. Every MCP tool is also a REST endpoint with the same arguments and response, so an agent prototype and production code read identical data.
Which clients work?
Anything that speaks MCP over Streamable HTTP: Claude Code, Claude Desktop, ChatGPT (connectors), Cursor, VS Code, Zed, Cline, Windsurf and agent frameworks with an MCP client. It is also listed on the official MCP Registry and Glama.
Building analysis on top? The skills library has ready-made Claude workflows for this data.