DublinBayBuoy.com

Developer API Beta · free read-only access to Dublin Bay buoy observations

👋 What you get

Dublin Bay buoy readings, on tap. Same dataset, two surfaces:

  • MCP endpoint - for Claude Code, Cursor, or any LLM agent. 6 curated marine-data verbs; the server holds the key for you. Jump to MCP →
  • PostgREST API - for apps, scripts, dashboards. REST + RPCs with a public key. Details below.

Backed by 30k+ hourly buoy readings since 2023-01-01 and 3 RPCs for the heavy queries. No sign-up for read access.

🤖 Use it as an MCP server

Point your MCP-capable client at https://mcp.dublinbaybuoy.com/ (streamable-HTTP transport) and you get 6 named marine-data tools. No signup, no token, no config surface - the server holds the publishable key for you.

Claude Code / Claude Desktop / Cursor / Windsurf

Add to ~/.claude.json (or a project-scoped .mcp.json - same shape for Cursor, Windsurf, and other MCP-capable IDEs):

{
  "mcpServers": {
    "dublin-bay": {
      "type": "http",
      "url": "https://mcp.dublinbaybuoy.com/"
    }
  }
}

Or one-liner on the Claude Code CLI:

claude mcp add --transport http dublin-bay https://mcp.dublinbaybuoy.com/

Restart the client - tools appear as mcp__dublin-bay__*.

Python MCP SDK

from mcp.client.streamable_http import streamablehttp_client
from mcp import ClientSession

async with streamablehttp_client("https://mcp.dublinbaybuoy.com/") as (r, w, _):
    async with ClientSession(r, w) as s:
        await s.initialize()
        tools = await s.list_tools()
        result = await s.call_tool("get_current_conditions", {})
        print(result)

Tools exposed

ToolReturns
describe_dataMetadata: coverage, units, upstream sources, attribution. Call first to orient an LLM.
get_current_conditionsLatest hourly buoy row - wind, gusts, waves, water temp, is_gale.
get_recent_readings(hours=24)Hourly series; auto-downsampled to daily means past 720 h.
get_summary(days=7)Means for wind / gust / wave / water temp over the window.
get_wind_rose(days=30)16-bucket compass histogram + prevailing direction.
get_recordsAll-time extremes since 2023-01.

Try these prompts

  • “What's the wind doing in Dublin Bay right now?” → get_current_conditions
  • “What direction does the wind usually blow from here in winter?” → get_wind_rose

Why curated verbs, not raw SQL?

LLMs burn tokens and get creative with SQL. Named verbs like get_wind_rose(days=30) are cheaper, safer, and self-documenting. The server holds the publishable key, so clients never rotate tokens. Read-only by design - RLS on every table, SECURITY DEFINER on every RPC, no write paths exposed.

Self-host it

The source is ~200 lines of FastMCP + httpx, trivially portable to any PostgREST-compatible backend:

cd dublin-bay-bot/mcp
uv pip install --system -r requirements.txt
SUPABASE_URL=https://api.dublinbaybuoy.com \
SUPABASE_ANON_KEY=<publishable key - sb_publishable_…> \
PORT=8080 \
python server.py
This endpoint is read-only and anonymous. Need write access, raw SQL, or schema introspection? A lower-level admin MCP is available with a service-role key - email [email protected].

🔑 Base URL & key

All endpoints are served from:

https://api.dublinbaybuoy.com/rest/v1/

Pass the public anon key on every request. It’s safe to embed in client code - RLS limits it to SELECT on public tables:

apikey: sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3
The public key is public by design, but heavy traffic will earn you a per-key quota. Email [email protected] before you build something big - a dedicated API quota takes two minutes.

⚡ Quick start

Pick a language - every example is a single standalone copy-paste. No env vars, no setup.

Latest reading

curl -sS "https://api.dublinbaybuoy.com/rest/v1/readings?select=*&order=timestamp.desc&limit=1" \
  -H "apikey: sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3" | jq
