after-hours
Interprets facility opening hours written in OpenStreetMap opening_hours syntax (e.g. Mo-Th 09:00-20:00) when analyzing lists of places, so agents can ask which locations are actually open at a given hour and where coverage gaps fall; unreadable hours are treated as unknown rather than open.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
After Hours
Defibrillators keep office hours. Cardiac arrest doesn't.
After Hours maps New York City's 4,032 public defibrillator (AED) locations by the hour, showing which ones sit behind an unlocked door. It replays 25,448 cardiac-arrest 911 calls from 2025 against those timetables, and ranks where a 24/7 street-wall cabinet would reach the most of them.
Live site: https://dqcf6x4e7zbds.cloudfront.net
Demo video (2:51, 4K): https://youtu.be/64XxO61yvs4
60-second guided story: https://dqcf6x4e7zbds.cloudfront.net/map.html?story
Map: https://dqcf6x4e7zbds.cloudfront.net/map.html (every view has a shareable link; ask it in your own words, e.g. "Sunday 11 PM near Penn Station")
School briefs, one printable page each, in English or Spanish: https://dqcf6x4e7zbds.cloudfront.net/brief.html (Spanish: P.S. 053)
Bring your own data: https://dqcf6x4e7zbds.cloudfront.net/data.html
API and live console: https://dqcf6x4e7zbds.cloudfront.net/api.html
MCP server for AI assistants:
claude mcp add --transport http after-hours https://dqcf6x4e7zbds.cloudfront.net/api/mcp
Built for the AWS Builder Center Weekend Challenge: Map it (October–November 2026).
What it found
NYC AED locations that are school buildings | 1,925 of 4,032 (48%); 69% outside Manhattan |
2025 cardiac-arrest calls while school buildings were shut | 16,285 of 25,448 (64%) |
AED locations open by published hours or the school day, school-year Tuesday 2 PM → Sunday 3 AM | 2,636 → 52 |
Coverage a time-blind map shows that was locked at the hour calls came | 69% |
…even if every venue with unknown hours were open 24/7 | 39% |
Paris (France makes owners declare hours): open by declared hours, Tue 2 PM → Sun 3 AM | 838 → 219 |
2025 calls with an open AED within a two-minute walk, today → with 24/7 cabinets at the top 100 schools (modelled; calls are known by ZIP code) | about 363 → at least 448 (+23%) |
Same 100 cabinets chosen by After Hours vs. ignoring hours vs. at random (calls a year newly in reach) | 85.8 vs. 74.3 vs. 26.2 |
Try the last row on the map: Make 24/7 → Put a 24/7 cabinet outside the top 10 / 25 / 50 / 100 relights those schools at every hour (top 100 at Sunday 3 AM).
Every number is computed by the pipeline in this repo and written to web/public/data/*/summary.json; the web pages fill them in at build time and never hardcode one.
Related MCP server: Magic Lane MCP Server
Check every number
npm install
npm test # 16 tests: the engine, and the API against the published data (offline)
npm run verify # 30 claims in this README and the article, recomputed from the downloadable data
npm run verify:live # …plus 6 questions asked of the live API (36 in all)
npm run eval # "Ask the map" on 72 fixed questions (calls Amazon Bedrock and Amazon Location)verify recounts the open locations from sites.csv with the same engine the pipeline uses, re-adds the ranking from relocation.csv, and exits 1 if any stated number has drifted from the data.
eval measures the question box on a 48-question development set and a 24-question held-out set: places to find, emergencies to flag, look-alikes to read calmly, places outside the city to decline, and injected instructions that put nothing on the map. Results, with every question and answer, are in evals.json and on the How it works page.
How it works
NYC Open Data ──► hours ──────────────► walking areas ──► coverage grid ──► presets (S3) ──► CloudFront site
AED Inventory school calendar Amazon Location 50 m × 336 hours + CSV downloads API Gateway + Lambda
FDNY dispatch Amazon Location Places Routes isolines call-weighted MCP server
ZIP polygons Amazon Bedrock (graded) (Pedestrian, 2 min)
Géo'DAE (France)
Overture Maps ◄── Amazon Athena (Registry of Open Data on AWS): fire/police/hospital hosts near top schools
GetStaticMap ───► one printable brief per ranked school (/brief.html)
EventBridge Scheduler ─► Lambda ─► S3 ─► Apache Iceberg table (Athena INSERT) ─► nightly "what changed" diffAWS service | What it does here |
Amazon Location Service: Maps | Monochrome basemap, light or dark to match the page's theme (browser API key limited to the site's referrer and |
Amazon Location Service: Places | Opening hours for 742 named AED venues ( |
Amazon Location Service: Routes |
|
Registry of Open Data on AWS + Amazon Athena | Overture Maps places (Parquet in |
Apache Iceberg on Amazon S3 + AWS Glue | Nightly snapshot of the AED registry; every version kept for diffs |
Amazon Bedrock (Claude Haiku 4.5) | Hours estimates for unpublished venues, graded blind on 742 known venues (85% hour agreement, 8.3% false-open, so excluded from headline numbers); grounded two-sided debate |
Amazon API Gateway | Public API |
AWS Lambda | API, MCP server (Streamable HTTP), nightly refresh |
Amazon EventBridge Scheduler | Starts the refresh at 06:15 New York time |
Amazon DynamoDB | Daily caps on key creation and debates |
Amazon CloudFront + Amazon S3 | Site, data downloads, |
AWS CDK |
|
Reuse the pattern
For your own list of places with hours (AEDs, naloxone boxes, cooling centres): upload a CSV or GeoJSON at /data.html, or
curl -X POST https://dqcf6x4e7zbds.cloudfront.net/api/v1/analyze \
-H "x-api-key: YOUR_KEY" -H "content-type: application/json" \
-d '{"timeZone":"America/Chicago","sites":[{"name":"Library","lat":41.876,"lon":-87.628,"hours":"Mo-Th 09:00-20:00"}]}'Hours use OpenStreetMap opening_hours syntax. Unreadable hours are treated as unknown, never as open.
To run the whole thing:
npm install
npm test # engine + API tests
npm run fetch -w pipeline # NYC Open Data
npm run paris -w pipeline # Géo'DAE
npm run hours -w pipeline
npm run places -w pipeline # Amazon Location Places (paid, cached)
npm run isolines -w pipeline # Amazon Location Routes (paid, cached)
npm run infer -w pipeline # Amazon Bedrock estimates + blind grade
npx tsx pipeline/src/overture.ts # Athena over Overture (needs the deployed workgroup)
npm run build -w pipeline # presets, CSVs
npx tsx pipeline/src/build-samples.ts
(cd api && LOCAL_DATA_DIR=../web/public/data npx tsx src/precompute-debates.ts 10) # saved debates
npm run council -w pipeline # City Council districts + members, for each brief
npm run briefs -w pipeline # school briefs + Amazon Location static maps
npm run sample-maps -w pipeline # sample previews (static maps)
npm run api-figure -w pipeline -- https://YOUR-SITE # one /nearest answer, drawn
python scripts/briefs-webp.py # PNG → WebP
npm run deploy -w infra # CDK
sh scripts/deploy-web.sh # build with the map key, sync to S3, invalidateScope and assumptions
FDNY publishes calls by ZIP code, so each ZIP's calls are spread evenly over its streets.
School hours follow the school day (7 AM–6 PM); the map lets you try 3 PM and 9 PM.
Headline numbers use published hours and the school calendar; 1,278 venues with AI-estimated hours are one switch away on the map.
Hours describe the building; each location's card lists where its AEDs sit inside.
A planning tool. In an emergency, call 911.
Data and credits
NYC AED Inventory, FDNY EMS Incident Dispatch Data and MODZCTA from NYC Open Data; Géo'DAE (Licence Ouverte 2.0); Overture Maps (ODbL/CDLA, via the Registry of Open Data on AWS); Paris arrondissements (ODbL). Photographs from Wikimedia Commons, credited in web/public/photos/credits.json. Research cited on /method.html.
Code: Apache-2.0. The opening_hours library is LGPL-3.0.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Location infrastructure for AI to search and reason over places.
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Mobility, geocoding and nearby urban services for AI agents.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables AI assistants to search, validate, and edit OpenStreetMap data through natural language commands and built-in safety protections. It supports discovery of nearby amenities, geographic data exploration, and secure map editing via OAuth authentication.365MIT

Magic Lane MCP Serverofficial
AlicenseBqualityCmaintenanceEnables AI agents to become geospatially intelligent assistants with tools for location search, smart routing, round trip planning, reverse geocoding, isochrone analysis, route visualization, geofence management, and interactive map display.812 npm8Apache 2.0- AlicenseAqualityDmaintenanceEnables AI assistants to find and get status of NYC public restrooms using live NYC Open Data, including hours, accessibility, and inspection reports.251 npm1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to find nearby public places such as pharmacies, supermarkets, gas stations, EV chargers, libraries, and post offices, with attributed opening-hours data from OpenStreetMap.1MIT