Data as a Service

Sport Data API

Connect an AI agent (MCP)

Point Claude Code, Claude Desktop or Cursor at the ALT Sports Data warehouse through a read-only MCP server and ask questions in plain English.

Internal and partner use for now

The warehouse MCP server signs in to the warehouse with AWS credentials. External developers are not issued those credentials today. If you have an asd_live_ or asd_test_ key, use the REST API or Ask the warehouse. Both read the same curated data under your key's entitlements.

The warehouse MCP server (asdcheck) lets an AI agent read the curated ALT Sports Data warehouse through the Model Context Protocol. Once connected, you ask your agent a question such as "who finished on the podium at the last Supercross round" and the agent picks a tool, runs a read-only query and answers from the rows that came back.

How it relates to the REST API

Both read the same curated asd_* schemas, so a Supercross event returned by GET /v1/smx/events is the same row the MCP server sees in asd_smx.events. The paths to that data differ.

Warehouse Data API (REST)Warehouse MCP server
Who it is forExternal developers and productsInternal teams and partners with warehouse access
CredentialAuthorization: Bearer asd_live_…AWS IAM credentials for the Redshift Data API
Runs whereHosted at platform-api.altsportsleagues.aiLocally, as a stdio process your AI client starts
Entitlements, credits, rate limitsEnforced per keyNot applied; access is whatever the IAM identity can read
Query styleFixed resources with filters and cursorsVerified named queries, plus one read-only SQL statement
Sports modeledEvery sport in the catalog your key is entitled toFour verticals: smx, wsl, masl, hlr

Tools

The server exposes eleven tools. Each one returns plain JSON. When something goes wrong (an unknown sport key, a bad column, a refused statement) the tool returns an error and a hint instead of failing, so the agent can correct itself on the next turn.

ToolParametersWhat it returns
list_sportsnoneThe four verticals, their schemas and the six backbone tables. Offline, no warehouse call.
list_queriesnoneThe catalog of verified, ready-written questions and the argument each one takes.
declared_modelnoneThe documented schema contract: backbone tables and core columns. Offline.
sports_overviewnoneRow counts for every backbone table in every vertical.
sport_schemasport, optional tableTables and columns for one vertical. Read this before writing SQL.
freshnessnoneHow current each vertical is, from the warehouse's own ops.freshness view.
run_named_queryquery, optional argument, limit (default 200)Rows for one entry from list_queries, plus the true row_count.
run_sqlsql, limit (default 200)Rows for one read-only SQL statement, plus the true row_count.
list_checksoptional groupThe data-quality check inventory, without running anything.
run_checksoptional sport, group, check, jobs (default 8)Pass, fail and error verdicts from the data-quality suite. A full run is slow.
verify_contractsportMissing backbone tables and core columns, comparing the documented contract with the live warehouse.

Valid sport values are smx (Supercross and Motocross), wsl (World Surf League), masl (Major Arena Soccer League) and hlr (High Limit Racing). In masl a competitor is a team; in the other three it is an athlete.

Verified questions

list_queries currently returns 14 entries. Agents are instructed to prefer these over writing SQL, because each one is already checked against the real schema.

KeyQuestionArgument
latest_smx_standingsLatest SMX event, rider standings with hometownnone
latest_smx_motosLatest SMX event, moto-by-moto detailnone
rider_careerOne rider's career historyrider name
rosterCompetitor roster for one leaguesport key
recent_eventsRecent events across all four leaguesmonths back
status_vocabularyHow each sport records a non-finishnone
freshnessData freshness by sportnone
audit_failuresFailing checks in the newest audit runnone
top_by_participationCompetitors ranked by events enteredsport, optional year
events_in_yearOne sport's calendar for a single yearsport and year, such as smx 2025
venuesWhere a sport competedsport, optional year
current_seasonThe latest season that has eventssport key
competition_fieldThe field of one competition, with finish positionssport, optional competition id
head_to_headTwo competitors, only the competitions they both enteredsmx Cooper Webb|Justin Cooper

Read-only by design

run_sql accepts a single SELECT, WITH, SHOW, EXPLAIN or VALUES statement. DDL, DML and multi-statement submissions are refused before anything reaches the warehouse, and the refusal comes back to the agent as a structured error that names the rejected SQL. The guard sits below the MCP layer, so it applies no matter what the model writes.

