get_forecast

Pack: nws · Endpoint: https://gateway.pipeworx.io/nws/mcp

Get the 7-day NWS forecast for a US lat/lon. Returns named periods (e.g., “Tonight”, “Wednesday”) with high/low temperature, wind, and a short text forecast. US locations only.

Parameters

NameTypeRequiredDescription
latitudenumberyesUS latitude
longitudenumberyesUS longitude

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_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_forecast', {
  "latitude": 40.7128,
  "longitude": -74.006
});

More examples

{
  "latitude": 34.0522,
  "longitude": -118.2437
}

Response shape

Always returns: location, period_count, periods

FieldTypeDescription
locationobject
updatedstring | nullForecast update timestamp
period_countnumberNumber of forecast periods
periodsarray
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 periods"
    },
    "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.

Regenerated from source · build June 26, 2026