AirNow Examples
Practical examples for using AirNow tools.
Get Forecast RSS Feed
MCP Protocol Tester
Protocol Flow
Example: Get Forecast RSS Feed
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "airnow.get_forecast_rss",
"arguments": {
"state": "CA",
"city": "San Francisco",
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcpExample: Get Current Conditions RSS
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "airnow.get_current_conditions_rss",
"arguments": {
"state": "NY",
"city": "New York",
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcpExample: Get Current Observations (REST API)
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "airnow.get_current_observations",
"arguments": {
"zip_code": "94102",
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcpExample: Get Forecast by Coordinates (REST API)
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "airnow.get_forecast",
"arguments": {
"lat": 37.7749,
"lon": -122.4194,
"distance": 25,
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcpExample: Get Historical Observations
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "airnow.get_historical_observations",
"arguments": {
"zip_code": "94102",
"date": "2025-01-24",
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcpExample: Get Action Day RSS Feed
curl -X POST \
-H "x-api-key: dev-key-12345" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "airnow.get_action_day_rss",
"arguments": {
"state": "CA",
"city": "Los Angeles",
"data_format": "cleaned"
}
}
}' \
http://localhost:3001/api/v1/services/airnow/mcp