MCP API

Agent integrations

Real Time Climate Storylines exposes a public Model Context Protocol (MCP) endpoint so AI assistants like Claude, ChatGPT, Cursor, and Codex can read data coverage and Global Surface Air Temperature (GSAT) time series for the three climate storylines.

Endpoint

The server speaks MCP Streamable HTTP (JSON-RPC 2.0) at:

https://storylines.theclimatedatafactory.com/mcp

No authentication is required — anyone on the internet can call these tools. Requests are rate-limited to 30 calls per minute per client IP (best-effort, per edge isolate). All POSTs must send both headers:

Content-Type: application/json
Accept: application/json, text/event-stream

Scope · what the MCP exposes

The six tools cover the same underlying data the dashboard reads: manifest coverage, GSAT time series, per-date scenario readouts, scenario comparison with deltas, map raster tiles (URL or inline image bytes), and canonical dashboard deep-links. Every tool declares an outputSchema so clients can validate responses and render them as typed data.

Not exposed: the dashboard's current UI state (selected date, zoom, projection), server-side dashboard PNG rendering, pixel-level temperature sampling from map tiles, or any write action. The server is strictly read-only.

License: data, tiles, and derived outputs from this MCP are licensed CC BY-NC 4.0. Non-commercial use only, attribution required. Cite as “Real Time Climate Storylines (storylines.theclimatedatafactory.com, CC BY-NC 4.0)”. Every tool response includes an attribution field and a Source: prefix line.

Tool · get_data_coverage

Return the latest available date and full time range for each map resolution (daily, monthly, annual) from the live manifest. Use this first to discover what date ranges are valid for get_gsat_series.

Parameters

None.

Example request

curl -X POST https://storylines.theclimatedatafactory.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "get_data_coverage",
      "arguments": {}
    }
  }'

Example response (structuredContent)

{
  "coverage": {
    "daily":   { "start": "1940-01-01", "end": "2026-07-14" },
    "monthly": { "start": "1940-01",    "end": "2026-06" },
    "annual":  { "start": "1940",       "end": "2025" }
  }
}

Tool · get_gsat_series

Return the GSAT time series for one storyline scenario at daily, monthly, or annual resolution. Each row contains a date (or year), absolute temperature t in °C, climatology clim, and anomaly anom relative to the 1991–2020 observed mean.

Parameters

NameTypeDefaultDescription
scenariorequired"observed" | "preindustrial" | "plus3"Which storyline: observed (ERA5 reanalysis), preindustrial (1850–1900 baseline storyline), or plus3 (+3 °C warming storyline).
resolutionrequired"daily" | "monthly" | "annual"Time resolution of the returned series.
startstringInclusive start. YYYY-MM-DD for daily/monthly, YYYY for annual.
endstringInclusive end. YYYY-MM-DD for daily/monthly, YYYY for annual. Must be ≥ start.
limitinteger 1–1000500Maximum number of rows to return; when the filtered set is larger, the most recent rows are kept.

Example request — recent observed monthly GSAT

curl -X POST https://storylines.theclimatedatafactory.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "get_gsat_series",
      "arguments": {
        "scenario": "observed",
        "resolution": "monthly",
        "start": "2024-01",
        "end": "2024-12",
        "limit": 12
      }
    }
  }'

Example response (structuredContent, truncated)

{
  "scenario": "observed",
  "resolution": "monthly",
  "count": 12,
  "rows": [
    { "date": "2024-01", "t": "13.14", "clim": "12.42", "anom": "0.72" },
    { "date": "2024-02", "t": "13.28", "clim": "12.55", "anom": "0.73" },
    { "date": "2024-03", "t": "13.47", "clim": "12.79", "anom": "0.68" }
    // …
  ]
}

Example request — annual +3 °C warming storyline

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "get_gsat_series",
    "arguments": {
      "scenario": "plus3",
      "resolution": "annual",
      "start": "2000",
      "end": "2025"
    }
  }
}

Tool · get_scenario_readouts

Return the three headline temperatures shown in the dashboard's HeadlineStat card (observed, preindustrial, +3 °C) for a single date. Defaults to the latest available date at the requested resolution.

Parameters

NameTypeDefaultDescription
datestringlatestYYYY-MM-DD (daily), YYYY-MM (monthly), or YYYY (annual). Defaults to the manifest's latest end date for the resolution.
resolution"daily" | "monthly" | "annual""daily"Time resolution.
mode"absolute" | "anomaly""absolute"Value to return per scenario: absolute temperature `t` (°C) or anomaly `anom` vs. the 1991–2020 observed mean.

Example request

curl -X POST https://storylines.theclimatedatafactory.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 4,
    "method": "tools/call",
    "params": {
      "name": "get_scenario_readouts",
      "arguments": { "date": "2024-06", "resolution": "monthly", "mode": "absolute" }
    }
  }'

Example response (structuredContent)

{
  "date": "2024-06",
  "resolution": "monthly",
  "mode": "absolute",
  "unit": "degC",
  "readouts": {
    "observed":      { "value": 13.42 },
    "preindustrial": { "value": 12.73 },
    "plus3":         { "value": 14.55 }
  },
  "missing": []
}

Tool · compare_scenarios

