Skip to content
API v2 docs

Essentials

Set up the MCP server

Markdown copy

DataSportsAPI runs an MCP server that offers the whole API to an AI assistant as tools, so Claude, ChatGPT, Cursor, VS Code or any other MCP client can look up fixtures, tables and players while it answers. It is a remote server that speaks Streamable HTTP at https://mcp.datasportsapi.com/, and it is part of every plan, Free included.

Connect a client

A client connects with your own secret API key, the one you use for REST, sent as a header on every request.

  • Address: https://mcp.datasportsapi.com/, as a remote server over Streamable HTTP (POST).
  • Header: Authorization: Bearer sk_live_…. In a client's settings this is the "custom header" or "API key" field; there is no sign-in page to go through.
$ claude mcp add --transport http datasportsapi https://mcp.datasportsapi.com/ \
    --header "Authorization: Bearer YOUR_API_KEY"

Widget keys (pk_live_…) are refused: they belong in a web page, and the MCP server takes a secret key only.

Keep the key in the client's configuration on your own machine, never in a file you share or commit. To cut a client off, rotate the key on the dashboard.

What a call costs

A data tool calls the API with your key, so each call is an ordinary request: it draws on the quota of your plan, is held to its per-minute rate, and reaches only the endpoints that plan includes. A tool that needs an endpoint badged Pro and up answers endpoint_not_in_plan on Free and Starter, exactly as the REST call would.

The two discovery tools, list_sports and list_endpoints, cost nothing. A tool that picks the newest season for you spends one extra request to find it; pass a season id to skip that.

The tools

12 tools, all read-only: 2 list what the API offers, 1 calls any endpoint by name, and 9 answer the common questions in a single step.

The server's tools
ToolArgumentsUse it forRequests
list_sports—The place to start. One row per sport: its slug, whether it has fixtures or races, how many of its matches are in play now and which endpoint groups serve it.free
list_endpointssport, group?The endpoints of a sport that your plan opens, grouped. Without a group, one line per endpoint: its op, what it does and its parameters, required ones marked. With a group, every parameter described in full.free
call_endpointop, params?Whatever the shortcuts below do not cover. Pass an op from list_endpoints and its parameters as one object, path and query alike, such as {"id": 123, "season": 456}.1 request
searchq, type?, sport?Names to ids: teams, players, leagues, managers, referees, series, races, fixtures and venues. type keeps one kind, sport one sport.1 request
live_fixturessport?, league?The matches being played at this moment, in every sport, in one sport, or in one league of it.1 request
fixtures_by_datedate?, sport?, league?, country?, page?A day's schedule by UTC date, today when date is left out: for one league, for one sport (ten leagues a page), or for one country within a sport.1 request
fixtureid, include?A single match by id. include adds any of lineups, statistics, events, h2h, form, best-players, streaks and odds, each fetched as a request of its own.1 per part
standingsleague, season?, type?The table of a league: total by default, or home or away through type. Without a season the newest one is looked up first, which is the second request.1–2 requests
teamid, include?A team, or a single competitor, by id: its profile and, through include, its squad and its recent or upcoming fixtures.1 per part
playerid, league?, season?A player by id: team, position, nationality, age, market value and injury, with the statistics of one league season. Name league and season to pick it; otherwise his newest is used.2–3 requests
leadersleague, season?, category?Who leads a league season: scorers, assists, ratings and the other leaderboards, or a single one through category. A missing season is looked up as it is for standings.1–2 requests
race_resultsrace? or series?The classification of a motorsport or cycling race. Give a race id, or a series id (search with type series finds Formula 1, for example) for its last finished race.2–4 requests

What the assistant gets back

Every id in an answer is a DataSportsAPI id, so what the assistant finds with search works in every other tool and in your own REST calls. Times are in UTC.

A refusal from the API (a 403 for the plan, a 404, a 429) comes back as the tool's error with the same code the REST call would give, so the assistant can say what went wrong.

The tools only read. Nothing an assistant does through them can change your account, your keys or your plan. To disconnect every client at once, rotate your key on the dashboard.