import httpx

ANON_KEY = "sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3"

r = httpx.get(
    "https://api.dublinbaybuoy.com/rest/v1/readings?select=*&order=timestamp.desc&limit=1",
    headers={"apikey": ANON_KEY},
)
print(r.json())
// Paste into your browser's DevTools console, or a Node 18+ REPL.
const ANON_KEY = "sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3";

const r = await fetch(
  "https://api.dublinbaybuoy.com/rest/v1/readings?select=*&order=timestamp.desc&limit=1",
  { headers: { apikey: ANON_KEY } },
);
console.log(await r.json());

Last 24 hourly readings

curl -sS "https://api.dublinbaybuoy.com/rest/v1/readings?select=timestamp,avg_wind,gust_speed,wave_height&order=timestamp.desc&limit=24" \
  -H "apikey: sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3" | jq
r = httpx.get(
    "https://api.dublinbaybuoy.com/rest/v1/readings?select=timestamp,avg_wind,gust_speed,wave_height&order=timestamp.desc&limit=24",
    headers={"apikey": ANON_KEY},
)
print(r.json())
const r = await fetch(
  "https://api.dublinbaybuoy.com/rest/v1/readings?select=timestamp,avg_wind,gust_speed,wave_height&order=timestamp.desc&limit=24",
  { headers: { apikey: ANON_KEY } },
);
console.log(await r.json());

Wind rose - last 30 days

curl -sS -X POST "https://api.dublinbaybuoy.com/rest/v1/rpc/rpc_wind_rose" \
  -H "apikey: sb_publishable_R5KkIpbiwNajUyx3I4aewQ_S4NI8hl3" \
  -H "Content-Type: application/json" \
  -d '{"days": 30}' | jq
r = httpx.post(
    "https://api.dublinbaybuoy.com/rest/v1/rpc/rpc_wind_rose",
    headers={"apikey": ANON_KEY},
    json={"days": 30},
)
print(r.json())
const r = await fetch(
  "https://api.dublinbaybuoy.com/rest/v1/rpc/rpc_wind_rose",
  {
    method: "POST",
    headers: { apikey: ANON_KEY, "Content-Type": "application/json" },
    body: JSON.stringify({ days: 30 }),
  },
);
console.log(await r.json());

Units

  • Wind & gusts - knots
  • Direction - degrees true (meteorological: from)
  • Waves - metres / seconds
  • Temperature - °C
  • All timestamps - UTC

🧮 RPCs

Server-side functions for the heavy stuff. Call with POST /rest/v1/rpc/<name> and a JSON body of arguments.

rpc_summary(days int)

Min/mean/max for every variable over the window. One-call dashboard feed.

rpc_wind_rose(days int default null)

Wind-direction histogram in 16 buckets of 22.5°, zero-padded. Suitable for polar charts. Omit days for the full archive.

rpc_readings_downsampled(hours int)

Bucketed averages for long time-series charts. Hourly buckets for up to 30 days (hours ≤ 720); daily buckets beyond that.

⚖️ Fair use & attribution

  • Soft limit: ~60 requests/min on the anonymous key. Burst is fine; sustained load gets noticed.
  • Please credit: “Data from Dublin Bay Buoy (dublinbaybuoy.com), sourced from Irish Lights MetOcean”.
  • Data is provided as-is. Not for navigation.
  • Questions, quota requests, or issues - [email protected].

Data sources & licences

  • Irish Lights MetOcean (the Dublin Bay Buoy and coastal fleet) - published on data.gov.ie under the Creative Commons Attribution 4.0 (CC BY 4.0) licence. If you republish this data, attribute Irish Lights.
  • Open-Meteo forecasts - CC BY 4.0, attribute Open-Meteo.
  • Dublin Port Company tide tables - the harbour authority’s published predictions for Dublin (North Wall), reproduced with attribution.
  • Satellite imagery - © Esri, Maxar, Earthstar Geographics (ArcGIS World Imagery).