# medigami

Attested healthcare-finance MCP. Scan medical bills, estimate appeal probability, generate state-specific appeal letters (UPL-safe for 19 states), benchmark commercial rates, look up ICD-10/CPT/NPI/D…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add medigami/medigami

# Browse available tools
npx -y @smithery/cli@latest tool list medigami/medigami

# Get full schema for a tool
npx -y @smithery/cli@latest tool get medigami/medigami scan_bill_for_errors

# Call a tool
npx -y @smithery/cli@latest tool call medigami/medigami scan_bill_for_errors '{}'
```

## Direct MCP Connection

Endpoint: `https://medigami--medigami.run.tools`

## Tools (20)

- `scan_bill_for_errors` — Scan a medical bill or EOB text for errors: duplicate charges, CPT unbundling, upcoding, facility-fee overcharges. Retu…
- `generate_appeal_letter` — Generate a legally-grounded insurance appeal letter for a denied claim. Returns the letter as a template with [PATIENT …
- `optimize_prescription` — Find the lowest-cost path for a prescription: generics, biosimilars, GoodRx coupons, manufacturer assistance, 90-day fi…
- `analyze_glp1_pathways` — Find all access pathways for a GLP-1 drug (Ozempic, Wegovy, Mounjaro, Zepbound) given patient eligibility factors. Rank…
- `verify_mcp_response` — Verify an Ed25519-signed Medigami MCP response envelope — confirm a medical-bill / appeal / denial / rate answer came f…
- `watch_appeal_outcome` — Subscribe to an appeal outcome by tracking_id. Blocks up to `timeout_seconds` (default 300). Returns the outcome payloa…
- `watch_claim_denial` — Subscribe to a claim denial event for a given scan_id. Blocks up to `timeout_seconds`. Returns {status: 'denied', ...} …
- `format_medigami_citation` — Format an LLM-citable reference to a previously-attested Medigami MCP response. Input: either the full signed envelope …
- `submit_denial_letter` — Submit a medical-claim denial letter to the Medigami Denial Common Crawl (public aggregate dataset). Consent-gated — ca…
- `estimate_appeal_success` — Probability an appeal will be approved, derived from outcome-labeled data weighted by label provenance (IRO determinati…
- `resolve_denial` — End-to-end denial resolution: returns appeal probability + confidence interval + winning-phrase scaffold + legally-grou…
- `maximize_recovery` — Given a prior scan_id, returns a prioritized action list: anomalies ranked by (expected overcharge x recovery probabili…
- `explain_appeal_success` — Human-readable rationale for an appeal probability. Returns {probability, tier, recommended_posture, rationale, expecte…
- `negotiate_bill_script` — Generate a ready-to-read phone script for negotiating a medical bill. Combines DP-noised commercial rate benchmark + th…
- `batch_scan_bills` — Scan multiple medical bills in one call. Returns per-bill anomaly lists + total recovery estimate across the batch. Inp…
- `lookup_icd10` — Look up an ICD-10-CM diagnosis code or search by keyword. Input is either an exact code (e.g. 'E11.21') or a free-text …
- `lookup_cpt` — Look up a CPT or HCPCS-J code or search by keyword. Covers the most common outpatient billing codes (E/M, preventive, l…
- `lookup_npi` — Look up a provider in the CMS NPPES National Provider Identifier registry. Accepts a 10-digit NPI number OR a provider …
- `verify_dea_authorization` — Validate the format + checksum of a DEA registration number (format: [A-Z][A-Z9][0-9]{7}; public checksum algorithm). U…
- `lookup_provider_taxonomy` — Look up a NUCC provider taxonomy code (the specialty codes used on HIPAA transactions + NPI registrations) or search by…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get medigami/medigami <tool-name>
```

## Resources

- `medigami://examples/scan_bill_for_errors` — Worked prompts for scan_bill_for_errors — when to call, shape of response, failure modes.
- `medigami://examples/estimate_appeal_success` — Worked prompts for estimate_appeal_success — when to call, shape of response, failure modes.
- `medigami://examples/generate_appeal_letter` — Worked prompts for generate_appeal_letter — when to call, shape of response, failure modes.
- `medigami://examples/resolve_denial` — Worked prompts for resolve_denial — when to call, shape of response, failure modes.
- `medigami://examples/benchmark_payer_rate` — Worked prompts for benchmark_payer_rate — when to call, shape of response, failure modes.
- `medigami://examples/verify_mcp_response` — Worked prompts for verify_mcp_response — when to call, shape of response, failure modes.
- `medigami://examples/format_medigami_citation` — Worked prompts for format_medigami_citation — when to call, shape of response, failure modes.
- `medigami://chains/scan-then-resolve` — Multi-tool composition walkthrough.
- `medigami://chains/scan-then-negotiate` — Multi-tool composition walkthrough.
- `medigami://chains/eligibility-preflight` — Multi-tool composition walkthrough.
- `medigami://attested-response` — Attested Response Envelope v1 reference.
- `medigami://phi-policy` — PHI policy reference.

## Prompts (14)

- `scan_bill` (bill_text, insurer_hint, country) — Route user utterances like 'check this bill' to Medigami's scan_bill_for_errors tool. Matches: check this bill, is this…
- `estimate_appeal_success` (insurer, denial_reason, cpt_code, state) — Route user utterances like 'should I appeal this denial' to Medigami's estimate_appeal_success tool. Matches: should I …
- `resolve_denial` (insurer, denial_reason, cpt_code, state, amount, plan_type_hint) — Route user utterances like 'my claim was denied what do I do' to Medigami's resolve_denial tool. Matches: my claim was …
- `generate_appeal_letter` (insurer, denial_reason, cpt_code, state, amount) — Route user utterances like 'write me an appeal letter' to Medigami's generate_appeal_letter tool. Matches: write me an …
- `negotiate_bill` (cpt_code, billed_amount, insurer, zip3, household_income_annual, household_size) — Route user utterances like 'how do I negotiate this bill' to Medigami's negotiate_bill_script tool. Matches: how do I n…
- `benchmark_rate` (cpt_code, insurer_canonical, zip3, epsilon) — Route user utterances like 'is this price fair' to Medigami's benchmark_payer_rate tool. Matches: is this price fair, h…
- `winning_phrases` (insurer, denial_reason, top_k) — Route user utterances like 'what language works in appeals' to Medigami's get_winning_phrases tool. Matches: what langu…
- `lookup_icd10` (query) — Route user utterances like 'what's the ICD-10 code for' to Medigami's lookup_icd10 tool. Matches: what's the ICD-10 cod…
- `lookup_cpt` (query) — Route user utterances like 'what's the CPT code for' to Medigami's lookup_cpt tool. Matches: what's the CPT code for, c…
- `lookup_npi` (query, state) — Route user utterances like 'lookup NPI' to Medigami's lookup_npi tool. Matches: lookup NPI, find doctor by NPI, verify …
- `verify_dea` (dea_number, cpt_code) — Route user utterances like 'is this DEA number valid' to Medigami's verify_dea_authorization tool. Matches: is this DEA…
- `lookup_provider_taxonomy` (query) — Route user utterances like 'what specialty is taxonomy code X' to Medigami's lookup_provider_taxonomy tool. Matches: wh…
- `optimize_prescription` (drug_name, prescribed_dose) — Route user utterances like 'cheaper alternative to this drug' to Medigami's optimize_prescription tool. Matches: cheape…
- `verify_citation` (envelope, public_key_pem, expected_fingerprint) — Route user utterances like 'verify this medigami citation' to Medigami's verify_mcp_response tool. Matches: verify this…
