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/cyclone-forecasts: opt-in NHC and JTWC forecast tracks and cone

Phoenix Agent (mac-studio)3c57af419050
diff --cc CHANGELOG.md
index 0a69319,19b3aad..5e95ada
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -2,137 -2,59 +2,190 @@@
## Unreleased
+### Fixed: development runs no longer touch user databases
+- Temporal and keyword spike databases now follow `XDG_CACHE_HOME` like
+ the cache: `$XDG_CACHE_HOME/world-intel-mcp/temporal.db` and
+ `$XDG_CACHE_HOME/world-intel-mcp/keyword_spikes.db`. With it unset, they
+ remain in `~/.cache/world-intel-mcp/`. Users who set `XDG_CACHE_HOME`
+ can keep existing baselines by moving these two files from
+ `~/.cache/world-intel-mcp/` to `$XDG_CACHE_HOME/world-intel-mcp/`.
+ Importing the package no longer opens databases; they open on first use.
+- Apply per-source request spacing to every HTTP retry, including JSON,
+ text, XML and binary fetches.
+
+### Added: liquidity and money (Phase 29)
+Keyless sources only: the FRED graph CSV (`fred.stlouisfed.org/graph/fredgraph.csv`,
+allowed by robots.txt with `Crawl-delay: 1`, honored by a 1 s `fred-graph` rate
+floor) and the ECB Data Portal (SDMX-JSON). Every point carries `observed_at`,
+`value` and `units`; every series is typed `amount_outstanding`, `flow`,
+`growth_rate`, `index` or `unknown` and carries a freshness block that flags data older than
+its publication cadence allows (a served stale cache copy or an outage shows up
+there). `published_at` is null: neither payload carries release dates, and the
+responses say so. `limit=0` returns the full history.
+- `intel_net_liquidity`: weekly Fed total assets (WALCL) minus Treasury General
+ Account (WDTGAL) minus overnight reverse repo (RRPONTSYD), in USD billions.
+ WALCL and WDTGAL are USD millions and are divided by 1,000; RRPONTSYD is already
+ USD billions. One point per WALCL Wednesday; the TGA must be reported for that
+ Wednesday; RRP comes from that day or, when blank on or after 2013-09-23,
+ Tuesday only. Before that date a blank Wednesday has no fallback. Each point
+ names the RRP date used. Weeks without aligned components are skipped and counted, never filled
+ with zero, and a failed component makes the whole response an error. The TGA
+ term is the Wednesday level (WDTGAL), not the week average (WTREGEN). A
+ `method` block, returned with errors too, states each term's observation basis
+ (WALCL and WDTGAL Wednesday levels in USD millions, RRPONTSYD daily in USD
+ billions), its conversion, the RRP alignment and why WTREGEN is not used.
+- `intel_liquidity_board`: latest reading and change vs the previous observation
+ for the Fed balance sheet, TGA, RRP, net liquidity, US M2, euro area M1/M2/M3
+ stocks and Eurosystem total assets, sortable by `biggest_move` or `newest`.
+ `biggest_move` ranks absolute changes in billions of each row currency, with
+ no FX conversion; observation horizons differ. Percentage changes do not
+ affect ranking. A
+ failed source becomes an `unavailable` row; net liquidity is dropped, not
+ computed with a zero term, when any of its components fails. A `blocked` list
+ names each measure not covered with its publisher and the status measured on
+ 2026-10-17.
+- `intel_money_supply`: US M2 (FRED M2SL) and euro area M1, M2 and M3 from the ECB
+ BSI dataset (end-of-month stocks, monthly flows, annual growth rates), kept
+ separate and never summed. US M3 is reported as discontinued (FRED M3SL ends at
+ 2006-02-01).
+- `intel_fed_liquidity_series`: WALCL, WDTGAL, WTREGEN, RRPONTSYD or M2SL with full
+ history; blank source dates (2,833 for RRPONTSYD on 2026-10-17, 2,679 of them
+ before 2013-09-23, when daily values begin) are counted, not read as zero.
+- `intel_ecb_series`: any ECB BSI or ILM series by SDMX key, with units, scale,
+ titles and provisional flags taken from the response. A growth rate's change is
+ reported in points, not as a percent of a percent.
+- Stale cache responses carry `served_from_stale_cache` and `cache_age_seconds`,
+ and name the upstream failure in `data_gaps`. Only parsed bodies enter the cache.
+ ECB 404 and empty responses are final no-data answers, without outage retries.
+ Missing ECB roles and board rows are named; index bases, provisional status
+ and percentage-point change units are retained. ECB keys must specify every
+ dimension and request at most 50 series combinations.
+- CLI: `intel liquidity`, `intel net-liquidity`, `intel money-supply`,
+ `intel fed-liquidity`, `intel ecb-series`. Collector: `liquidity_board` and
+ `net_liquidity` (group `liquidity`).
+- Live reading 2026-10-17: net liquidity for Wednesday 2026-10-14 was
+ USD 5,869.615 billion (WALCL 6,755,639 million, WDTGAL 885,823 million,
+ RRPONTSYD 0.201 billion, all observed 2026-10-14).
+
+Not added, measured 2026-10-17: ICI money market fund assets and ETF net issuance
+(403 on every path, robots.txt included); FINRA margin statistics (the finra.org
+Terms of Use, Restrictions d and e, forbid building a database from the site and
+data mining, scraping or harvesting tools, robots included); BLS public API (keyless
+v1 answers for CPI-U and payrolls, but api.bls.gov robots.txt disallows all paths
+and the terms page answers 403). Fund flows and ETF net issuance therefore have no
+source here, and no proxy is substituted for any of these measures.
+### Added: news vs market reaction
+- `intel_news_market_reaction` (CLI: `intel news-reaction`): the companies and
+ countries named in recent story clusters, mapped to a listing (the entity
+ table's ticker, confirmed against SEC's company_tickers.json for US
+ listings) or to the country's primary index (the table `intel_country_stocks`
+ uses), with the move on the story's market session from Yahoo daily bars.
+ Company rows give the stock's close-to-close return (adjusted closes), the
+ benchmark's return over the same two dates (SPY for US listings, the
+ exchange country's index otherwise) and the excess return; country rows
+ give the index return and a z-score against its previous up-to-20 sessions.
+- Session rule, stated in every response: the story time (earliest
+ `published` in the cluster) is converted to the exchange's timezone; before
+ the regular close on a trading day it is that session, at or after the close
+ the next one, and a weekend or holiday (read from the listing's own bars)
+ maps to the next trading day. A session that has not closed is `pending`.
+- Honest gaps: a failed quote, a missing benchmark bar, a stock series missing
+ a day its benchmark traded, a story timestamp later than the collection time
+ and a story older than the bar range are each a `data_gap` row with the
+ reason and no number, never a 0% move. Unmapped names (private companies,
+ countries without an index) are listed, not dropped. Company names that are
+ also common words (apple, amazon, meta, shell, bp, alphabet, chevron,
+ samsung) are excluded with a stated reason unless the headlines carry a
+ corroborating term or an article comes from a feed category where the
+ company sense dominates (a hyphen-joined use such as "meta-analysis" does
+ not count). Responses say they describe same-session co-movement, not
+ causation, and are not a trading signal. Tools 139 -> 140.
+### Added: research guide over MCP (prompts and resources)
+- The server now answers `resources/list`, `resources/read`, `prompts/list`
+ and `prompts/get`, and advertises the resources and prompts capabilities
+ at initialize. Before this it exposed tools only. No tools were added or
+ changed.
+- `intel://guide` (markdown): how to ask a strong question (period,
+ comparison, measure, place), what an answer contains, what this server
+ will not do, the worked prompts, and every registered tool grouped by
+ domain module. Built from the live registry on every read; a test fails
+ if a registered tool is missing or listed twice.
+- `intel://guide/source-health` (JSON): open circuit breakers, stale
+ serves, stale cache prefixes, cache freshness, and which keyed sources
+ have their variables set (names only, never values). Reads in-process
+ state and the cache database only; reading it starts no fetch. It says
+ that breaker state covers this server process only. The keyed-source
+ list is checked against the credentials `sources/*.py` actually read.
+- `intel://guide/measures` (markdown): stock versus flow, growth versus
+ acceleration, percentage points, seasonal adjustment, the three dates
+ (observation, publication, collection), revisions, correlation and
+ timing offsets, composite scores, missing data versus zero.
+- 29 prompts across conflict, markets, hazards, migration, aviation, cyber,
+ infrastructure, maritime, areas of interest, news, politics, sanctions,
+ health, stored history and country views. Each names the tools to call
+ and the limits to respect; arguments (country, topic, period and so on)
+ are validated, and a missing, unknown or invalid one is an
+ `invalid params` error. A test fails if any prompt names a tool that is
+ not registered.
+- `intel guide` prints the guide markdown; `intel guide --measures` prints
+ the glossary.
+- A test spawns the installed `world-intel-mcp` console script and drives
+ initialize, resources/list, resources/read, prompts/list, prompts/get
+ and tools/list over stdio.
+
+ ### Added: tropical cyclone forecast tracks
+ - `intel_cyclones` and `intel_jtwc_cyclones` take `include_forecast`
+ (boolean, default false). With it, each storm gains a `forecast`: the
+ `initial` fix and forecast `points` (forecast hour, UTC valid time,
+ latitude and longitude, max wind and gust in knots, status such as
+ POST-TROP/REMNT LOW or DISSIPATED, and the agency's section label),
+ `track_status`, and the advisory or warning number and issue time.
+ Without it, both responses and the collector's NHC call are unchanged.
+ - NHC points come from the forecast/advisory text that CurrentStorms.json
+ links: the one NHC product that states UTC valid times and post-tropical
+ status outright (the KMZ track gives local times, and the shapefile
+ labels a post-tropical remnant low "Subtropical Depression"). The cone
+ comes from the linked CONE.kmz: its one ring, simplified
+ (Douglas-Peucker, 0.01 degrees; Hurricane Trudy advisory 17 went from
+ 1,167 vertices to 56) to `[lat, lon]` vertices, with the source vertex
+ count, the tolerance, and a note pointing at the official geometry
+ (`cone_url`).
+ - JTWC points come from each storm's linked warning text (its forecast,
+ extended outlook and long range outlook blocks). JTWC links no cone:
+ `cone_status` is `not_published`, and `data_gaps` says so.
+
+ ### Data honesty: forecast tracks
+ - `data_gaps` names every track or cone not delivered, per storm, with a
+ status: `fetch_failed`, `unparsed`, `refused_link`, `not_linked`,
+ `not_published` or `not_fetched_cap` (at most 10 storms per call; the rest are named,
+ never dropped). A failure marks the response `degraded`; a product the
+ agency does not link is a gap, not degradation. A quiet basin still
+ answers zero storms, not degraded, and makes no product fetches; a feed
+ outage keeps its existing degraded shape and makes none either.
+ - The text pages are per storm bin, not per issuance, so one can lag the
+ feed: an advisory or warning number that disagrees with the feed is
+ returned as `stale_advisory` or `stale_warning` with the expected
+ number, and its cached copy is dropped.
+ - Each product is fetched once per issuance (cache keys carry the
+ advisory or warning number; one-hour TTL) under its own circuit breaker
+ (`nhc-forecast`, `nhc-gis`, `jtwc-warning`), so a product outage does
+ not trip the warning feeds' breakers.
+ - Remote KML is parsed with the standard library: strict UTF-8, any
+ DOCTYPE refused, size caps (KMZ 2 MB, KML 8 MB), and a cone with more
+ than one ring refused, never trimmed. A ring of more than 10,000
+ vertices is refused before simplifying, and simplifying runs off the
+ event loop.
+ - Product links come from the agencies' feeds and are fetched only when
+ they are https on the agency's own host (www.nhc.noaa.gov,
+ www.metoc.navy.mil). Any other link is reported as `refused_link` and
+ never requested.
+ - Measured 2026-10-17: every product used answered HTTP 200 without a
+ key; nhc.noaa.gov robots.txt disallows nothing and the NWS disclaimer
+ puts the products in the public domain. The JTWC home page and
+ robots.txt answered 403 (CloudFront "Request blocked"), so JTWC's site
+ terms could not be read; its RSS and warning texts served 200 to the
+ same client. Wind radii and seas are not parsed.
+
## 0.11.0 - 2026-10-12
Cross-border migration (MCP tools, CLI, collector and a dashboard
diff --cc README.md
index 147243f,15cde53..9d05e39
--- a/README.md
+++ b/README.md
@@@ -63,10 -61,10 +63,10 @@@ Built for AI agents that need world awa
| **Severe Weather** | 2 | NWS active CAP alerts (US), Meteoalarm (39 EU countries) |
| **Space Launches** | 1 | Launch Library 2 upcoming launches |
| **Volcanoes** | 1 | Smithsonian GVP weekly activity report |
- | **Tropical Cyclones** | 2 | NHC (Atlantic, E/C Pacific) + JTWC (NW Pacific, N Indian, S Hemisphere) |
+ | **Tropical Cyclones** | 2 | NHC (Atlantic, E/C Pacific) + JTWC (NW Pacific, N Indian, S Hemisphere), with opt-in forecast tracks: positions, UTC valid times and intensities, plus NHC's cone of uncertainty |
| **Situation Brief** | 1 | Cited situational awareness brief over MCP: bounded server-side overview synthesized via local Ollama, with a mechanically-cited fallback |
-**Total: 139 tools** across 30+ intelligence domains.
+**Total: 145 tools** across 30+ intelligence domains.
---