Set up

Get warehouse credentials

You need an AWS access key pair with read access to the warehouse through the Redshift Data API. The ALT Sports Data data team issues these. There is no database password or connection string; authentication is AWS IAM.

The launcher reads two values from the platform app's .env file (or from your normal AWS credential chain if they are already set):

VariableRequiredPurpose
AWS_ACCESS_KEY_IDYesIAM access key for the Redshift Data API
AWS_SECRET_ACCESS_KEYYesMatching secret
REGIONNoOverrides the built-in warehouse region
WORKGROUPNoOverrides the built-in Redshift Serverless workgroup
DATABASENoOverrides the built-in database name

Keep these values in .env or your AWS profile. Never paste them into an MCP client config or a chat.

Install the engine with the MCP extra

The server ships in the platform repository as the asdcheck package. Install uv, then from the repository root:

uv sync --project apps/asd-altsportsdata-data-product-redshift-platform.altsportsdata.com/app/clients/asd-warehouse-engine --extra mcp

The mcp extra adds fastmcp. Everything else in asdcheck runs on boto3 alone.

Register the server with your client

The launch command is asd warehouse mcp, run through the asd CLI. It bridges your AWS credentials from .env, then starts the server over stdio. Replace /path/to/asd-cli below with the absolute path to app/clients/asd-cli inside the platform app.

claude mcp add asdcheck-redshift -- \
  uv run --project /path/to/asd-cli python -m asd warehouse mcp

Run claude mcp list to confirm it shows as connected.

Add this to claude_desktop_config.json (on macOS, under ~/Library/Application Support/Claude/), then restart Claude Desktop.

{
  "mcpServers": {
    "asdcheck-redshift": {
      "command": "uv",
      "args": ["run", "--project", "/path/to/asd-cli", "python", "-m", "asd", "warehouse", "mcp"]
    }
  }
}

Desktop apps often start with a short PATH. If the server fails to start, set command to the absolute path of uv (run which uv to find it).

Add this to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project), then enable the server under Settings → MCP.

{
  "mcpServers": {
    "asdcheck-redshift": {
      "command": "uv",
      "args": ["run", "--project", "/path/to/asd-cli", "python", "-m", "asd", "warehouse", "mcp"]
    }
  }
}

If you only have the engine and your AWS credentials are already in your environment or AWS profile, you can skip the asd CLI and launch the engine directly: uv run --project /path/to/asd-warehouse-engine --extra mcp python -m asdcheck mcp.

Ask a first question

Start a new conversation and ask "Which sports can you see in the warehouse?" The agent should call list_sports and answer with the four verticals. That call needs no warehouse round trip, so it confirms the server is wired up. A follow-up such as "How fresh is each sport?" confirms your credentials reach the warehouse.

Example prompts

These map cleanly onto the verified questions, so the agent can answer without writing SQL of its own.

  1. "Show me the overall standings from the most recent Supercross event, with each rider's hometown." The agent runs latest_smx_standings.
  2. "Compare Cooper Webb and Justin Cooper in every SMX race they both entered." The agent runs head_to_head with smx Cooper Webb|Justin Cooper.
  3. "Is any sport behind on data, and did the latest audit flag anything?" The agent combines freshness with audit_failures, and may narrow further with run_checks.

Limits

  • Credentials. The server needs AWS IAM access to the warehouse. External developers do not have this today, so the REST API at platform-api.altsportsleagues.ai remains the supported external path.
  • Four verticals. Tools that take a sport accept smx, wsl, masl and hlr only. Other sports in the REST catalog are not modeled by this server.
  • Local process. The server runs on your machine over stdio. There is no hosted endpoint for it yet.
  • No key-level controls. Entitlements, credit metering and rate limits belong to the REST API. The MCP server does not apply them; the IAM identity's warehouse permissions are the only boundary.
  • Row limits. Query tools return 200 rows by default. row_count always reports the true total, so a truncated answer is visible as truncated.
  • Slow checks. run_checks with no filters runs the full data-quality suite across all four verticals. Pass sport or group when the question is specific.

On this page