basketballapi.net

Documentation / Start here

MCP server

Connect Claude, Cursor, VS Code or any MCP client to the API with your own key.

The MCP server lets an AI assistant call the API for you while you talk to it. Ask in your own words; the assistant picks the tool, runs it on your key and answers from what comes back. It is on the Complete plan, with 15 tools.

The address

https://basketballapi.net/mcp

It speaks Streamable HTTP (JSON-RPC 2.0 over POST) and takes the same key as the REST API, in either header:

Authorization: Bearer bba_live_your_key
X-API-Key: bba_live_your_key

Your key is on your dashboard.

Claude Code

claude mcp add --transport http basketballapi https://basketballapi.net/mcp \
  --header "Authorization: Bearer bba_live_your_key"

Run it in a terminal, then type /mcp inside Claude Code to check the connection.

Cursor

Add this to ~/.cursor/mcp.json, or .cursor/mcp.json in a project:

{
  "mcpServers": {
    "basketballapi": {
      "url": "https://basketballapi.net/mcp",
      "headers": { "Authorization": "Bearer bba_live_your_key" }
    }
  }
}

VS Code

Add this to .vscode/mcp.json in your workspace:

{
  "servers": {
    "basketballapi": {
      "type": "http",
      "url": "https://basketballapi.net/mcp",
      "headers": { "Authorization": "Bearer bba_live_your_key" }
    }
  }
}

Other clients

Any client that supports remote MCP servers over Streamable HTTP and lets you set a header works the same way: the address above, and your key in the Authorization header.

Plans, limits and usage

  • Each tool call is one API call on your key and counts towards your plan's daily calls, like a call from your own code. get_usage does not count.
  • The tools answer exactly what the REST API answers, so anything you find through an assistant you can build on in code.
  • A call your plan does not reach, or one made too fast, comes back as a short message the assistant can read and pass on, naming the plan that has it. It is never a broken connection.

Every tool

ToolWhat it is for
get_gamesFind games by day, date range, competition, season, team or status. Start here to get game ids.
yesterdays_resultsEvery final score from yesterday (UTC), optionally for one competition.
get_gameOne game: teams, score by quarter, attendance and which detail it holds.
get_boxscoreBoth teams' box scores: every player's line and the team totals.
get_play_by_playEvery event of a game in order, with the clock, team, player and running score.
get_shotsEvery shot of a game with its position in feet from the basket, its value and whether it went in.
list_competitionsEvery competition held, with its id, country, seasons and games.
find_teamsTeams by name, competition or season, to get team ids.
get_teamOne team: its country, city, home arena, arena capacity, founding year, head coaches, and the competitions and seasons it played.
get_standingsA season's table from its regular-season results: played, won, lost, points for and against, home, away, last ten and streak. Leave season out for the latest.
get_team_formA team's last games with margin, pace, ratings and results against the closing spread and total.
find_playersPlayers by name (3 letters or more) or team, to get player ids; the only way to a player id without a box score first.
get_player_gamesA player's game log: one box line per game.
get_player_splitsA player's averages split home and away, by result, month, opponent or starting role.
get_usageYour plan, calls used today and the limits. Does not count as a call.

The inputs of each one are on MCP tools. For agents that read skills, the agent skill explains the whole API in one file.