current_by_location
Pack: airnow · Endpoint: https://gateway.pipeworx.io/airnow/mcp
Latest observed AQI for the AirNow station nearest a lat/lon.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
latitude | number | yes | US latitude |
longitude | number | yes | US longitude |
distance_miles | number | no | Search radius (default 25, max 250) |
Example call
curl -X POST https://gateway.pipeworx.io/airnow/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"current_by_location","arguments":{}}}'
Response shape
Always returns: latitude, longitude, count, observations
| Field | Type | Description |
|---|---|---|
latitude | number | Query latitude |
longitude | number | Query longitude |
count | integer | Number of observations returned |
observations | array | Latest AQI observations for nearest station |
Full JSON Schema
{
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Query latitude"
},
"longitude": {
"type": "number",
"description": "Query longitude"
},
"count": {
"type": "integer",
"description": "Number of observations returned"
},
"observations": {
"type": "array",
"description": "Latest AQI observations for nearest station",
"items": {
"type": "object",
"properties": {
"date": {
"type": [
"string",
"null"
],
"description": "Date observed (YYYY-MM-DD)"
},
"hour": {
"type": [
"integer",
"null"
],
"description": "Hour observed (0-23)"
},
"timezone": {
"type": [
"string",
"null"
],
"description": "Local time zone"
},
"reporting_area": {
"type": [
"string",
"null"
],
"description": "Geographic area name"
},
"state": {
"type": [
"string",
"null"
],
"description": "State code"
},
"latitude": {
"type": [
"number",
"null"
],
"description": "Site latitude"
},
"longitude": {
"type": [
"number",
"null"
],
"description": "Site longitude"
},
"pollutant": {
"type": [
"string",
"null"
],
"description": "Pollutant name (e.g., O3, PM2.5)"
},
"aqi": {
"type": [
"integer",
"null"
],
"description": "Air Quality Index value"
},
"category": {
"type": [
"string",
"null"
],
"description": "AQI category (Good, Moderate, etc.)"
},
"category_number": {
"type": [
"integer",
"null"
],
"description": "AQI category numeric code"
}
}
}
}
},
"required": [
"latitude",
"longitude",
"count",
"observations"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"airnow": {
"url": "https://gateway.pipeworx.io/airnow/mcp"
}
}
}
See Getting Started for client-specific install steps.