@medigamiofficial/sdk
v0.1.2
Published
TypeScript SDK for the Medigami MCP — outcome-labeled healthcare claim intelligence as simple method calls, with Ed25519-attested responses. Pairs with pip install medigami on the Python side.
Maintainers
Readme
@medigamiofficial/sdk
TypeScript/JavaScript SDK for the Medigami MCP. Call Medigami tools
as plain async methods. Every response is wrapped in an
AttestedResponse with .payload, .envelope, .trackingId,
.citationUrl, and .verify() for offline signature verification.
npm install @medigamiofficial/sdkQuick start
import { Medigami } from "@medigamiofficial/sdk";
// Public SKU — free-forever, no auth
const m = new Medigami();
const r = await m.scanBillForErrors({ billText: "..." });
console.log(r.payload.total_recovery_estimate);
console.log(r.citationUrl); // https://medigami.com/v/evt_abc...
// Intel SKU — Bearer-auth, per-call billed
const intel = new Medigami({ token: "mk_intel_..." });
const score = await intel.scoreDenialAppealDynamics({
insurer: "Aetna",
denialReason: "medical_necessity",
cptCode: "99213",
amount: 1200,
});
console.log(score.payload.probability_appeal_wins);Verifying a signed response offline
Requires WebCrypto with Ed25519 support (Node 20+, modern browsers).
const pem = await (await fetch(
"https://medigami.com/.well-known/mcp-pubkey.pem"
)).text();
const verdict = await r.verify(pem);
if (!verdict.valid) throw new Error(verdict.reason);Available methods
scanBillForErrorsestimateAppealSuccess,benchmarkPayerRateresolveDenial,negotiateBillScript,maximizeRecoverypreventDenialBeforeSubmit,scoreDenialAppealDynamics,preflightClaim(intel)lookupIcd10,lookupCpt,lookupNpi,verifyDeaAuthorization,lookupProviderTaxonomyformatCitation
See the TypeScript declarations (index.d.ts) for full argument types.
Config
new Medigami({
token: "mk_intel_...", // optional Bearer
baseUrl: "https://api.medigami.com", // override for dev/staging
timeoutMs: 30000,
fetch, // Node <18: pass a polyfill
});Env-var fallbacks: MEDIGAMI_API_BASE, MEDIGAMI_CITATION_BASE.
License
Apache-2.0. Pairs with pip install medigami on the Python side.
