Global Pharma Atlas

An open-source full stack for cross-country drug-price intelligence — pricing data pipeline, DuckDB warehouse, MCP + Flask APIs, React dashboard, policy graph, and a research agent.

Global Pharma Atlas is an open-source full stack for cross-country drug-price intelligence: a pharmaceutical pricing data pipeline, an interactive visualization dashboard, a policy stakeholder graph, and a policy-research agent — all in one monorepo. It scrapes publicly available government drug-price data from a dozen countries, resolves it into a unified DuckDB warehouse, and serves it through an MCP server, a Flask API, and a React dashboard.

Live demo: lamarwang.com/pharma-atlas — interactive dashboard served from the cloud, with data queried live from the local warehouse (access-protected; credentials on request).

Modules

Module What it does
bot001 Per-country scrapers + raw→washed CSV ETL (CMS, NHI, AIFA, KR-HIRA, …).
bot002 Entity resolution + DuckDB warehouse builder — a 9-tool MCP server running sync → resolve → price → merge → parity-check over a 14-table schema.
bot003 The read-only query + visualization core: a 19-tool MCP server, a 39-endpoint Flask API, and the analytics/chart libraries the dashboard talks to.
bot050 Policy stakeholder-graph service (FastAPI + DuckDB).
bot100 Policy-research agent — a chat/tool server with multi-provider LLM routing and a read-only bridge to the bot050 graph.
web React 19 + TypeScript + Vite single-page app that ties the stack together in the browser.

The pipeline

bot001 (scrape + wash) → bot002 (resolve + build) → DuckDB warehouse → bot003 (read-only query + viz)

The bot003 core is a pure read-only service — every warehouse connection is opened read_only=True, with no LLM or agent loop; those capabilities live in the adjacent bot100 service. The canonical warehouse holds tens of millions of pricing rows across ~5,690 unique drugs, sourced from public government portals (U.S. CMS Medicare ASP / Medicaid NADAC, Taiwan & Korea NHI / KR-HIRA, Italy’s AIFA, and national portals for CN, DE, FR, UK, JP, AU). The ~100 GB data lake is not distributed with the repo — you rebuild it from the public sources yourself, and are responsible for each source’s Terms of Service.

Stack: Python · DuckDB · Flask · FastAPI · MCP · React 19 · TypeScript · Vite

License: AGPL-3.0-or-later · provided for research and educational use only.

Repository: wcboy/global-pharma-atlas