GnistAI GnistAI
Log in

Getting Started with NOAA Tides & Currents

Tidal predictions, observed water levels, and coastal station meteorological data for U.S. coastlines.

All Tutorials   |   Overview   |   Playground   |   MCP   |   REST API   |   Home
Environment

Data source: NOAA CO-OPS Tides & Currents

Overview

NOAA Tides & Currents wraps NOAA CO-OPS Tides & Currents, handling authentication, pagination, and rate limits for you. This tutorial covers all 5 tools with working code examples you can copy and run.

Prerequisites

  1. Sign up at https://context.gnist.ai/signup for a free API key (100 calls/day).
  2. Choose your integration method: MCP protocol or REST API.

Connect via MCP

Add to your MCP client config (Claude Desktop, Cursor, etc.):

MCP Config
{
  "mcpServers": {
    "gnist-noaa-tides": {
      "url": "https://context.gnist.ai/mcp/noaa-tides/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Tools (5)

get_tide_predictions

Get tide predictions for a NOAA CO-OPS station. Returns predicted high/low tide times and heights, or water level predictions at regular intervals. Use 'hilo' interval for high/low tide times, or a numeric interval for evenly-spaced predictions. Args: station: NOAA station identifier. begin_date: Start date (yyyyMMdd). end_date: End date (yyyyMMdd). datum: Tidal datum reference level. interval: Prediction granularity. units: Measurement units. Returns: Predictions with time, value (water level), and type (high/low if hilo).

ParameterTypeRequiredDescription
stationstringrequiredNOAA station ID (e.g. '9414290' for San Francisco, '8518750' for The Battery NYC).
begin_datestringrequiredStart date in yyyyMMdd format (e.g. '20260320').
end_datestringrequiredEnd date in yyyyMMdd format (e.g. '20260321'). Max 1 year for high/low.
datumstringoptionalTidal datum reference. Common: MLLW (default), MSL, NAVD, MHHW. (default: MLLW)
intervalstringoptionalPrediction interval: 'hilo' for high/low only, 'h' for hourly, or minutes (1,5,6,10,15,30,60). (default: hilo)
unitsstringoptionalUnits: 'metric' (meters, Celsius) or 'english' (feet, Fahrenheit). (default: metric)
curl -X POST "https://context.gnist.ai/mcp/noaa-tides/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_tide_predictions", "arguments": {"station": "'9414290'", "begin_date": "'20260320'", "end_date": "'20260321'"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-tides/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'begin_date': "'20260320'",
                          'end_date': "'20260321'",
                          'station': "'9414290'"},
            'name': 'get_tide_predictions'}},
)
print(resp.json())

get_water_levels

Get observed (actual) water level data from a NOAA tide station. Returns real-time or historical water level observations at 6-minute intervals. Compare with predictions to see storm surge, wind effects, or other anomalies. Args: station: NOAA station identifier. begin_date: Start date (yyyyMMdd). end_date: End date (yyyyMMdd). datum: Tidal datum reference level. units: Measurement units. Returns: Observations with time, value (water level), sigma (std dev), and quality flag.

ParameterTypeRequiredDescription
stationstringrequiredNOAA station ID (e.g. '9414290' for San Francisco).
begin_datestringrequiredStart date in yyyyMMdd format.
end_datestringrequiredEnd date in yyyyMMdd format. Max 1 month for 6-minute data.
datumstringoptionalTidal datum reference. Common: MLLW (default), MSL, NAVD. (default: MLLW)
unitsstringoptionalUnits: 'metric' or 'english'. (default: metric)
curl -X POST "https://context.gnist.ai/mcp/noaa-tides/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_water_levels", "arguments": {"station": "'9414290'", "begin_date": "2025-01-15", "end_date": "2025-01-15"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-tides/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'begin_date': '2025-01-15',
                          'end_date': '2025-01-15',
                          'station': "'9414290'"},
            'name': 'get_water_levels'}},
)
print(resp.json())

get_station_data

Get meteorological observations from a NOAA coastal station. Retrieves current or recent readings for water temperature, air temperature, wind speed/direction, barometric pressure, and other environmental parameters. Args: station: NOAA station identifier. product: Type of meteorological data. date: Time filter. units: Measurement units. Returns: Readings with time and measured values (varies by product).

ParameterTypeRequiredDescription
stationstringrequiredNOAA station ID (e.g. '9414290').
productstringrequiredData product: 'water_temperature', 'air_temperature', 'wind', 'air_pressure', 'humidity'.
datestringoptionalDate filter: 'latest' for most recent, 'today', 'recent' (last 72h). (default: latest)
unitsstringoptionalUnits: 'metric' or 'english'. (default: metric)
curl -X POST "https://context.gnist.ai/mcp/noaa-tides/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_station_data", "arguments": {"station": "'9414290'", "product": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-tides/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'product': 'example', 'station': "'9414290'"},
            'name': 'get_station_data'}},
)
print(resp.json())

search_stations

Search for NOAA tide prediction stations. Find stations by US state. Returns station IDs, names, and coordinates that can be used with other tide tools. Args: state: US state abbreviation to filter by. max_results: Maximum results. Returns: List of stations with id, name, state, latitude, longitude.

ParameterTypeRequiredDescription
stateanyoptionalFilter by US state abbreviation (e.g. 'CA', 'NY', 'FL').
max_resultsintegeroptionalMaximum number of stations to return (1-500). (default: 50)
curl -X POST "https://context.gnist.ai/mcp/noaa-tides/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "search_stations", "arguments": {"state": "'CA'"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-tides/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'state': "'CA'"}, 'name': 'search_stations'}},
)
print(resp.json())

report_feedback

Report a bug, feature request, or general feedback for this data source. Use this when something doesn't work as expected, when you'd like a new feature, or when you have suggestions for improvement. Args: feedback: Describe the issue or suggestion. feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: general)
curl -X POST "https://context.gnist.ai/mcp/noaa-tides/" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "report_feedback", "arguments": {"feedback": "example"}}}'
import httpx

resp = httpx.post(
    "https://context.gnist.ai/mcp/noaa-tides/",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={'id': 1,
 'jsonrpc': '2.0',
 'method': 'tools/call',
 'params': {'arguments': {'feedback': 'example'}, 'name': 'report_feedback'}},
)
print(resp.json())

Common Patterns

Search then retrieve
Use search_stations to find items, then get_tide_predictions to get full details. This two-step pattern is common for exploring data before drilling down.
Pagination
Several tools support limit, offset, or page parameters. Start with small limits during development, then increase for production queries.
Date range filtering
Use date range parameters to narrow results to a specific time window. Dates are typically in YYYY-MM-DD format.

FAQ

What data does NOAA Tides & Currents provide?

Tidal predictions, observed water levels, and coastal station meteorological data for U.S. coastlines. It exposes 5 tools: get_tide_predictions, get_water_levels, get_station_data, search_stations, report_feedback.

What do I need to get started?

A Gnist API key (free tier: 100 calls/day). Sign up at https://context.gnist.ai/signup.

What format does the NOAA Tides & Currents API return?

JSON, via either MCP protocol (JSON-RPC 2.0) or REST API.

Next Steps

Related Tutorials