Clients
The API is plain HTTP and works with curl. These exist so you do not have to write the same hundred lines of timeout, fail-open and type handling that every integrator writes.
TypeScript — @monapi/client
Zero dependencies. Node 18+, Next.js route handlers, edge runtimes, workers.
bash
npm install @monapi/clientts
import { checkEmail } from "@monapi/client"
const result = await checkEmail("kontakt@gamil.com")
result.decision // "allow" | "challenge" | "block"
result.score // 0-100
result.signals // [{ id: "email:domain_typo", weight: 10, ... }]
result.enrichment.did_you_mean // "gmail.com"Fail-open, by design
If the engine is unreachable, slow, or no API key is set, the check resolves to
allow with checked: false and never throws. A form must not break because a reputation service is down. To fail closed instead, read the flag and decide yourself — it exists so that choice stays yours.ts
// app/api/contact/route.ts
import { checkEmail } from "@monapi/client"
export async function POST(request: Request) {
const { email } = await request.json()
const verdict = await checkEmail(email, "lead")
if (verdict.decision === "block") {
return Response.json({ error: "invalid_email" }, { status: 422 })
}
if (verdict.enrichment.did_you_mean) {
return Response.json({ suggest: verdict.enrichment.did_you_mean })
}
return Response.json({ ok: true })
}Keep the key server-side
The package is meant for route handlers, server actions and backends. This site does the same: the browser never sees the engine key.
AI agents — MCP server
An agent that processes an inbox, a signup export or a contact form needs exactly this decision — and the signals give it something to justify its own answer with.
bash
claude mcp add monapi \
--env MONAPI_URL=https://api.monapi.io \
--env MONAPI_API_KEY=<key> \
-- uv run --directory ./mcp monapi-mcp| Tool | What it does |
|---|---|
monapi_check_email | One address: blocklists, MX, mail server reputation, role account, typo |
monapi_check_emails | A list, grouped by decision — signups, leads, a mailing list |
monapi_check_ip | One IP against abuse, VPN/Tor and datacenter feeds, plus geo/ASN |
monapi_check_domain | One domain: blocklists plus the reputation of where it resolves |
monapi_explain_decision | What signal ids mean, what to do, and when they mislead |
monapi_list_profiles | The policy profiles an instance offers |
Every tool is read-only and takes response_format: markdown for a readable verdict, json for the engine’s full response. monapi_explain_decision reads the signal catalogue of the instance that produced the decision, so the explanation matches the verdict.
Anything else
One GET with one header. Match on the decision, or on signal categories if you want finer control.Both packages live in the engine repository, under
bash
curl -H 'X-API-Key: <key>' 'https://api.monapi.io/v1/check/email/name@example.com?profile=lead'clients/node/ and mcp/: github.com/dplusf/monapi-engine.