HeatShield
HeatShield MCP server enables AI assistants with real-time spatial reasoning for urban heat wave safety. It provides tools for geocoding, weather/heat risk, air quality, finding cooling spots, and heat safety advice.
README
HeatShield: Geospatial MCP Agent
HeatShield is an AI-powered urban heat wave safety assistant designed to demonstrate the power of the Model Context Protocol (MCP) in grounding LLM agents with reliable, deterministic geospatial data.
The Problem with LLM "Freehanding" Spatial Data
When tasked with geospatial routing, weather analysis, or urban heat island (UHI) mapping, native LLMs suffer from severe hallucinations. They invent streets that don't exist, guess walking distances, and fabricate localized temperatures.
HeatShield solves this by entirely decoupling the intelligence layer from the data layer via MCP. Instead of the LLM generating markdown tables or estimating distances, it acts purely as a reasoning engine that orchestrates exact tool calls to deterministic APIs.
Architecture & MCP Implementation
The core of HeatShield is an architecture where the LLM is tightly constrained to use server-side tools. The UI is designed for rapid prototyping, but the true value lies in the backend tool implementation.
Key MCP Tools Built for this Agent:
geocode_location: Resolves human-readable addresses to exact lat/lon coordinates via Nominatim.find_cooling_spots: Queries the Overpass API for real-world infrastructure (parks, water fountains, cooling centers) based on the user's localized coordinates.get_walking_route: Uses OSRM to calculate true walking distances and times, preventing the LLM from relying on "crow-flies" haversine estimations.generate_walkability_isochrone: Generates an exact 15-minute reachable area polygon (GeoJSON).get_urban_heat_island_heatmap: Pulls UHI surface temperature data to render deterministic heat blobs on the map.get_occupational_heat_guidance: Calculates CDC/NIOSH work/rest cycles based strictly on current local wet-bulb globe temperature (WBGT) data.
How it Works
- User asks a question (e.g. "Find a cool place nearby").
- LLM reasons and calls tools. It executes
find_cooling_spotspassing the user's localized coordinates. - MCP Server executes the query, fetching deterministic JSON data from Overpass.
- FastAPI intercepts the JSON payload. Instead of letting the LLM hallucinate prose about the data, FastAPI intercepts the structured GeoJSON and streams it directly to the React frontend.
- React Frontend renders natively. The UI renders the map pins and walking routes using standard Leaflet/React layers, bypassing LLM generation completely.
This architecture ensures that a user never receives a hallucinated safety route during an extreme weather event.
Tech Stack
- Backend: FastAPI (Python), Model Context Protocol (MCP), Uvicorn, SQLite/DuckDB (Spatial Caching).
- Frontend: React, Vite, React-Leaflet.
- External Integrations: Overpass API, Open-Meteo, OSRM.
Setup & Running Locally
- Clone the repository.
- Install Python dependencies:
uv sync - Install Frontend dependencies:
cd frontend && npm install - Start the backend:
uv run uvicorn api:app --reload - Start the frontend:
cd frontend && npm run dev
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.