← Developers

Stadiq as agent tools.

Four read-only MCP tools over the same API, so an assistant can answer “what is happening around this address” without you writing the fetch call. stdio transport, one environment variable, no local state.

Setting it up

Add this to your client's MCP configuration — claude_desktop_config.json for Claude Desktop, the equivalent settings file for Cursor or any other MCP client. There is nothing to install first; npx -y fetches the package on first run.

mcp configuration
{
  "mcpServers": {
    "stadiq": {
      "command": "npx",
      "args": ["-y", "stadiq-mcp"],
      "env": { "STADIQ_API_KEY": "sq_live_…" }
    }
  }
}

Get a key from the developer portal; the free developer tier works. If the server reports an auth error, check the key directly before blaming the wiring:

shell
# Verify the key works before wiring it into a client — the same key,
# the same endpoint the server calls under the hood.
curl -s -H "Authorization: Bearer sq_live_…" \
  "https://stadiq.app/api/v1/briefing?lat=51.2194&lng=4.4025"
STADIQ_API_KEY
Required. The server refuses to call anything without it and says so, rather than returning an empty result.
STADIQ_BASE_URL
Optional, defaults to https://stadiq.app. For pointing at another host.

The four tools

stadiq_locations
Lists the locations on the account behind the key, with their ids and coordinates. Takes no arguments. Call it first if you want to use locationId elsewhere.
stadiq_disruptions
Road works within 2 km of a point and transit disruptions affecting it, plus counts of active, planned and imminent works.
stadiq_air_quality
Latest NO₂ and PM reading from the nearest station, how it compares to WHO and EU limits, and whether the point is inside the Antwerp low-emission zone. Measured values only.
stadiq_briefing
Risk level, key facts, the best and worst windows in the next 24 hours, and the next rush-hour NO₂ peak.

The last three take the same target: either locationId, or both lat and lng. The coordinate arguments are bounded in the tool schema to the service area — latitude 50.6 to 51.55, longitude 2.5 to 5.95 — so a model that hallucinates a Paris coordinate is stopped by the schema rather than by a round trip.

All four are annotated read-only, non-destructive and idempotent. The server holds no state, writes nothing, and every tool is a GET underneath. It can spend your API quota and nothing else.

What the tools return, and what they do not

Tool output is the API's JSON, passed through as both text and structured content. It is deterministic: the same coordinates return the same computed numbers. Stadiq's dashboard has a narrative layer that rephrases these figures in a model; that layer is not in the API and not in these tools, so an agent reading them is reading measurements and arithmetic, not prose generated upstream of it.

Errors are passed through rather than swallowed. A bad key, an exhausted quota or a coordinate outside Flanders and Brussels surfaces the API's own message, which already says what to do about it.

The honest comparison

There is a free, open-source alternative worth knowing about: mcp-belgium, MIT-licensed, wrapping a wide set of Belgian public APIs — iRail, STIB/MIVB, Infrabel, Statbel, BeST addresses, KMI, IRCELINE, the KBO business register and more, across dozens of tools.

Use that instead if you want national breadth, raw access to many sources, no key, no cost, and you are comfortable joining the results yourself. It covers ground Stadiq does not — rail, Brussels transit, statistics, company data.

Use this if you want the joining done: works, transit and air quality resolved to one address, with the results that cannot physically reach that address filtered out, and a risk assessment on top. That filtering is the product. A tool that hands an agent 331 detours across Flanders and a station reading from 40 km away is not wrong, but the agent then has to do what the De Lijn page and the IRCELINE page describe — and those pages exist because it is more work than it looks.

They are also not exclusive. Nothing stops you running both; MCP clients are built for exactly that.

Where the details are

The response bodies behind each tool, the error codes and the plan quotas are on the API reference. For the same four endpoints in a shell, see the CLI.

  • GIPODEvery permitted road work and public-domain occupation in Flanders, over an open OGC API Features service that needs no key.
  • IRCELINE air qualityBelgium's official air-quality measurements, over a 52°North SOS timeseries API. Open, and stranger than it looks.
  • De Lijn realtimeDetours and stop data for Flemish public transport, and which of De Lijn's API products actually carries what.
  • Antwerp open dataWhat the city of Antwerp publishes, where the ArcGIS endpoints are, and how to query them as GeoJSON.
  • Stadiq CLIInstall the `stadiq` command, store a key, and read disruptions or a briefing from a terminal or a cron job.