Disasters disrupt thousands of lives every year, leaving behind lasting effects on people and property... You and your family can take simple steps now to prepare for emergencies. By doing so, you take back controlβeven in the uncertainty of disaster.
Source: FEMA. Are You Ready? An In-Depth Guide to Citizen Preparedness, Publication P-2064, September 2020
June 1 is the start of the Atlantic hurricane season, but there are many different types of disasters and hazards. Our risk of becoming affected depends on the possibility of these events and our vulnerability to them.
One way of reducing our exposure to risk is access to up-to-date information. Using Microsoft Copilot Studio, I developed Calamity Agent to:
- βοΈ Get current National Weather Service alerts based on a person's location
- π₯ Provide near-real time fire hazards via NASA's Fire Information for Resource Management System (FIRMS)
- πΊοΈ Show maps of the hazardous areas
- βΉοΈ Recommend useful disaster preparedness information based on all of the above
πΈ Andy Merhaut (GitHub: @tagr)
πΊ CALAMITY AGENT - Agent Academy Hackathon
Figure 1. Adaptive card prompts for user location
Figure 2. Current NWS flash flood warnings for the selected location
Figure 3. Inline map of the hazardous area
Figure 4. Full-size map. Geometry provided by NWS, map generated by Azure Maps
Figure 5. Fire hazard from VIIRS NOAA-21 data
Figure 6. VIIRS wildfire data analysis
Figure 7. Wildfire safety recommendations
graph TB
subgraph User["π€ User Interface"]
U[("π§ User")]
end
subgraph CopilotStudio["π€ Microsoft Copilot Studio"]
CA["π§ Calamity Agent\n(Claude Sonnet 4.6)"]
DOCS["π Knowledge Base\n(FEMA / Ready.gov PDFs)"]
CA --> DOCS
end
subgraph Azure["βοΈ Azure Container Apps"]
MCP["π MCP Server\n(Node.js / Express)"]
API["βοΈ Calamity API\n(.NET Aspire / ASP.NET Core)"]
MCP -->|HTTP REST| API
end
subgraph ExternalAPIs["π External APIs"]
NWS["βοΈ National Weather Service\napi.weather.gov"]
NASA["π₯ NASA FIRMS\nfirms.modaps.eosdis.nasa.gov"]
MAPS["πΊοΈ Azure Maps\natlas.microsoft.com"]
end
U <-->|"π¬ Chat"| CA
CA <-->|"MCP / Streamable HTTP"| MCP
API -->|"Alerts & Zone Data"| NWS
API -->|"VIIRS Fire Detections"| NASA
API -->|"Geocoding & Static Maps"| MAPS
classDef userStyle fill:#6d28d9,stroke:#4c1d95,color:#fff
classDef agentStyle fill:#1d4ed8,stroke:#1e3a8a,color:#fff
classDef docsStyle fill:#2563eb,stroke:#1e3a8a,color:#fff
classDef mcpStyle fill:#0e7490,stroke:#164e63,color:#fff
classDef apiStyle fill:#0f766e,stroke:#134e4a,color:#fff
classDef nwsStyle fill:#1e40af,stroke:#1e3a8a,color:#fff
classDef nasaStyle fill:#b45309,stroke:#78350f,color:#fff
classDef mapsStyle fill:#0369a1,stroke:#0c4a6e,color:#fff
class U userStyle
class CA agentStyle
class DOCS docsStyle
class MCP mcpStyle
class API apiStyle
class NWS nwsStyle
class NASA nasaStyle
class MAPS mapsStyle
sequenceDiagram
actor User as π§ User
participant CA as π§ Calamity Agent<br/>(Copilot Studio)
participant MCP as π MCP Server<br/>(Node.js)
participant API as βοΈ Calamity API<br/>(.NET)
participant NWS as βοΈ NWS API
participant NASA as π₯ NASA FIRMS
participant MAPS as πΊοΈ Azure Maps
User->>CA: "What alerts are near Seattle?"
rect rgb(30, 64, 175)
CA->>MCP: geocode("Seattle, WA")
MCP->>API: GET /geocode?query=Seattle%2C+WA
API->>MAPS: GET /geocode (Azure Maps)
MAPS-->>API: [lat, lon]
API-->>MCP: [lat, lon]
MCP-->>CA: lat: 47.60, lon: -122.33
end
rect rgb(14, 116, 144)
CA->>MCP: get-alerts(lat, lon)
MCP->>API: GET /nws/zone?lat=47.60&lon=-122.33
API->>NWS: GET /points/{lat},{lon}
NWS-->>API: zone IDs (forecast / county / fire)
API->>NWS: GET /alerts/active/zone/{zoneId} (Γ3, parallel)
NWS-->>API: active alert headlines & descriptions
API-->>MCP: JSON alert payload
MCP-->>CA: formatted alert text
end
rect rgb(15, 118, 110)
CA->>MCP: alert-map(lat, lon)
MCP-->>CA: Azure Maps static image URL
end
CA-->>User: Alert summary + map image URL
opt π₯ Fire query
rect rgb(180, 83, 9)
CA->>MCP: get-viirs-fires(lat, lon)
MCP->>API: GET /fires/viirs?lat=...&lon=...
API->>NASA: GET /api/area/csv/{key}/VIIRS_NOAA21_NRT/{bbox}/{days}
NASA-->>API: CSV fire detections
API-->>MCP: JSON fire detection records
MCP-->>CA: structured VIIRS fire data
end
rect rgb(180, 83, 9)
CA->>MCP: alert-fire(lat, lon)
MCP->>API: GET /map/static?overlay=fire
API->>NASA: GET /api/area/csv/{key}/VIIRS_NOAA21_NRT/{bbox}/{days}
NASA-->>API: CSV fire detections
API->>MAPS: GET /map/static (with fire overlays)
MAPS-->>API: PNG image bytes
API-->>MCP: Azure Maps static image URL
MCP-->>CA: fire map URL
end
CA-->>User: Fire detection data + map
end
- π· .NET 10 / ASP.NET Core Minimal APIs
- π .NET Aspire β service defaults, OpenTelemetry, health checks
- π Microsoft.AspNetCore.OpenApi β OpenAPI / Swagger
- πΊοΈ Azure Maps β geocoding and static map image rendering
- βοΈ National Weather Service REST API β zone lookups, active alert queries
- π₯ NASA FIRMS VIIRS NOAA-21 NRT API β near real-time fire detection data (CSV)
- π Ramer-Douglas-Peucker polygon simplification (built-in) for NWS zone rendering
- π· .NET 10 / .NET Aspire hosting model
- ποΈ Orchestrates local development and Azure deployment of the API project
- βοΈ Azure Developer CLI (
azd) β cloud provisioning and container deployment
- π’ Node.js / π· TypeScript
- β‘ Express 5 β HTTP server
- π€
@modelcontextprotocol/sdkβ MCP Streamable HTTP transport - β Zod β input schema validation for MCP tools
- π οΈ Exposes five tools to Copilot Studio:
geocode,get-alerts,alert-map,alert-fire,get-viirs-fires - βοΈ Deployed as an Azure Container App
- ποΈ Microsoft Copilot Studio β declarative YAML /
.mcs.ymlformat - π§ Claude Sonnet 4.6 β underlying generative model
- π MCP connector (
ca_CalamityMCP2) β connects the agent to the MCP Server via Streamable HTTP - π Knowledge base β FEMA and Ready.gov preparedness PDFs for grounding responses
- π¬ Topics: greeting, current conditions, conversation lifecycle, fallback handling
- π Variables:
UserLocation,locationfor session state
| Tool | Purpose | Min Version |
|---|---|---|
| π· .NET SDK | Build and run the Aspire API | 10.0 |
| π’ Node.js | Build and run the MCP server | 22 LTS |
| π³ Docker Desktop | Container runtime for Aspire local dev | latest |
βοΈ Azure Developer CLI (azd) |
Provision and deploy to Azure Container Apps | 1.x |
| π Azure subscription | Host the container apps and Azure Maps | β |
| πΊοΈ Azure Maps account | Geocoding and static map rendering | β |
| π₯ NASA FIRMS API key | VIIRS fire detection data | β |
| π€ Microsoft Copilot Studio license | Deploy and run the Calamity Agent | β |
| πͺ£ Azure Blob Storage account | (Optional) Host static map image assets served to the agent | β |
Configure secrets for Azure Maps and NASA FIRMS. The recommended approach is .NET user secrets so keys are never committed:
cd CalamityCopilotService.Api
dotnet user-secrets set "AzureMaps:Key" "<your-azure-maps-key>"
dotnet user-secrets set "NasaFirms:ApiKey" "<your-nasa-firms-key>"Run locally via .NET Aspire (launches the API + Aspire dashboard):
cd CalamityCopilotService.AppHost
dotnet runThe Aspire dashboard opens at https://localhost:17191. The API is available at the URL shown in the dashboard for the calamitycopilotservice-api resource.
Install dependencies and build:
cd MCP
npm install
npm run buildCreate a .env file in MCP/ with the URL of your running API (local or deployed):
CALAMITY_API_BASE_URL=http://localhost:<port-from-aspire-dashboard>Start the server:
npm startThe MCP server listens on http://localhost:3000/mcp by default. Set the PORT environment variable to override.
Both the API and MCP server are deployed as Azure Container Apps using the Azure Developer CLI from the repository root:
azd auth login
azd upazd up provisions all Azure resources defined in azure.yaml (resource group, container registry, container apps) and deploys both services. After deployment, update MCP/.env with the deployed API URL shown in the azd up output, then redeploy the MCP server.
- Open Copilot Studio and import the solution from
CopilotStudio/Calamity Agent/. - Open the CalamityMCP2 connector and update the MCP server URL to point to your deployed Azure Container App endpoint.
- Publish the agent.
β₯οΈ My familyβ₯οΈ My friends- πΊ Elaiza Benitez's Copilot Studio Agent Academy series, especially Mission 08. Enhance user interactions in topics with Adaptive Cards to level up my agent UI
- How the VIIRS Satellite Tracks Earth's Climate | The Henry Fordβs Innovation Nation
- Plan Ahead for Disasters | Ready.gov
- Original: National Oceanic and Atmospheric AdministrationβVector: Clindberg, Public domain, via Wikimedia Commons
- Original: National Aeronautics and Space Administration Image: Public Domain, via NASA FIRMS
