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.
Python ai-toolsai-watchanthropicclaudecybersecuritydashboardgeofencinggeopoliticalgeospatialintelligencemarketsmcpmigrationmilitarymodel-context-protocolnuclearosintreal-timespace-weatherthreat-intelligence
Merge fix/cache-isolation: baseline databases follow XDG_CACHE_HOME, open on first use; per-attempt fetch spacing
Phoenix Agent (mac-studio)494a50d54d22
diff --cc CHANGELOG.mdindex d58d2c1,c0f092d..14cd0d1--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -2,119 -2,16 +2,130 @@@## 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` or `index` 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 that day is blank (a holiday), the+ latest earlier business day within 5 days, and 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`. 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.+ Net liquidity therefore starts at 2003-02-12 with 523 earlier or unaligned+ weeks skipped and counted, the last of them 2013-09-18.+- `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.+- 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.+## 0.11.0 - 2026-10-12Cross-border migration (MCP tools, CLI, collector and a dashboarddiff --cc src/world_intel_mcp/server.pyindex 33eb879,c7a14ce..fee62bc--- a/src/world_intel_mcp/server.py+++ b/src/world_intel_mcp/server.py@@@ -85,10 -83,9 +85,10 @@@ logger = logging.getLogger("world-intelserver = Server("world-intel-mcp")# Shared infrastructure lives in runtime.py (Phase 26 split); the local- # aliases remain as the module's public face — external readers (and the+ # lazy aliases remain as the module's public face; external readers (and the# registry tests) reach the live cache and vector store as server.cache,# server._vector_store, etc.+from . import guide as _guide # noqa: E402from . import runtime as _runtime # noqa: E402from . import tools as _tools_pkg # noqa: E402