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.

Liquidity: state the net liquidity method and list blocked sources

Phoenix Agent (mac-studio)9458a880b5ce
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 092ce59..629a2fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,12 +19,17 @@ responses say so. `limit=0` returns the full history.
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).
+ 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.
+ 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
@@ -45,10 +50,12 @@ responses say so. `limit=0` returns the full history.
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 (finra.org terms
-of use forbid robots and building a database from the site); BLS public API (keyless
-v1 answers, but api.bls.gov robots.txt disallows all paths and the terms page
-answers 403).
+(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.
## 0.11.0 - 2026-10-12
diff --git a/README.md b/README.md
index f380298..b88d20f 100644
--- a/README.md
+++ b/README.md
@@ -226,8 +226,8 @@ Keyless: FRED graph CSV and the ECB Data Portal. Every point carries its observa
| Tool | Description |
|------|-------------|
-| `intel_liquidity_board` | Latest reading and change vs the previous observation for the Fed balance sheet, TGA, overnight reverse repo, net liquidity, US M2, euro area M1/M2/M3 and Eurosystem total assets; sort by `biggest_move` or `newest` |
-| `intel_net_liquidity` | Weekly WALCL minus WDTGAL minus RRPONTSYD in USD billions (millions divided by 1,000), aligned on the WALCL Wednesday; each point names its components and the RRP date used; unaligned weeks are skipped and counted |
+| `intel_liquidity_board` | Latest reading and change vs the previous observation for the Fed balance sheet, TGA, overnight reverse repo, net liquidity, US M2, euro area M1/M2/M3 and Eurosystem total assets; sort by `biggest_move` or `newest`; a `blocked` list names the measures not covered (ICI fund flows and ETF net issuance, FINRA margin statistics, BLS) with the upstream status measured, and no proxy stands in for them |
+| `intel_net_liquidity` | Weekly WALCL minus WDTGAL minus RRPONTSYD in USD billions (millions divided by 1,000), aligned on the WALCL Wednesday; each point names its components and the RRP date used; unaligned weeks are skipped and counted; a `method` block states each term's observation basis, units, conversion and RRP alignment |
| `intel_money_supply` | US M2 (FRED M2SL) and euro area M1, M2, M3 (ECB BSI stocks, monthly flows, annual growth rates), reported separately and never summed; US M3 is reported as discontinued |
| `intel_fed_liquidity_series` | One FRED liquidity series (WALCL, WDTGAL, WTREGEN, RRPONTSYD, M2SL) with full history; blank source dates are counted, not read as zero |
| `intel_ecb_series` | ECB Data Portal series by SDMX key from BSI (monetary aggregates) or ILM (Eurosystem weekly financial statement), with units, scale and provisional flags from the response |
@@ -679,7 +679,7 @@ Everything else uses free, unauthenticated public APIs.
```bash
pip install -e ".[dev]"
-pytest # 1034 tests (1052 total, 18 live-network smoke tests deselected by default)
+pytest # 1037 tests (1055 total, 18 live-network smoke tests deselected by default)
pytest --cov=world_intel_mcp # with coverage
pytest tests/test_forex.py -v # single module
```
diff --git a/ROADMAP.md b/ROADMAP.md
index 236a42d..6a4cbfd 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -577,7 +577,7 @@ dashboard.
| 1 | Research guide over MCP | MCP resources (guide generated from the live registry and source health, measures glossary, "what this server will not do") and MCP prompts (worked research questions, each naming the tools it needs and the limit to respect). Server exposed no prompts or resources before | :red_circle: |
| 1 | Hostility timeline | Per country pair or country, daily counts of threat / sanction / force / criticism coverage plus tone; sortable by most covered, most hostile, biggest change | :red_circle: |
| 1 | Story breadth | News clusters carry a distinct-outlet count; a top-stories view ranks by how many outlets carry a story | :red_circle: |
-| 1 | Liquidity and flows | Fed balance sheet, Treasury General Account, reverse repo and net liquidity (FRED keyless CSV), money supply (US M2, euro area M1/M2/M3, never summed), ECB, ICI fund flows and ETF net issuance, FINRA margin statistics, BLS series; amounts kept separate from flows | :yellow_circle: Built, unreleased: 5 tools (`intel_liquidity_board`, `intel_net_liquidity`, `intel_money_supply`, `intel_fed_liquidity_series`, `intel_ecb_series`), 5 CLI commands, 2 collector sources. FRED graph CSV and ECB Data Portal live-verified 2026-10-17. The TGA term is WDTGAL (Wednesday level): WTREGEN is a week average. Blocked, measured 2026-10-17: ICI (money market fund assets, ETF net issuance) answers 403 Akamai "Access Denied" on every path, robots.txt included; FINRA margin statistics XLSX answers 200, but finra.org terms of use forbid robots and building a database from the site, and the page says data feeds are not available; BLS public API v1 answers 200 without a key, but api.bls.gov robots.txt is `Disallow: /` and the terms page on www.bls.gov answers 403 to this server's User-Agent, so it is not used |
+| 1 | Liquidity and flows | Fed balance sheet, Treasury General Account, reverse repo and net liquidity (FRED keyless CSV), money supply (US M2, euro area M1/M2/M3, never summed), ECB, ICI fund flows and ETF net issuance, FINRA margin statistics, BLS series; amounts kept separate from flows | :yellow_circle: Built, unreleased: 5 tools (`intel_liquidity_board`, `intel_net_liquidity`, `intel_money_supply`, `intel_fed_liquidity_series`, `intel_ecb_series`), 5 CLI commands, 2 collector sources. FRED graph CSV and ECB Data Portal live-verified 2026-10-17. The TGA term is WDTGAL (Wednesday level, USD millions): WTREGEN is a week average; the net liquidity `method` block states each term's units, conversion and how RRPONTSYD (daily, USD billions) is aligned to the Wednesday. Blocked, measured 2026-10-17, and listed in the board's `blocked` field; no proxy is substituted, so fund flows and ETF net issuance have no source: ICI (money market fund assets at /research/stats/mmf, ETF net issuance at /research/stats/etf) answers 403 Akamai "Access Denied" on every path, robots.txt included; FINRA margin statistics XLSX answers 200, but 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, and the page says data feeds are not available; BLS public API v1 answers 200 without a key (CPI-U, payrolls), but api.bls.gov robots.txt is `Disallow: /` and the terms page on www.bls.gov answers 403 to this server's User-Agent, so it is not used |
| 1 | Kalshi + cross-venue markets | Kalshi public market data next to Polymarket; same-event comparison with an explicit match confidence; settled markets scored against pre-settlement prices (Brier) | :red_circle: |
| 1 | News vs market reaction | Companies and countries named in story clusters mapped to tickers / country indices; same-day move against a benchmark | :red_circle: |
| 2 | Connections with timing offsets | Correlation between retained series over a shared sample, tested at leads and lags, with minimum sample size and false-discovery control; states that it does not prove causation | :red_circle: |
diff --git a/src/world_intel_mcp/cli.py b/src/world_intel_mcp/cli.py
index 056ef1f..7edf247 100644
--- a/src/world_intel_mcp/cli.py
+++ b/src/world_intel_mcp/cli.py
@@ -1647,6 +1647,11 @@ def liquidity_cmd(ctx: click.Context, sort: str) -> None:
console.print(
f"[red]Unavailable:[/red] {escape(str(u.get('indicator')))}: {escape(str(u.get('error')))}"
)
+ for b in data.get("blocked", []):
+ console.print(
+ f"[dim]Not covered: {escape(str(b.get('measure')))} ({escape(str(b.get('publisher')))}): "
+ f"{escape(str(b.get('measured')))}[/dim]"
+ )
_print_data_gaps(data)
diff --git a/src/world_intel_mcp/sources/liquidity.py b/src/world_intel_mcp/sources/liquidity.py
index 20ab858..962be75 100644
--- a/src/world_intel_mcp/sources/liquidity.py
+++ b/src/world_intel_mcp/sources/liquidity.py
@@ -17,14 +17,18 @@ outstanding, a flow (transactions within the period), a growth rate or an
index. A blank FRED cell is a missing observation, never a zero, and a
failed component is an error, never a zero term in the net liquidity sum.
-Blocked upstreams (measured 2026-10-17, see ROADMAP Phase 29): ICI money
-market fund assets and ETF net issuance answer 403 on every path,
-robots.txt included; FINRA margin statistics answer 200 but finra.org's
-terms of use forbid robots and building a database from the site.
+Blocked upstreams (measured 2026-10-17, see ROADMAP Phase 29 and
+``BLOCKED_SOURCES``): ICI money market fund assets and ETF net issuance
+answer 403 on every path, robots.txt included; FINRA margin statistics
+answer 200 but the finra.org Terms of Use (Restrictions d and e) forbid
+building a database from the site and robots; the BLS public API answers
+without a key but api.bls.gov/robots.txt disallows every path. No proxy is
+substituted for any of them.
"""
import asyncio
import calendar
+import copy
import csv
import io
import logging
@@ -149,6 +153,87 @@ TGA_CHOICE_NOTE = (
"The Treasury General Account term is WDTGAL (Wednesday level), not "
"WTREGEN (week average), so all three terms describe the same Wednesday."
)
+# Do not swap WDTGAL for WTREGEN: WTREGEN averages the week ending
+# Wednesday, while WALCL and WDTGAL are Wednesday levels, so the swap
+# would subtract a weekly average from a point-in-time balance sheet.
+TGA_WTREGEN_NOTE = (
+ "WTREGEN is not a drop-in replacement: subtracting a week average from "
+ "Wednesday-level total assets mixes two different measures. WTREGEN is "
+ "served on its own by intel_fed_liquidity_series."
+)
+NET_LIQUIDITY_METHOD: dict[str, Any] = {
+ "formula": NET_LIQUIDITY_FORMULA,
+ "components": {
+ "WALCL": {
+ "term": "Federal Reserve total assets",
+ "observed": "Wednesday level",
+ "units": "USD millions",
+ "conversion": "divided by 1,000 to USD billions",
+ },
+ "WDTGAL": {
+ "term": "Treasury General Account",
+ "observed": "Wednesday level",
+ "units": "USD millions",
+ "conversion": "divided by 1,000 to USD billions",
+ },
+ "RRPONTSYD": {
+ "term": "Fed overnight reverse repo",
+ "observed": "daily, business days",
+ "units": "USD billions",
+ "conversion": "none: already USD billions",
+ "alignment": (
+ "the value for the WALCL Wednesday; when that day is blank, the "
+ f"latest earlier day within {_NET_LIQUIDITY_RRP_LOOKBACK_DAYS} days, "
+ "reported per point as reverse_repo_observed_at; never a later day"
+ ),
+ },
+ },
+ "alignment": NET_LIQUIDITY_ALIGNMENT,
+ "tga_choice": f"{TGA_CHOICE_NOTE} {TGA_WTREGEN_NOTE}",
+}
+
+# Measures the Phase 29 brief named that this module does not serve, with
+# the status measured 2026-10-17. No proxy is substituted for any of them.
+BLOCKED_SOURCES: list[dict[str, str]] = [
+ {
+ "measure": "money market fund assets, weekly",
+ "publisher": "ICI",
+ "status": "blocked",
+ "measured": (
+ "2026-10-17: HTTP 403 (Akamai 'Access Denied') on "
+ "www.ici.org/research/stats/mmf and on /robots.txt"
+ ),
+ },
+ {
+ "measure": "ETF net issuance, monthly actuals and weekly estimates",
+ "publisher": "ICI",
+ "status": "blocked",
+ "measured": (
+ "2026-10-17: HTTP 403 (Akamai 'Access Denied') on "
+ "www.ici.org/research/stats/etf and on /robots.txt"
+ ),
+ },
+ {
+ "measure": "customer margin balances (debit and free credit), monthly",
+ "publisher": "FINRA",
+ "status": "blocked",
+ "measured": (
+ "2026-10-17: the margin-statistics XLSX answers 200, but the finra.org "
+ "Terms of Use (Restrictions d and e) forbid creating a database from the "
+ "site and using data mining, scraping or harvesting tools, robots included"
+ ),
+ },
+ {
+ "measure": "BLS series (for example CPI-U, nonfarm payrolls)",
+ "publisher": "BLS",
+ "status": "blocked",
+ "measured": (
+ "2026-10-17: public API v1 answers 200 without a key, but "
+ "api.bls.gov/robots.txt is 'Disallow: /' and the www.bls.gov terms page "
+ "answers 403 to this server's User-Agent"
+ ),
+ },
+]
# ECB Data Portal series used by the money-supply view and the board.
# Data types: 1 = outstanding amounts (stocks), 4 = transactions (flows),
@@ -465,6 +550,7 @@ async def fetch_net_liquidity(
"source": FRED_SOURCE,
"formula": NET_LIQUIDITY_FORMULA,
"alignment": NET_LIQUIDITY_ALIGNMENT,
+ "method": copy.deepcopy(NET_LIQUIDITY_METHOD),
"units": "USD billions",
"measure": "amount_outstanding",
"frequency": "weekly, as of Wednesday",
@@ -1021,11 +1107,17 @@ async def fetch_liquidity_board(fetcher: Fetcher, sort: str = "biggest_move") ->
"ECB payload carries release dates. FRED units come from the server's "
"series catalog; ECB units come from the response."
)
+ gaps.append(
+ "Not covered (see blocked): ICI money market fund assets and ETF net "
+ "issuance, FINRA margin statistics and BLS series; no proxy is "
+ "substituted for them."
+ )
out: dict[str, Any] = {
"sort": sort,
"count": len(rows),
"indicators": rows,
"unavailable": unavailable,
+ "blocked": copy.deepcopy(BLOCKED_SOURCES),
"net_liquidity_formula": NET_LIQUIDITY_FORMULA,
"note": NESTING_NOTE,
"sources": [FRED_SOURCE, ECB_SOURCE],
diff --git a/src/world_intel_mcp/tests/test_liquidity_surfaces.py b/src/world_intel_mcp/tests/test_liquidity_surfaces.py
index aa930ea..9652662 100644
--- a/src/world_intel_mcp/tests/test_liquidity_surfaces.py
+++ b/src/world_intel_mcp/tests/test_liquidity_surfaces.py
@@ -242,3 +242,17 @@ def test_cli_fed_liquidity_and_ecb_series_render(tmp_path, monkeypatch) -> None:
assert ecb_calls == [{"dataset": "BSI", "key": "M.U2.Y.V.M30.X.1.U2.2300.Z01.E", "limit": 1, "start": None}]
assert "Monetary aggregate M3, Stocks (amount_outstanding)" in out
assert "(growth_rate)" in out
+
+
+def test_cli_liquidity_board_lists_blocked_sources(tmp_path, monkeypatch) -> None:
+ payload = _payloads(tmp_path)["board"]
+ monkeypatch.setattr(cli.liquidity, "fetch_liquidity_board", _fake(payload))
+ out = _invoke("liquidity").output
+ lines = [line for line in out.splitlines() if line.startswith("Not covered:")]
+ assert len(lines) == len(liquidity.BLOCKED_SOURCES) == 4
+ assert "Not covered: money market fund assets, weekly (ICI): 2026-10-17: HTTP 403" in out
+ assert "(FINRA)" in out and "Restrictions d and e" in out
+ assert "(BLS)" in out and "Disallow: /" in out
+ # A board without the key (an older cached payload) prints no such lines.
+ payload.pop("blocked")
+ assert "Not covered:" not in _invoke("liquidity").output
diff --git a/src/world_intel_mcp/tests/test_sources_liquidity.py b/src/world_intel_mcp/tests/test_sources_liquidity.py
index ac0247c..9adc00d 100644
--- a/src/world_intel_mcp/tests/test_sources_liquidity.py
+++ b/src/world_intel_mcp/tests/test_sources_liquidity.py
@@ -497,3 +497,67 @@ async def test_requests_send_descriptive_user_agent(fetcher: Fetcher) -> None:
def test_fred_rate_floor_matches_robots_crawl_delay() -> None:
# Read at import time: the autouse fixture zeroes it for speed.
assert _FRED_FLOOR_AT_IMPORT == 1.0
+
+
+# ---------------------------------------------------------------------------
+# Method statement and blocked sources (lead rulings 2026-10-17)
+# ---------------------------------------------------------------------------
+
+
+async def test_net_liquidity_method_states_wednesday_levels_conversion_and_rrp_alignment(
+ fetcher: Fetcher, tmp_path: Path
+) -> None:
+ respx.get(_FRED_URL).mock(side_effect=_fred_router())
+ out = await liquidity.fetch_net_liquidity(fetcher, limit=1)
+ method = out["method"]
+ tga = method["components"]["WDTGAL"]
+ assert (tga["observed"], tga["units"]) == ("Wednesday level", "USD millions")
+ assert tga["conversion"] == "divided by 1,000 to USD billions"
+ assert method["components"]["WALCL"]["observed"] == "Wednesday level"
+ rrp = method["components"]["RRPONTSYD"]
+ assert (rrp["observed"], rrp["units"]) == ("daily, business days", "USD billions")
+ assert rrp["conversion"] == "none: already USD billions"
+ assert "never a later day" in rrp["alignment"] and "within 5 days" in rrp["alignment"]
+ # The statement matches the arithmetic: raw WDTGAL millions / 1,000 and
+ # the raw same-Wednesday RRP billions, unconverted.
+ point = out["points"][0]
+ raw_tga = dict(_rows(_FRED["WDTGAL"], "WDTGAL"))[date(2026, 10, 14)]
+ raw_rrp = dict(_rows(_FRED["RRPONTSYD"], "RRPONTSYD"))[date(2026, 10, 14)]
+ assert point["treasury_general_account"] == raw_tga / 1000
+ assert point["reverse_repo"] == raw_rrp
+ assert point["reverse_repo_observed_at"] == point["observed_at"] == "2026-10-14"
+ # Anyone tempted to "fix" the TGA term back to WTREGEN reads why not.
+ assert "WTREGEN" in method["tga_choice"] and "week average" in method["tga_choice"]
+ # The method travels with an error too, so a failed call still says what it would compute.
+ # A fresh cache, so the 503 is not hidden behind the first call's cached CSVs.
+ respx.get(_FRED_URL).mock(side_effect=_fred_router({"WDTGAL": httpx.Response(503)}))
+ failed = await liquidity.fetch_net_liquidity(
+ Fetcher(cache=Cache(db_path=tmp_path / "cold.db"), breaker=CircuitBreaker(), max_retries=0)
+ )
+ assert "error" in failed and failed["method"]["components"]["WDTGAL"]["units"] == "USD millions"
+
+
+async def test_board_names_blocked_sources_and_substitutes_no_proxy(fetcher: Fetcher) -> None:
+ _mock_all()
+ out = await liquidity.fetch_liquidity_board(fetcher)
+ blocked = {(b["publisher"], b["measure"]) for b in out["blocked"]}
+ assert blocked == {
+ ("ICI", "money market fund assets, weekly"),
+ ("ICI", "ETF net issuance, monthly actuals and weekly estimates"),
+ ("FINRA", "customer margin balances (debit and free credit), monthly"),
+ ("BLS", "BLS series (for example CPI-U, nonfarm payrolls)"),
+ }
+ assert all(b["status"] == "blocked" and b["measured"].startswith("2026-10-17: ") for b in out["blocked"])
+ by_publisher = {b["publisher"]: b["measured"] for b in out["blocked"]}
+ assert "403" in by_publisher["ICI"]
+ assert "Restrictions d and e" in by_publisher["FINRA"]
+ assert "Disallow: /" in by_publisher["BLS"]
+ # No indicator row stands in for a blocked measure.
+ labels = " ".join(f"{r['indicator']} {r['label']}" for r in out["indicators"]).lower()
+ assert not any(word in labels for word in ("fund", "etf", "margin", "cpi", "payroll"))
+ assert any("no proxy is substituted" in g for g in out["data_gaps"])
+ # The response holds a copy: mutating it leaves the module constant intact.
+ out["blocked"][0]["status"] = "mutated"
+ assert liquidity.BLOCKED_SOURCES[0]["status"] == "blocked"