get_hourly_forecast
Pack: nws · Endpoint: https://gateway.pipeworx.io/nws/mcp
Get the hourly NWS forecast for a US lat/lon (~168 hours). Useful for short-term planning, severe-weather windows, or precipitation timing.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
latitude | number | yes | US latitude |
longitude | number | yes | US longitude |
max_hours | number | no | Cap hours returned (default 24) |
Example call
Arguments
{
"latitude": 40.7128,
"longitude": -74.006
}
curl
curl -X POST https://gateway.pipeworx.io/nws/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_hourly_forecast","arguments":{"latitude":40.7128,"longitude":-74.006}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_hourly_forecast', {
"latitude": 40.7128,
"longitude": -74.006
});
More examples
{
"latitude": 39.7392,
"longitude": -104.9903,
"max_hours": 48
}
Response shape
Always returns: location, period_count, periods
| Field | Type | Description |
|---|---|---|
location | object | |
updated | string | null | Forecast update timestamp |
period_count | number | Number of forecast hours |
periods | array |
Full JSON Schema
{
"type": "object",
"properties": {
"location": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Input latitude"
},
"longitude": {
"type": "number",
"description": "Input longitude"
},
"city": {
"type": [
"string",
"null"
],
"description": "Nearest city name"
},
"state": {
"type": [
"string",
"null"
],
"description": "State abbreviation"
},
"timezone": {
"type": [
"string",
"null"
],
"description": "IANA timezone"
},
"grid": {
"type": [
"string",
"null"
],
"description": "NWS grid ID and coordinates"
},
"radar_station": {
"type": [
"string",
"null"
],
"description": "Nearest radar station"
}
},
"required": [
"latitude",
"longitude"
]
},
"updated": {
"type": [
"string",
"null"
],
"description": "Forecast update timestamp"
},
"period_count": {
"type": "number",
"description": "Number of forecast hours"
},
"periods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": [
"string",
"null"
],
"description": "Period name (e.g. Tonight)"
},
"start": {
"type": [
"string",
"null"
],
"description": "Start time ISO 8601"
},
"end": {
"type": [
"string",
"null"
],
"description": "End time ISO 8601"
},
"is_daytime": {
"type": [
"boolean",
"null"
],
"description": "Daytime period flag"
},
"temperature": {
"type": [
"number",
"null"
],
"description": "Temperature in unit"
},
"temperature_unit": {
"type": [
"string",
"null"
],
"description": "F or C"
},
"wind": {
"type": [
"string",
"null"
],
"description": "Wind speed and direction"
},
"precip_chance_pct": {
"type": [
"number",
"null"
],
"description": "Precipitation probability"
},
"short": {
"type": [
"string",
"null"
],
"description": "Short forecast text"
},
"detailed": {
"type": [
"string",
"null"
],
"description": "Detailed forecast text"
}
}
}
}
},
"required": [
"location",
"period_count",
"periods"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"nws": {
"url": "https://gateway.pipeworx.io/nws/mcp"
}
}
}
See Getting Started for client-specific install steps.