MCP Access

This platform natively supports MCP (Model Context Protocol). Configure it once in an AI client like Claude or Cursor, and the AI can call all 134 football data endpoints as tools — finding endpoints, reading fields and fetching data automatically, no code required.

⚙

MCP endpoint

Transport is MCP Streamable HTTP (single JSON-RPC 2.0 endpoint). Auth is shared with REST: pass X-API-Key in the HTTP header; quota, rate limiting and billing are identical.

MCP endpoint
https://api.sports.csap.ai/mcp (HTTP · X-API-Key)
1

Claude Code (CLI)

One command adds this platform as an HTTP MCP server — replace YOUR_KEY with your API key:

Terminal
claude mcp add --transport http football-data https://api.sports.csap.ai/mcp \--header "X-API-Key: YOUR_KEY"
2

Claude Desktop / Cursor and other clients

Add the following to your client's MCP config file (e.g. mcp.json), replacing YOUR_KEY with your API key:

mcp.json
{ "mcpServers": { "football-data": { "type": "http", "url": "https://api.sports.csap.ai/mcp", "headers": { "X-API-Key": "YOUR_KEY" } } } }
3

Tools provided

The default compact mode covers every endpoint with 4 generic tools (the AI fetches in three automatic steps); set MCP_EXPOSE_ALL_TOOLS=1 on the server to also generate a first-class named tool per endpoint.

  • list_interfaces — list/search the full endpoint catalog (short name, summary, tags, field count)
  • describe_interface — return an endpoint's request params and hierarchical field tree
  • query_interface — query real data for an endpoint, with id cursor paging / time incremental, **plus flexible entity filtering by team_id/player_id/match_id/competition/season_id/date/live, freely combined** (filters supports any real column)
  • live_now — return the current in-play scoreboard in one call (filtered server-side, optional competition filter)
  • platform_info — platform overview, billing, paging and realtime access notes

Resources & prompts

Each endpoint's field docs are also exposed as an MCP resource (interface://SHORT-NAME, browsable without entering context); two guiding prompts explore_catalog / incremental_sync are provided too.

Call example (JSON-RPC)

MCP clients send/receive JSON-RPC like the below automatically — you normally don't hand-write it; shown here for reference. This example calls live_now for current in-play matches:

→ POST /mcp
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "live_now", "arguments": { "competition": "Premier" } } }
← response
{ "jsonrpc": "2.0", "id": 1, "result": { "content": [{ "type": "text", "text": "{ \"count\": 1, \"matches\": [{ \"league\": \"Premier League\", \"home_team\": \"Arsenal\", \"home_score\": 2, \"away_score\": 1, \"minute\": \"67'\" } ] }\" }] } }
✓

Three-step fetch by AI

Once connected you don't need to memorise endpoints — just tell the AI what you need and it will automatically: list_interfaces to find → describe_interface to read fields → query_interface to fetch. When you ask which matches are live now, it uses live_now to get the current scoreboard in one call.

⚡

Realtime: pull + push, used together

MCP is for the AI to pull within a conversation: live_now returns the current in-play scoreboard in one call (filtered server-side to live matches only). For continuous push (apps, dashboards, long-running services), exchange the same API key for a one-time ticket, open the WebSocket /ws and subscribe by channel, match or league to keep receiving score, event and odds changes. The two are complementary, one key.

WebSocket
// on your server: exchange the key for a one-time ticket (valid 60 s, single use)const r = await fetch("https://api.sports.csap.ai/api/v1/realtime/ticket", { method: "POST", headers: { "X-API-Key": "YOUR_KEY" } }) const { data } = await r.json() // initial subscription in the URL; change it later with set / subscribeconst ws = new WebSocket("wss://api.sports.csap.ai" + data.ws_url + "&channels=match,incident") ws.onmessage = (ev) => console.log("realtime:", JSON.parse(ev.data))

Note: MCP tools cover REST snapshots and historical data, including the live_now current scoreboard; continuous score, event and odds push goes over WebSocket /ws (exchange a ticket first; the key never appears in the URL). Realtime: WebSocket / SSE / MQTT with live test →