DEV Community

Mohammed Arshad Ansari
Mohammed Arshad Ansari

Posted on Originally published at quantamentry.com

We gave our macro dataset an MCP server (and made every number show its source)

"Trust the data" is easy to say and hard to check. Two things we shipped to make it checkable
— by people, and by the agents they increasingly send to read the web for them.

1. Every number prints its source

We publish a daily 0–100 sovereign credibility score for 169 countries, composed of seven
dimensions, built entirely on free public data (World Bank, IMF, BIS, FRED, OECD, ILO, GDELT,
ECB). Each dimension on a country page now expands to show the source that produced the
reading, the as-of date of the underlying data, and the coverage tier behind it
.

Turkey's page, right now:

Credibility gap   40.0   IMF / national CPI          as of 2026-06-01   gold
Behind the curve  78.7   BIS policy rates + CPI      as of 2026-08-14   gold
Communication     54.5   Central-bank statements     as of 2026-08-26   gold
Geopolitical      44.5   GDELT                       as of 2026-08-26   gold
Growth            37.3   World Bank WDI / IMF WEO    as of 2026-08-26   gold
Liquidity         43.1   IMF BOP / BIS / FRED        as of 2026-08-26   gold
Governance        37.5   World Bank WGI              as of 2026-08-26   gold
Enter fullscreen mode Exit fullscreen mode

Note the first row. The credibility gap is dated almost three months back, because that is
genuinely the last monthly CPI print we hold for Turkey. Printing the as-of date is the whole
point: a number you cannot date is a number you cannot check. No client-side JS is involved —
it is a plain expandable block, so it works everywhere and loads instantly.

2. A public MCP server

The scores are now readable by agents directly, over the Model Context Protocol, at
https://www.quantamentry.com/api/mcp — JSON-RPC 2.0 over HTTP POST, read-only. GET the
same URL for a plain descriptor; POST to use it. Point an MCP-capable client at it and it
queries the data without scraping a single HTML page.

Three tools are free with no key — list_countries (rank, region, credibility band),
get_country (one country's composite score, band, regional rank, 7-day move and one-line
read) and get_latest_briefing — the same surface as the public pages, at 30 requests/min
per IP. An API key, sent as Authorization: Bearer qm_…, swaps in the full set at 60
requests/min per key:

Tool Returns
get_country_score current composite + all seven dimensions, with per-dimension provenance and recent deltas
list_rankings countries ranked by composite, optionally filtered by region
get_score_history 90-day daily composite history for one country
get_coverage per-source freshness and per-tier country counts
get_methodology current methodology version and what the score is (and isn't)
compare_countries 2–6 countries side by side across all seven dimensions

Implementation notes for anyone standing one up next to an existing web app:

  • It is a route in the same Next.js app, not a separate service. One POST handler doing initialize / tools/list / tools/call, tool schemas in one module, backed by the same API the pages read. Every tool serves only what the same caller could already open on the site — the free tools mirror the public pages, the keyed tools mirror a subscription — which is what makes the tiering defensible rather than a risk. An invalid or lapsed key degrades to the free tier instead of erroring.
  • Read-only by construction. No tool writes, so there is no consent model to design, no destructive-action confirmation, and the rate limits are the entire abuse surface.
  • Version the methodology, not just the API. Agents cache; get_methodology returning a version string is how a consumer detects that the formula moved under them. Ours is on v4 and the site carries a dated changelog.

3. The rest of the machine-readable surface

  • /llms.txt — the whole site summarised for models that ground on it.
  • /pricing.md — the pricing page as plain Markdown.
  • /api/product-catalog — the same tiers as JSON.

The last two are generated from one source of truth, so the JSON an agent reads cannot drift
from what a human sees on the page. That is a small thing that turns out to matter: a
machine-readable surface that disagrees with the human one is worse than not having it.

None of this is a roadmap item — the endpoints are live. Try it:
(POST) or start from

Full write-up:

How each dimension is built and sourced:

Top comments (0)