ClawQL
Cost Plus Drugs demo — one governed gateway for multi-LLM pharmacy reads, with patient approval and audit before any write.
Not medical advice · Mock orders only · Prescription stays with a clinician
What we built
Cost Plus already exposes a public, unauthenticated MCP for price and availability (their scope page stops at estimates). The valuable next step — and this demo — is safely letting agents stage consequential actions across Claude, ChatGPT, Grok, and the rest without giving any model unilateral write power or unrestricted PHI.
Uses their real read MCP
ClawQL federates Cost Plus Drugs’ public pricing MCP unchanged — search, estimates, pharmacy locator. We do not re-pitch a price connector they already shipped.
Governed mock writes
There is no public ordering API. A local mock refill tool parks behind digest-bound human approval so agents cannot place orders themselves.
BAA-aware multi-model routing
Patient fields are redacted before non-BAA providers. Public cash prices still flow; PHI does not leave the gateway without policy.
Token-efficient catalog access
Targeted drug search is ~950× smaller than dumping the full CPD catalog — the gateway prefers compact tools for price questions.
- ~949×
- smaller than full CPD catalog dump
- mandate
- before any mock refill write
- digest-bound
- NDC / qty / price locked at park
- hash chain
- execute → park → resume in audit
Each thing the demo does
Discover Cost Plus tools through one gateway
Action Agent connects to ClawQL HTTP MCP and runs search. One gateway ranks live CPD pricing ops plus the mock write surface — not a pile of point MCP servers.
Result15 federated operations indexed from CPD + mock write MCP
Read live cash prices (not medical advice)
Action execute routes mcp__cost_plus_drugs_pricing__search to https://mcp.costplusdrugs.com/. Example: atorvastatin 20mg cash pricing for a 30-count fill.
ResultLive lookup ok · ~4.5KB structured response · $5.41 cash (fixture/live demo)
Prefer compact tools over full-catalog dumps
Action pricelist_all / pricelist_cpd return multi-megabyte payloads. ClawQL steers agents to search / pricelist_*_search for the same answer.
Result~3.9KB targeted search vs ~3.7MB full CPD catalog (~949×)
Redact PHI before non-BAA models
Action Before any multi-model hop, BAA routing keeps patient fields on BAA-covered providers and strips them for others. Public cash prices still flow.
ResultGrok path: patient_name / address / rx_number redacted · Claude-BAA retains fields
Stage a refill — agent cannot self-approve
Action place_refill_order is policy: mandate. The gateway parks the exact drug, NDC, quantity, and quoted price under a digest-bound execution id.
Resultstatus: mandate_required · agent self-approve → agent_cannot_approve
Human resumes the exact parked order
Action Only a human (patient/operator) may clawql resume / MCP resume. Args cannot be swapped at approval time. Labeled MOCK — never sent to Cost Plus.
Resultaccepted_mock · bound NDC 00904-6291-61 · qty 30 · $5.41
Everything lands in the audit trail
Action Price reads, mandate park, and resume finalize append to the MCP audit ring (and can dual-write durable WORM in production).
ResultHash-chained audit entries for execute + resume (seq 1→N)
Gateway smoke on camera
Final frame also available as a still: summary screenshot.
What this demo will not do
- No clinical, dosing, or substitution advice
- No claim that a real Cost Plus order was placed
- No real patient data — synthetic fields only until BAAs and HIPAA safeguards exist
- No “HIPAA certified” marketing (HIPAA is about safeguards + BAAs, not a product badge)
Reproduce locally
cd docs/examples/cost-plus-drugs-governance ./scripts/smoke.sh # Live ClawQL HTTP gateway + CPD MCP + mock write node scripts/gateway-smoke.mjs
Source: docs/examples/cost-plus-drugs-governance · Upstream MCP: https://mcp.costplusdrugs.com/ · Healthcare industry context: /industries/healthcare