MCP server

Cursor Sports API MCP Setup: Config, Tools and Prompts

Add one entry to ~/.cursor/mcp.json and Cursor can call a hosted sports MCP server at https://mcp.sportsdatahq.com/mcp. It covers nine sports with play-by-play, box scores, ratings and odds history, so the agent reads real responses while it writes your code. 1,000 free credits a month.

Why connect it to Cursor

Building a sports app goes wrong at the data layer. Field names differ between sports, ids are strings in some places and numbers in others, and a mock response written from memory has the wrong shape. When Cursor can call the real tool, it sees the actual response and writes types and parsers against it.

The server is hosted and read-only. Nothing installs on your machine. Connecting and listing tools cost no credits, and only data calls spend them.

A practical loop looks like this: ask the agent to fetch one NBA standings response, have it generate a TypeScript type from the real payload, then have it write a component and a test that uses a saved fixture. The data in the fixture came from a call you can see in the chat.

Connect it

Get a free key from app.sportsdatahq.com. Then paste this into ~/.cursor/mcp.json (all projects) or .cursor/mcp.json inside a project:

{
  "mcpServers": {
    "sportsdatahq": {
      "url": "https://mcp.sportsdatahq.com/mcp",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Reload Cursor, open the MCP section of settings and check that sportsdatahq shows its tools and a green status. If you use Cursor's support for environment variables in mcp.json, read the key from your shell instead of pasting it into a file you might commit.

One sport instead of nine

A sport route lists that sport's tools by name. Basketball, for example:

{
  "mcpServers": {
    "sportsdatahq-nba": {
      "url": "https://mcp.sportsdatahq.com/mcp/nba",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Routes exist for nba, nfl, nhl, mlb, soccer, mma, tennis, golf and cricket. They have 12 to 33 tools each. The hub root has four discovery tools (list_sports, find_tool, describe_tool, run_tool) that reach all of them, which keeps Cursor's tool list short when you work across sports.

Brand servers

Each brand also runs its own server at https://mcp.<brand>.com/mcp, for example https://mcp.dunkapi.com/mcp for basketball. Brand keys are single-sport and come with 500 free credits a month. The config shape is identical.

Example prompts and the tools they call

PromptTools calledCredits
Fetch the 2026 NBA standings and generate a TypeScript type for the response.get_standings2
Get the points leaders, then write a React table component using that exact shape.get_leaders5
Pull one game's box score and write a parser with a test fixture from the real payload.list_games, get_game2 + 5
Find a player by name and build a player page that loads his game log.search_players, get_player_games1 + 5
Show the shot locations for one game and draw them on a court in SVG.get_plays10
Fetch a line-movement series for a game and plot it.get_line_movement10
Check which of the datasets my app depends on are fresh.get_data_status1
Which tool returns pitch velocity, and what does it cost?find_tool, describe_tool0

Ask Cursor to save every response it uses as a fixture under fixtures/. The tests then run offline and your credits go to new questions, not repeats.

From the editor to your app

An MCP connector is for the editor. Your finished app should call the REST API directly with your key, from a server route or a script, never from browser code. The same tool names work as endpoints: POST https://api.sportsdatahq.com/v1/<sport>/<tool> with a JSON body and an x-api-key header. The agent can discover the shapes through MCP and write the REST calls into your code.

Credit costs

CreditsExamples
0Connecting, tools/list, list_sports, find_tool, describe_tool
1list_teams, search_players, get_data_status
2get_standings, list_games, get_schedule, get_ratings, get_injuries
5get_game, get_leaders, get_player_games, get_team_stats, get_odds (one game)
10get_plays, get_shot_chart, get_line_movement, get_player_props, get_prop_history
25get_prop_backtest, and get_line_movement in football and hockey

A free account's 1,000 credits cover about 500 standings calls or 100 play-by-play pulls. Many tools take estimate_only, which prices a call without running it.

Verified examples you can run now

Export your key as KEY first. Each of these was run against the live API on December 6, 2026 and returned HTTP 200.

The tool list Cursor sees on the basketball route, which costs nothing:

curl -s -X POST https://mcp.sportsdatahq.com/mcp/nba \
  -H "x-api-key: $KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

It lists 31 tools. The hub root lists 4.

Points leaders (5 credits):

curl -s -X POST https://api.sportsdatahq.com/v1/nba/get_leaders \
  -H "x-api-key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"stat": "pts", "season": 2026, "limit": 2}'
{
  "data": {
    "stat": "pts",
    "label": "Points per game",
    "season": 2026,
    "min_games": 20,
    "leaders": [
      { "player_id": "3945274", "name": "Luka Doncic", "team": "LAL", "games": 64, "value": 33.5 },
      { "player_id": "4278073", "name": "Shai Gilgeous-Alexander", "team": "OKC", "games": 68, "value": 31.1 }
    ],
    "count": 2
  }
}

Standings, the response to build types from (2 credits):

curl -s -X POST https://api.sportsdatahq.com/v1/nba/get_standings \
  -H "x-api-key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"season": 2026}'

The first row was Oklahoma City at 64 wins and 18 losses with a +11.1 average margin.

Calling a tool through the hub root, the way an agent with only the four discovery tools does (2 credits):

curl -s -X POST https://mcp.sportsdatahq.com/mcp \
  -H "x-api-key: $KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"run_tool","arguments":{"sport":"mlb","tool":"get_standings","arguments":{"season":2026}}}}'

When not to use this

Related pages

Setup for other clients: Claude Code and the OpenAI Agents SDK. Per-sport pages: NBA, NFL, NHL, MLB and soccer. The free sports data MCP server page covers the whole catalog.

Try it

FAQ

Where does the sports MCP config go in Cursor?

Put it in ~/.cursor/mcp.json to use it in every project, or in .cursor/mcp.json inside a project to scope it to that repo. The entry needs a url and a headers object with your x-api-key.

Does Cursor use OAuth or an API key for this server?

For the mcp.json setup, send the key in an x-api-key header. The server also supports OAuth for clients that start a sign-in flow, but a header is the simplest route in an editor config.

Can Cursor build a sports app and fetch data in the same chat?

Yes. The MCP tools let the agent look at real responses while it writes your types, parsers and tests. For the finished app, call the REST API from your own code with your key, since the app should not depend on an editor connector.

Will the tools clutter Cursor's tool list?

The hub root lists only four discovery tools. A single sport route lists that sport's tools, from 12 for MMA to 33 for football. Add one sport route if you want the tools named directly.

Get a free key

Checked against the live API on 2026-12-06. Questions: hello@sportsdatahq.com.