Return the three scenario temperatures for a single date AND the three authoritative pairwise deltas — warming since pre-industrial (observed−PI), additional warming under +3 °C vs. today (+3−observed), and the full scenario span (+3−PI). Prefer this over computing deltas from get_scenario_readouts. Includes a one-sentence summary string suitable for direct quoting.

Parameters

NameTypeDefaultDescription
datestringlatestYYYY-MM-DD (daily), YYYY-MM (monthly), or YYYY (annual). Defaults to the manifest's latest end date.
resolution"daily" | "monthly" | "annual""daily"Time resolution.
mode"absolute" | "anomaly""absolute"Column read for each scenario. Deltas are always in °C regardless of mode.

Example request

curl -X POST https://storylines.theclimatedatafactory.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 6,
    "method": "tools/call",
    "params": {
      "name": "compare_scenarios",
      "arguments": { "date": "2026-07-14", "resolution": "daily" }
    }
  }'

Example response (structuredContent)

{
  "date": "2026-07-14",
  "resolution": "daily",
  "mode": "absolute",
  "unit": "degC",
  "readouts": {
    "observed":      { "value": 17.42 },
    "preindustrial": { "value": 16.10 },
    "plus3":         { "value": 19.55 }
  },
  "deltas": {
    "observed_minus_preindustrial": 1.32,
    "plus3_minus_observed": 2.13,
    "plus3_minus_preindustrial": 3.45
  },
  "missing": [],
  "summary": "On 2026-07-14 (daily, absolute), observed temperature is +17.42 °C; that is +1.32 °C vs. pre-industrial, and a +3 °C warming world would be +2.13 °C vs. today (+3.45 °C vs. pre-industrial)."
}

Tool · get_map_tile_url

Resolve the CDN URL of the WebP raster tile the dashboard renders for a given scenario, date, resolution, projection, and kind. Tiles are images (colored by the −30…+30 °C colorbar), not raw numeric arrays — use get_gsat_series for globally averaged values.

Parameters

NameTypeDefaultDescription
scenariorequired"observed" | "preindustrial" | "plus3"Which storyline.
resolutionrequired"daily" | "monthly" | "annual"Time resolution.
daterequiredstringYYYY-MM-DD (daily), YYYY-MM (monthly), YYYY (annual).
kind"absolute" | "anomaly""absolute"Absolute temperature field or anomaly vs. 1991–2020.
projection"equirect" | "robinson""equirect"Equirect (3D globe) or Robinson (flat map, oval mask).
include_imagebooleanfalseWhen true, also return the WebP bytes as an inline MCP image block so supporting assistants can display the map directly. Skipped with a text note if the tile exceeds 512 KB.

Rendering: by default the tool returns only the URL — cheap and small. Pass include_image: true to also embed the tile in the response so the assistant can render it inline. This is the raw temperature raster; it does not include coastlines, colorbar, or the dashboard's date caption.

Example request

{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "tools/call",
  "params": {
    "name": "get_map_tile_url",
    "arguments": {
      "scenario": "observed",
      "resolution": "daily",
      "date": "2026-07-14",
      "kind": "anomaly",
      "projection": "equirect"
    }
  }
}

Example response (structuredContent)

{
  "url": "https://cdn.theclimatedatafactory.com/maps/equirect/factual/tas/anomaly/daily/2026-07-14.webp?v=…",
  "scenario": "observed",
  "resolution": "daily",
  "kind": "anomaly",
  "projection": "equirect",
  "date": "2026-07-14",
  "grid": {
    "width": 1441,
    "height": 721,
    "registration": "node",
    "lonRange": [-180, 180],
    "latRange": [-90, 90]
  }
}

Tool · get_dashboard_link

Build a canonical dashboard URL that deep-links to a specific date, resolution, display mode, and view. All parameters are optional; only provided fields are added to the query string.

Parameters

NameTypeDefaultDescription
datestring (YYYY-MM-DD)Selected date.
resolution"daily" | "monthly" | "annual"Serialised as `res` in the URL.
mode"absolute" | "anomaly"Display mode.
view"globe" | "map"Map projection view.
speednumberPlayback speed multiplier (legacy).

Example response (structuredContent)

{
  "url": "https://storylines.theclimatedatafactory.com/?date=2026-07-14&res=daily&mode=anomaly&view=map",
  "params": {
    "date": "2026-07-14",
    "resolution": "daily",
    "mode": "anomaly",
    "view": "map"
  }
}

Errors

Tool-level errors are returned as an MCP tool result with isError: true and a human-readable message in content[0].text. Common cases:

  • Invalid "start" for resolution="…": expected YYYY-MM-DD — date shape mismatched the requested resolution.
  • "start" (…) must be on or before "end" (…) — range is inverted.
  • Rate limit exceeded. Retry in Ns. — more than 30 calls in the last minute from your IP.
  • CSV fetch failed: HTTP … or Manifest fetch failed: HTTP … — upstream data source was unavailable.

Discovery

MCP clients can enumerate tools with the standard tools/list JSON-RPC method against the same endpoint. Most clients (Claude Desktop, ChatGPT connectors, Cursor, Codex) do this automatically when you add the URL above as a remote MCP server.