Skip to content

160-tool MCP server for real-time global intelligence from free public APIs: markets, liquidity, prediction markets, SEC filings, conflict, military, aircraft-cohort early warning, migration and border flows, cyber, climate, news and more. Dated observation history, 29 research prompts, cited briefs, geofences, SSE dashboard. MIT, no paid API keys.

Merge feat/aoi-escalation-signals round 2: real outages, stale copies refused, GDELT keys, shifted grids, capped samples

Phoenix Agent (mac-studio)428d83662740
diff --cc README.md
index 8d66fb4,d49308e..b60f5c8
--- a/README.md
+++ b/README.md
@@@ -710,22 -571,30 +710,31 @@@ instead of silently omitting it
`intel_aoi_escalation` runs the same baseline/military/conflict/social-
unrest scoring engine that powers `intel_hotspot_escalation` for the 22
built-in hotspots, but scoped to your AOI's own radius instead of a fixed
- 2-degree window. It also scores the two components the built-ins leave
- null. News is the rise in the area's share of all GDELT coverage over the
- last 7 days against the 7 before, for the reverse-geocoded place (the
- same query the brief uses), so a swing or outage in what GDELT ingests is
- not read as a news surge. Convergence runs the multi-domain convergence
- grid over the earthquakes, military flights, ACLED events and wildfires
- inside the AOI's exact shape. If either one's inputs fail, it comes back
- null with the reason in `data_gaps`, never as a 0, and `computed_from`
- names the components the score was computed from
- (`zero_filled_components` flags any that are a 0 only because the
- military or ACLED fetch failed).
+ 2-degree window. An AOI has no curated baseline, so that component is 0
+ and the score tops out at 80; `score_ceiling` gives this call's ceiling,
+ lower when a component is missing or zero-filled. It also scores the two
+ components the built-ins leave null. News is the change in the area's
+ share of all GDELT coverage, the 7 days ending with GDELT's current
+ (still filling) daily step against the 7 before, for the reverse-geocoded
+ settlement and county at the AOI's centre (the same query the brief
+ uses), so a swing or outage in what GDELT ingests is not read as a news
+ surge; only a rise scores. Convergence runs the multi-domain convergence
+ grid, laid at four half-degree offsets so a compact cluster on a degree
+ line is not split, over the earthquakes, military flights, ACLED events
+ and wildfires inside the AOI's exact shape. A source that did not answer,
+ or answered only with an expired cached copy, counts as missing, never as
+ quiet, and a global sample that hit its cap counts as partial. If either
+ component's inputs fail, it comes back null with the reason in
+ `data_gaps`, never as a 0, and `computed_from` names the components the
+ score was computed from (`zero_filled_components` flags any that are a 0
+ only because the military or ACLED fetch failed, and
+ `lower_bound_components` any that partial data can only have
+ understated).
AOIs persist in a dedicated table inside the same SQLite cache database
-the server already uses (`~/.cache/world-intel-mcp/cache.db` by default,
-or `$WORLD_INTEL_CACHE_DB`), so a scheduled agent can watch any named
+the server already uses (`$WORLD_INTEL_CACHE_DB` when set, otherwise
+`$XDG_CACHE_HOME/world-intel-mcp/cache.db`, falling back to
+`~/.cache/world-intel-mcp/cache.db`), so a scheduled agent can watch any named
area across restarts with `intel_aoi_list` / `intel_aoi_delete` to manage
them.
diff --cc src/world_intel_mcp/sources/news.py
index 0f1615e,d5e22f8..6c0c5ca
--- a/src/world_intel_mcp/sources/news.py
+++ b/src/world_intel_mcp/sources/news.py
@@@ -6,7 -6,8 +6,9 @@@ search via the GDELT 2.0 Doc API. No AP
"""
import asyncio
+import functools
+ import hashlib
+ import json
import logging
import re
import string