check_current_alertsLABSCO SUMMARY
Where you run it decides whether it works at all.
The upstream source geo-blocks non-Israeli addresses. That is not a configuration you can override — the machine has to have an Israeli IP, which in practice means running it locally in Israel or on a free-tier GCP e2-micro instance in the me-west1 region. Sort that out before anything else; the rest of the setup is a single make command. Test alerts are built in, so you can prove the path works without waiting for a real event.
What it is
A pair of services: a poller that reads the official Pikud Haoref alert feed and republishes it as a Server-Sent Events stream, and an MCP server that subscribes to that stream once and answers questions from it. One source is polled instead of one per client.
What you get
check_current_alertsreports whether anything is active on the subscribed stream right nowget_alert_historyreturns recent alerts with filtering — a limit between 1 and 50, a region, or a list of cities- City matching handles Hebrew names by substring, so one city name finds every district within it, and falls back to fuzzy matching with a threshold of 60 for near-misses; several cities can be searched at once
get_connection_statustells you whether the subscription is live, which is the first thing to check when nothing is coming throughget_city_alertsandget_db_statsquery the local SQLite store, which keeps full alert data and a denormalised city table indexed for fast lookup- Two resources,
poha://alerts/recentandpoha://alerts/current-status
Requirements
Docker — make deploy builds and starts three containers and health-checks them. The MCP server listens over HTTP at port 8001 under /mcp; the alert poller is on 8000 and an SSE relay on 8002. Both SSE endpoints require an API key in an X-API-Key header, set through API_KEY in the environment file. Geo-restriction to Israeli addresses is optional and needs a MaxMind GeoLite2 database at GEOIP_DB_PATH.
Setup effort
Build from source — git clone https://github.com/LeonMelamud/pikud-a-oref-mcp && cd pikud-a-oref-mcp
USE CASES
Knowing whether an alert is active right now
Read the subscribed stream instead of polling the government endpoint yourself.
Following one city
Filter history by a Hebrew city name and get every district within it, without knowing the exact district spelling.
Working out why nothing is arriving
Check the subscription state before assuming the feed is quiet — an expired key and a calm day look identical otherwise.
Looking at a period after the fact
Query the local store by city and date range rather than the live feed.
5 tools
Listed in project docs. Your client may show a different list.
get_alert_historyget_connection_statusget_city_alertsget_db_statsBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation.
Requires
- A client that can reach a remote MCP server over HTTP
- FastAPI service is running on localhost 8000
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
This one is built from source rather than installed with a single command.
Server setup
# Clone and deploy (one command)
git clone https://github.com/LeonMelamud/pikud-a-oref-mcp && cd pikud-a-oref-mcp
make deploy # Creates .env, builds 3 containers, starts, health-checks
# Manage services
make logs # View logs from all services
make status # Show container status
make down # Stop all services
make restart # Rebuild and restartMCP Clients
OpenClaw
{
"mcpServers": {
"pikud-haoref": {
"url": "http://127.0.0.1:8001/mcp"
}
}
}