
molecule
com.moleculelineage/molecule
US drug records from FDA, CMS, VA and NLM files, cited to file and row, with signed receipts.
Documentation
Molecule Lineage
Molecule Lineage (https://moleculelineage.com) publishes deterministic US drug records built from FDA, CMS, VA, and NLM files. Every figure on the site is cited to the exact federal file and row it came from (source@edition/file:row), and every programmatic answer carries a signed, reproducible receipt.
This repository is the public companion to the hosted service: the open-source MCP client package, the public JSON schemas for the site data files, sample files, and registry manifests. The data engine that builds each release is not part of this repository.
Website · Screener · Part B J-Codes · PBM Claims Benchmark · Weekly Changes · MCP Server · Signed Receipts · Public Schemas · Sample Files
Highlights
83,000+cited drug, package, and labeler pages — moleculelineage.com joins the FDA Orange Book, Purple Book, NDC Directory and NSDE, REMS, openFDA drug shortages, weekly CMS NADAC (850,000+dated intervals),12quarters of CMS Part B ASP payment limits and NDC–HCPCS crosswalks (1,150+J-code rates, e.g./drug/pembrolizumab/→J9271), Medicaid State Drug Utilization Data,$281.95Bof Medicare Part D spending, and CMS Medicare drug price negotiation selections. Every number is cited tosource@edition/file:row.- Zero-PHI in-browser PBM claims benchmark —
/audit/reads native.xlsx,.csv,.tsv, and pipe-delimited claims extracts entirely in browser memory; nothing is uploaded and the page carries no telemetry. It benchmarks46,500+NDCs, appliesDAW 1/7/8/9and active FDA shortage controls, adds a same-NDC Mail/Specialty vs. Retail unit-rate comparison, runs a25%/40%/55%brand rebate stress test, and produces a paginated committee PDF (the sample runs to 5 pages). - Interactive screener and weekly change feed —
/screener/filters the full catalog with shareable presets such as?preset=partb-jcodeand?preset=shortage-matched./changes/lists each release's differences (NADAC, Part B, Patent, Paragraph IV, Shortage filters) with#watch=shareable watchlists and an RSS 2.0 feed. - Stateless Streamable HTTP MCP server —
https://moleculelineage.com/api/mcpexposes6read-only tools, each answer signed with a deterministicmlin_rcpt_v1receipt. An optional zero-dependency Python stdio bridge lives inpackages/molecule-mcp.
Scope of the claims benchmark
/audit/ is acquisition-cost and formulation triage grounded in published CMS and FDA files. It is not a Medi-Span AWP contract guarantee audit. CMS NADAC is a pharmacy acquisition cost survey, as published by CMS; it is not a patient or plan price. Treat each flag as a question to take to the plan's PBM contract and claims data, not as a finding of overpayment.
MCP Server
| Property | Value |
|---|---|
| Endpoint | https://moleculelineage.com/api/mcp |
| Transport | Streamable HTTP (POST, JSON-RPC 2.0; stateless, no session) |
| Discovery | GET https://moleculelineage.com/api/mcp returns discovery JSON |
| Server card | /api/mcp/server-card |
| Authentication | None for find_drug, resolve_ndc, verify_receipt; optional Authorization: Bearer mlin_lic_v1... for commercial tools |
| Protocol versions | 2025-11-25, 2025-06-18, 2025-03-26 |
| Server info | com.moleculelineage/molecule (Molecule Lineage, v0.1.1) |
| Registry manifest | server.json · smithery.yaml |
| Rate limit (keyless) | 30 requests/minute per IP |
| Receipts | Deterministic mlin_rcpt_v1.<digest>.<signature> on every response |
| Tool guide | /agent-onboarding/SKILL.md · Console playground |
All six tools are read-only, idempotent, and non-destructive (readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false).
Client setup
Project .mcp.json (mcpServers, HTTP transport):
{
"mcpServers": {
"molecule": {
"type": "http",
"url": "https://moleculelineage.com/api/mcp"
}
}
}
Workspace servers JSON:
{
"servers": {
"molecule": {
"type": "http",
"url": "https://moleculelineage.com/api/mcp"
}
}
}
TOML (config.toml):
[mcp_servers.molecule]
url = "https://moleculelineage.com/api/mcp"
Stdio-only clients can launch molecule-mcp (packages/molecule-mcp, Python >=3.12) with uv:
{
"mcpServers": {
"molecule": {
"command": "uvx",
"args": ["molecule-mcp"]
}
}
}
Direct curl check (keyless):
curl -fsS https://moleculelineage.com/api/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"resolve_ndc","arguments":{"ndc":"00003-0894-21"}}}'
For commercial access, attach Authorization: Bearer mlin_lic_v1... to each POST (or set MOLECULE_API_KEY for the stdio bridge).
Tool reference
| Tool | Access | Description |
|---|---|---|
find_drug(query, limit?) | Keyless (5,000-NDC starter subset; full catalog with key) | Search FDA ingredient and label (brand) names; returns matching federal ingredient names with file-and-row citations. |
resolve_ndc(ndc) | Keyless (5,000-NDC starter subset; full catalog with key) | Resolve a US package NDC (hyphenated 10-digit or 11-digit, always a string) to its FDA NDC Directory listing, application number, and citations. |
get_price_benchmark(ndc) | Commercial | CMS retail NADAC per-unit benchmark for an NDC in the edition served, with citations. A pharmacy acquisition cost survey, not a patient price. |
get_equivalents(ndc) | Commercial | FDA Orange Book A-rated therapeutic equivalence entries for the product behind an NDC, with TE codes and citations. |
diagnose_ndc_cohort(ndcs, profile?) | Commercial | Question fit and benchmark availability for up to 12 de-identified NDCs (NADAC match, VA FSS only, active FDA shortage, ambiguous 10-digit NDC). |
verify_receipt(receipt, payload?) | Keyless | Check the signature on a mlin_rcpt_v1 receipt and, with payload, confirm its canonical SHA-256 digest. |
Pass NDCs as strings to keep leading zeros. An unhyphenated 10-digit NDC can map to more than one 11-digit form (ambiguous_ndc10: true); supply the hyphenated package code instead of guessing. A keyless zero-hit answer carries index_scope: "starter_subset_5000_ndc" so a subset miss is never read as a nonexistent drug. FDA Purple Book biologic rows are view-only on web pages and are excluded from /api/mcp and bulk exports.
Signed Receipts (mlin_rcpt_v1)
Every /api/mcp response carries a mlin_rcpt_v1.<digest>.<signature> receipt. The digest covers receipt_meta (tool, arguments, release_id), the answer body, and any commitment_hmac inside the JSON; receipt and the top-level issued_at stay outside it. Identical calls against the same release return byte-identical receipts, so an answer quoted in a report can be checked later.
-
Keyless server check — call
verify_receiptwith the receipt and the full JSON response aspayload. The server confirms both the canonical digest and its HMAC signature. -
Local digest check (CLI) — with the bridge installed (
uv tool install "git+https://github.com/writtenonwater99/molecule-lineage-public#subdirectory=packages/molecule-mcp"):molecule-mcp verify-receipt "mlin_rcpt_v1.<digest>.<signature>" --payload response.json -
Local digest check (Python):
from molecule_mcp import verify_receipt outcome = verify_receipt(response["receipt"], response) assert outcome["digest_verified"] is True
The local checks confirm that the payload matches the digest; the signature itself is checked by the server's keyless verify_receipt tool or the Console receipt checker.
Repository contents
| Path | Contents |
|---|---|
packages/molecule-mcp | Apache-2.0 Python package: zero-dependency stdio-to-HTTPS bridge, receipt verifier, and air-gapped snapshot reader. |
schemas/ | JSON Schemas for the public site data files (site.json, names.json, screener.json, ingredient, family, chart, package, and audit sample files). |
samples/ | 30-row de-identified sample claims CSV and the matching sample committee PDF from /audit/. |
assets/ | 1200x630 social cards for the site, /audit/, /screener/, and /console/. |
server.json · smithery.yaml | MCP registry manifests for com.moleculelineage/molecule. |
Developing the package
cd packages/molecule-mcp
uv run --with pytest pytest -q # 31 tests, Python 3.12+
uv build
Reporting a discrepancy
If a figure, match, or label disagrees with the upstream federal file, report it by email to corrections@moleculelineage.com or by opening a GitHub Issue in this repository. Please include:
- the page URL or MCP tool call,
- the identifier involved: NDC-11, HCPCS J-code, or application number,
- the federal source edition and the printed row locator (
source@edition/file:row), - the value you expected and where the upstream file shows it.
Reviewed identity overrides and data fixes are published on Corrections. Please do not include patient or member information in a report.
License
The code in this repository is licensed under Apache-2.0. Federal source data keeps its own terms; see Data and service terms and Sources.
molecule-mcppip install molecule-mcp