fairquery-agent-trust-mcp
OfficialOne MCP server for AI agents to check untrusted data for PII/secrets, email quality, sanctions exposure, and dependency vulnerabilities, with free local tools plus optional paid Apify-backed tools.
Scan, redact, and restore PII/secrets in text locally for free, with detector catalog, paged findings, placeholder/mask/hash styles, and placeholder maps.
Run deep PII/secret guarding on documents and public URLs (paid): adds NER names/locations, street addresses, PDF text layers, and detect/redact/restore modes.
Check emails for free: syntax, normalization, typo suggestions, disposable/role/free-provider flags; paid deliverability adds MX/null-MX, SPF/DMARC, and verdicts.
Screen names against sanctions lists: free source catalog; paid fuzzy screening for OFAC SDN/Consolidated, EU, UK, and UN with optional country/DOB filters and score thresholds.
Check dependencies against OSV.dev: free exact-version vulnerability queries and advisory details; paid manifest/lockfile audits with severity, fixed versions, and recommended upgrades.
Screen leads in one paid call: parallel email deliverability and sanctions checks merged into pass/review/block decisions.
Use paged outputs and named error codes; paid tools require your own APIFY_TOKEN and bill to your Apify account.
Fairquery Agent Trust & Data Safety (MCP server)
One MCP server for AI agents that handle untrusted data. It covers four jobs:
PII and secret redaction: check text before it reaches an LLM.
Email checks: syntax, typos, disposable and role addresses, plus MX/SPF/DMARC in the paid tool.
Sanctions screening: OFAC, EU, UK and UN lists.
Dependency vulnerabilities: lookups against OSV.dev.
Free tools need no token or account and run on your machine. Paid tools are optional. They call public Fairquery Apify Actors with your own APIFY_TOKEN, and runs are billed to your Apify account.
Tools
Tool | Cost | What it does |
| Free (local) | Catalog of detectors, redaction styles, and pricing for every paid tool |
| Free (local) | Finds PII and secrets in text. Findings are paged and show masked values only |
| Free (local) | Redacts with placeholder, mask or hash style. Can return a placeholder map |
| Free (local) | Puts the original values back into placeholder text (e.g. an LLM answer) using that map; lists placeholders the map does not cover |
| $0.0015/doc + $0.0002/finding | Adds NER names/addresses, URLs and PDFs, and restore mode |
| Free (local) | Syntax, normalization, typo suggestions, disposable/role/free-provider flags |
| $0.00079/email | DNS/MX, null MX, SPF/DMARC, mail provider, verdict |
| Free (local) | Lists covered, issuing authorities, disclaimer |
| $0.003/name + $0.007/call | Fuzzy screening against OFAC SDN/Consolidated, EU, UK and UN |
| Free (api.osv.dev) | Vulnerable or not, plus advisory IDs, for up to 200 exact versions |
| Free (api.osv.dev) | Full OSV advisory records |
| $0.0005/package + $0.0015/vuln | Manifest/lockfile audit with severity, fixes and recommended version |
| $0.00079/email + $0.003/name + $0.007/call | Email check and sanctions screening in parallel, merged into a pass/review/block decision per lead |
Every tool description has WHAT / WHEN / WHEN NOT / COST / RETURNS / EXAMPLE sections. Outputs are paged (limit, offset, nextOffset, hasMore). Errors use named codes: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT, INPUT_EMPTY, INPUT_TOO_LARGE, INVALID_ECOSYSTEM, OSV_FETCH_FAILED and VULN_NOT_FOUND.
Paid tools use these Apify Actors: fairquery/llm-data-guard-pii-secrets, fairquery/email-validator-mx-disposable, fairquery/sanctions-watchlist-screener and fairquery/osv-dependency-vulnerability-check.
Related MCP server: vibecheck
When to use which tool
You want to… | Use | Cost |
Check a prompt, ticket or log for PII and secrets before it reaches an LLM |
| Free, local |
Put the original values back into the LLM's answer after |
| Free, local |
Also catch names and addresses, or scan PDFs or URLs |
| Paid |
Catch typos, disposable or role addresses on a signup form |
| Free, local |
Check that an email's domain can receive mail (MX, null MX, SPF/DMARC) |
| Paid |
See which sanctions lists are covered and the disclaimer |
| Free, local |
Screen people or companies against OFAC, EU, UK and UN sanctions lists |
| Paid |
Get a pass/review/block decision for a new lead (email and name together) |
| Paid |
Find out whether exact package versions have known vulnerabilities |
| Free (api.osv.dev) |
Audit a whole manifest or lockfile with severity, fixed and recommended versions |
| Paid |
Start with the free tools. Use a paid tool only when you need what it adds; each paid call runs an Apify Actor billed to your own token.
Install
Requires Node.js 20 or later. APIFY_TOKEN is optional and only needed for paid tools. Get one at https://console.apify.com/settings/integrations.
Quick start (stdio):
npx -y @fairquery/agent-trust-mcpThe configs below run the npm package with npx -y: no clone or build step needed.
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"fairquery-trust": {
"command": "npx",
"args": ["-y", "@fairquery/agent-trust-mcp"],
"env": { "APIFY_TOKEN": "<optional-your-apify-token>" }
}
}
}Cursor (~/.cursor/mcp.json or .cursor/mcp.json)
{
"mcpServers": {
"fairquery-trust": {
"command": "npx",
"args": ["-y", "@fairquery/agent-trust-mcp"],
"env": { "APIFY_TOKEN": "<optional-your-apify-token>" }
}
}
}VS Code (.vscode/mcp.json)
{
"inputs": [{ "type": "promptString", "id": "apify-token", "description": "Apify token (optional, paid tools only)", "password": true }],
"servers": {
"fairquery-trust": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@fairquery/agent-trust-mcp"],
"env": { "APIFY_TOKEN": "${input:apify-token}" }
}
}
}From source / Docker
git clone https://github.com/fairquery/fairquery-agent-trust-mcp && cd fairquery-agent-trust-mcp
npm ci && npm run build && node dist/index.js # stdio
node dist/index.js --http # Streamable HTTP on http://127.0.0.1:3000/mcp (PORT, HOST env)
docker build -t fairquery-trust-mcp . && docker run -i --rm -e APIFY_TOKEN fairquery-trust-mcpMCPB bundle (Smithery local install, Claude Desktop)
manifest.json describes an MCPB bundle that runs this server locally over stdio. The bundle asks for one optional, sensitive setting: your own Apify API token. Leave it empty to use only the free tools.
npm run build:mcpb # -> build/fairquery-agent-trust-mcp-<version>.mcpb (dist + production node_modules)
npm run test:mcpb # unpack, initialize, tools/list, free call, paid call without token -> APIFY_TOKEN_MISSINGbuild:mcpb also writes <name>-smithery.mcpb, the file to upload to Smithery. It is the same bundle with only manifest.json changed: each tool also carries its inputSchema, outputSchema and annotations, taken from the server's own tools/list. Smithery's publish API needs these for its server card, but the MCPB 0.3 manifest schema allows only name/description per tool, so the canonical .mcpb keeps the spec-valid manifest. test:mcpb tests both bundles and checks that they differ only in those tool schemas.
Tests
npm run smoke # initialize + tools/list + guide/annotation checks, no token
npm run test:live # every free tool live, ReDoS probes, paid tools without token -> APIFY_TOKEN_MISSING
npm run test:paid # also ONE paid call per family using APIFY_TOKEN from env (costs < $0.02)Security
See SECURITY.md. Free tools never contact Apify or Fairquery, and the code contains no secrets.
Disclaimer
Sanctions results come from automated fuzzy matching and are not a certified screening service. Review every potential match yourself. Email checks do not probe SMTP mailboxes.
License
MIT © Fairquery
Available Tools
13 toolsemail_check_syntaxCheck email syntax, typos, disposable & role (free)ARead-onlyIdempotent
WHAT: Offline email checks: RFC-style syntax + normalization, common domain typo "did you mean" (gmial.com -> gmail.com), disposable/temporary domain (bundled CC0 list, ~thousands of domains), role account (info@, sales@), free webmail provider. WHEN: Fast pre-filtering of signups or lead lists, before paying for email_validate_deliverability. WHEN NOT: Does NOT check DNS/MX - it cannot tell whether the domain receives mail (verdict is "invalid", "risky" or "unknown", never "valid"). Use email_validate_deliverability (paid) for MX/SPF/DMARC. COST: Free; local, no token. RETURNS: Paged "email_check" rows; verdict is invalid | risky | unknown, never valid (dns_checked is always false). BEHAVIOR: No network calls (no DNS/SMTP); synchronous and CPU-bound, no rate limits: 10,000 addresses (the per-call maximum) return in well under a second. PARAMETERS: emails: each element is parsed on its own (one address per element; a comma-separated list in one element is INVALID_SYNTAX, not split). Before checking, "Name " is reduced to addr, a leading "mailto:" is dropped, the domain is lowercased (local part keeps its case), a trailing dot is removed and IDN domains are converted to punycode; the normalized value is returned as email, the original as input. Duplicates are not merged: every element yields one row, in input order. Role detection ignores +tags (sales+eu@ counts as sales@) and disposable matching also covers subdomains of listed domains. limit/offset page those rows; meta.summary always counts verdicts over ALL rows, not just the current page. EXAMPLE: {"emails":["someone@gmial.com"]} -> verdict "risky", reasons ["POSSIBLE_TYPO","DNS_NOT_CHECKED"], did_you_mean "someone@gmail.com".
Inputs: emails (required), limit, offset. Returns: meta, count, items, total, +3 more
email_validate_deliverabilityValidate email deliverability: MX, SPF, DMARC (paid)ARead-onlyIdempotent
WHAT: Runs the Fairquery Apify Actor email-validator-mx-disposable: syntax, domain existence, MX/null-MX, disposable, role, free provider, typo suggestion, SPF/DMARC policy, mail provider; final verdict valid | risky | invalid | unknown. WHEN: Only when MX/DNS matters (can the domain receive mail?), e.g. cleaning lists before a send or verifying a lead's domain; for format, typo, disposable or role checks use email_check_syntax (free, local) and pre-filter with it to avoid paying for obviously bad rows. WHEN NOT: Offline format/typo checks (free email_check_syntax). Leads that also need sanctions screening: trust_screen_lead (one merged decision). It does not SMTP-probe mailboxes. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.00079 per email (+ $0.00005/run). 100 emails ~ $0.08. RETURNS: Paged "email" rows (verdict valid | risky | invalid | unknown with reasons[]) or "error" rows. Tool errors: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT. BEHAVIOR: No email is sent; results change only with live DNS. Makes network calls: runs an Apify Actor (DNS/MX lookups) in your account; latency seconds to minutes (300 s timeout). PARAMETERS: emails: elements may also hold comma/semicolon/newline-separated lists or "Name " forms; the Actor splits them, trims, and skips case-insensitive duplicates, so you pay once per unique address. The allow* flags only decide whether a condition downgrades the verdict to "risky": the matching reason code (ROLE_ACCOUNT, DISPOSABLE_DOMAIN, FREE_PROVIDER) is reported in reasons[] either way, and they can never turn an "invalid" address (bad syntax, no domain, null MX, no mail server) into "valid". POSSIBLE_TYPO and IMPLICIT_MX_ONLY always make it "risky" regardless of flags. Typical presets: B2B lead list = allowFreeProviders false + allowRoleAccounts false; consumer signups = defaults. checkSpfDmarc only adds has_spf / has_dmarc / dmarc_policy fields; it never changes the verdict or the price. limit/offset only page the returned rows: every call validates and bills the whole list again (also when only offset changes), so set limit (max 1000) to cover all rows instead of paging. EXAMPLE: {"emails":["john@stripe.com"]} -> verdict "valid", has_mx true, mail_provider "Google Workspace / Gmail".
Inputs: emails (required), limit, offset, checkSpfDmarc, +3 more. Returns: meta, count, items, total, +3 more
osv_audit_dependenciesAudit dependencies/manifests with fix recommendations (paid)ARead-onlyIdempotent
WHAT: Runs the Fairquery Apify Actor osv-dependency-vulnerability-check: parses package.json, package-lock.json (v1-v3), requirements.txt or go.mod (or a package list), checks OSV, and returns per-package max severity/CVSS, fixed versions, a recommended upgrade version and one row per vulnerability (deduped aliases). WHEN: Only for manifests, severity filtering or fix recommendations: full project audits from a pasted manifest, CI-style reports; for a few exact versions use osv_query_packages (free). WHEN NOT: Quick checks of a few exact versions (osv_query_packages, free) or one advisory (osv_get_vulnerability, free). COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.0005 per package + $0.0015 per vulnerability found (+ $0.00005/run). Use minSeverity="HIGH" to cut vuln rows. lodash+django (2 pkgs, 41 vulns) ~ $0.06. RETURNS: Paged rows type="package" (vulnerable, vuln_count, max_severity, fixed_versions, recommended_version), type="vulnerability" (id, cve_ids, severity, cvss_score, fixed_versions, osv_url) or type="error". Tool errors: INPUT_EMPTY, APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT. BEHAVIOR: Makes network calls: runs an Apify Actor (querying OSV.dev) in your account; latency seconds to minutes (300 s timeout). Up to 1000 packages or a 2,000,000-char manifest. PARAMETERS: packages or manifestText = input (one required); manifestType = format, default auto-detect; minSeverity = only report at/above ALL|LOW|MEDIUM|HIGH|CRITICAL (default ALL); includeDevDependencies (default true); limit = page size (default 100, max 1000); offset = items to skip for paging (default 0). EXAMPLE: {"manifestText":"django==3.2.0\nrequests==2.19.0","minSeverity":"HIGH"}
Inputs: limit, offset, packages, minSeverity, +3 more. Returns: meta, count, items, total, +3 more
osv_get_vulnerabilityGet vulnerability advisory details (free, OSV.dev)ARead-onlyIdempotent
WHAT: Fetch full OSV records (summary, details, aliases, severity vectors, affected ranges, fixed versions, references) for advisory IDs directly from api.osv.dev. WHEN: You have IDs (from osv_query_packages or a report) and need details or the fixed version. WHEN NOT: To find which vulns affect a package version (osv_query_packages, free) or a whole manifest (osv_audit_dependencies, paid). COST: Free; no token. RETURNS: Paged "vulnerability" rows with the raw OSV record fields, or "error" rows (VULN_NOT_FOUND | OSV_FETCH_FAILED, see PARAMETERS). BEHAVIOR: One HTTPS call per ID to api.osv.dev, in parallel; typically <2 s, 20 s timeout each. Max 25 IDs per call. PARAMETERS: ids: each ID is fetched separately (in parallel) and yields exactly one row in input order, so one bad ID never fails the others: an unknown ID returns a VULN_NOT_FOUND row (not retryable), a network/5xx problem an OSV_FETCH_FAILED row (retryable - retry just that ID). Prefer the ecosystem/GHSA IDs returned by osv_query_packages (vuln_ids); a CVE-... ID only resolves when OSV indexes that CVE as its own record, otherwise look up the GHSA alias. IDs are matched as given (no trimming of URLs or prefixes), and duplicates are fetched twice. limit/offset only page the returned rows; every call re-fetches all given IDs, so for a next page resend the same ids with offset = nextOffset. EXAMPLE: {"ids":["GHSA-35jh-r3h4-6jhm"]} -> lodash command injection, fixed in 4.17.21.
Inputs: ids (required), limit, offset. Returns: meta, count, items, total, +3 more
osv_query_packagesCheck package versions for known vulnerabilities (free, OSV.dev)ARead-onlyIdempotent
WHAT: Query the public OSV.dev database (api.osv.dev querybatch) directly from your machine for exact package versions; returns which are vulnerable and the advisory IDs. WHEN: Quick "is lodash 4.17.20 vulnerable?" checks for up to 200 packages; then osv_get_vulnerability for details of specific IDs. WHEN NOT: Parsing manifests/lockfiles, severity filtering, fixed/recommended versions in one shot -> osv_audit_dependencies (paid). COST: Free; no token, nothing sent to Fairquery or Apify. RETURNS: Paged "package" rows (vulnerable, vuln_ids) or per-entry INVALID_ECOSYSTEM "error" rows. Tool errors: OSV_FETCH_FAILED (retryable). BEHAVIOR: One HTTPS request to api.osv.dev (Google-run public API) for all packages; typically <2 s, 20 s timeout. Results change only when OSV publishes advisories. PARAMETERS: packages: each entry is checked independently and returns exactly one row, in input order. ecosystem is case-insensitive and accepts aliases (pip -> PyPI, cargo -> crates.io, gem -> RubyGems, golang -> Go); an unknown ecosystem yields a per-entry INVALID_ECOSYSTEM error row while the other entries still run. version must be one exact released version: a range such as "^4.17.0" or ">=2" is not resolved and normally returns no vulnerabilities (a false "safe"), so pin versions from your lockfile first. Duplicate entries are queried and returned twice. limit/offset page the rows (all packages are sent to OSV in a single request); meta.vulnerable_count counts all packages, not only the page. EXAMPLE: {"packages":[{"ecosystem":"npm","name":"lodash","version":"4.17.20"}]} -> vulnerable true, vuln_ids ["GHSA-35jh-r3h4-6jhm",...].
Inputs: packages (required), limit, offset. Returns: meta, count, items, total, +3 more
pii_guard_documentsDeep PII/secret guard for documents and URLs (paid)ARead-onlyIdempotent
WHAT: Runs the Fairquery Apify Actor llm-data-guard-pii-secrets: everything pii_scan_text does PLUS person-name/location NER, street addresses, public document URLs (txt/md/json/csv/HTML/PDF text layer, <= 10 MB) and restore mode (put originals back into LLM output using a placeholder map). WHEN: Only when you need NER names/addresses, files at URLs/PDFs, or the hosted pipeline; for plain text with regex-detectable PII/secrets use pii_scan_text / pii_redact_text (free, local). WHEN NOT: Plain text scans (pii_scan_text / pii_redact_text, free), restoring placeholders in an LLM answer (pii_restore_text, free, same result as restore mode), images (no OCR), email deliverability. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.0015 per document + $0.0002 per finding. Example: 10 docs with 20 findings ~ $0.02. RETURNS: Paged "document" rows (findings masked; output_text in redact/restore modes) or "error" rows. Tool errors: APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT, INPUT_EMPTY. BEHAVIOR: Makes network calls: runs the Actor in your Apify account, which may fetch documentUrls. Latency seconds to a few minutes (300 s actor timeout). Up to 1000 texts / 100 URLs (10 MB each). PARAMETERS: texts and/or documentUrls: at least one non-empty (the schema marks both optional; neither -> INPUT_EMPTY, not billed); both may be combined and each text or URL becomes one billed document row. mode picks which other fields matter: "detect" ignores redactionStyle/returnPlaceholderMap; "redact" uses them; "restore" ignores all detector flags and only replaces placeholders found in texts using placeholderMap (pass the map from an earlier redact call; a placeholder missing from the map stays as is). returnPlaceholderMap works only with mode="redact" + redactionStyle="placeholder". detectNames / detectAddresses enable English NER (PERSON, LOCATION, STREET_ADDRESS; lower precision, slower) and are required before those names can be used in entityTypes. entityTypes / allowList: same semantics as pii_scan_text (case-insensitive, whole-value allow-list) but up to 1000 allow-list values. Cost scales with documents and findings, so narrow entityTypes to cut finding charges. limit/offset only page the returned rows: every call processes and bills the whole input again (also when only offset changes), so pick a limit (max 1000) that covers all rows instead of paging. EXAMPLE: {"documentUrls":["https://example.com/report.pdf"],"mode":"redact","detectNames":true}
Inputs: mode, limit, texts, offset, +9 more. Returns: meta, count, items, total, +3 more
pii_list_detectorsList PII/secret detectors and pricing (free)ARead-onlyIdempotent
WHAT: Catalog of every PII and secret entity type, which ones run locally for free (pii_scan_text / pii_redact_text) vs only in the paid Actor (NER names/locations, street addresses, URL/PDF documents), redaction styles, and the price of every paid tool in this server. WHEN: Before pii_scan_text / pii_redact_text to pick entityTypes, or to explain coverage and costs to a user. WHEN NOT: To actually scan text (pii_scan_text) or redact it (pii_redact_text). COST: Free; no token. RETURNS: One catalog object; local:true marks the detectors the free tools run (see PARAMETERS). BEHAVIOR: No network calls; local static catalog, instant (<10 ms). No rate limits. PARAMETERS: None: call with an empty object {}; the catalog is always complete and cannot be filtered. Its output feeds other tools' parameters: copy detector "type" values verbatim into entityTypes of pii_scan_text / pii_redact_text (only rows with local:true can match there) or pii_guard_documents (all rows, incl. PERSON / LOCATION / STREET_ADDRESS); redaction_styles keys are the allowed redactionStyle values. EXAMPLE: {} -> {"detectors":[{"type":"AWS_ACCESS_KEY","category":"secret","local":true},...]}
Inputs: no named parameters. Returns: detectors, paid_pricing, redaction_styles
pii_redact_textRedact PII and secrets locally (free)ARead-onlyIdempotent
WHAT: Return sanitized copies of texts with every local PII/secret finding replaced (placeholder [EMAIL_1], mask, or salted hash). Placeholders are consistent across documents in one call. Runs 100% on your machine. WHEN: Right before sending user data to an LLM/third party. Use returnPlaceholderMap=true if you need to restore originals in the LLM answer later. WHEN NOT: For a findings report only use pii_scan_text. For names/addresses NER, URLs or PDFs use pii_guard_documents (paid). COST: Free; no token. RETURNS: One "redacted_document" row per text with output_text; meta.placeholder_map only when requested. Errors: INPUT_TOO_LARGE. BEHAVIOR: Same input gives the same output except redactionStyle "hash" (random per-call salt). No network calls; local, milliseconds. Max 50 texts, 200,000 chars each, 500,000 total. PARAMETERS: texts: one element per document, 500,000 chars in total; the same value gets the same placeholder in every document of one call ([EMAIL_1] everywhere), but numbering restarts on each call. redactionStyle: "placeholder" is the only reversible style; "mask" keeps a few characters for human review; "hash" output differs between calls (random salt), so do not compare hashes across calls. returnPlaceholderMap: only has an effect with redactionStyle="placeholder" (ignored for mask/hash); the map in meta.placeholder_map holds the ORIGINAL values, so keep it out of the LLM prompt and restore answers with pii_restore_text (free, local). entityTypes / allowList / entropyScan / defaultPhoneRegion: identical semantics to pii_scan_text (filter after detection, whole-value case-insensitive allow-list). limit/offset page whole documents (one item per text, default 10 per page), not findings. EXAMPLE: {"texts":["Call +1 415 555 0100 or mail jane@acme.com"]} -> output_text "Call [PHONE_1] or mail [EMAIL_1]".
Inputs: texts (required), limit, offset, allowList, +5 more. Returns: meta, count, items, total, +3 more
pii_restore_textRestore placeholders with original values (free, local)ARead-onlyIdempotent
WHAT: Put the original values back into texts (typically an LLM answer) that contain placeholders such as [EMAIL_1], using the placeholder map from pii_redact_text or pii_guard_documents. Runs 100% on your machine. WHEN: After an LLM or third party answered a prompt you sanitized with pii_redact_text (redactionStyle "placeholder", returnPlaceholderMap=true), before showing the answer to the user. WHEN NOT: To redact (pii_redact_text) or find PII (pii_scan_text). Masked and hashed values cannot be restored; only placeholder style is reversible. COST: Free; no token. RETURNS: One "restored_document" row per text with output_text, replacements and unknown_placeholders. Errors: INPUT_TOO_LARGE. BEHAVIOR: No network calls; the map never leaves your machine; milliseconds. Max 50 texts, 200,000 chars each, 500,000 total; map up to 10,000 entries. PARAMETERS: placeholderMap: pass meta.placeholder_map unchanged; every key is replaced wherever it occurs exactly (case-sensitive, longest key first, one pass, so a restored value is never replaced again). unknown_placeholders lists [TYPE_N]-shaped tokens left in the text that the map does not contain (the LLM invented or altered them); they stay as they are. A placeholder the LLM rewrote (e.g. "EMAIL_1" without brackets) is not restored. The output contains the ORIGINAL sensitive values: show it to the user, do not send it back to the LLM. limit/offset page whole documents (default 10 per page). EXAMPLE: {"texts":["I will email [EMAIL_1] today."],"placeholderMap":{"[EMAIL_1]":"jane@acme.com"}} -> output_text "I will email jane@acme.com today.", replacements 1.
Inputs: texts (required), placeholderMap (required), limit, offset. Returns: meta, count, items, total, +3 more
pii_scan_textScan text for PII and secrets locally (free)ARead-onlyIdempotent
WHAT: Detect PII (emails, phones, US SSNs, Luhn-valid cards, mod-97 IBANs, UK NINOs, IPv4/IPv6) and secrets (AWS/GitHub/GitLab/Slack/Stripe/Google/OpenAI/Anthropic/HF/npm/SendGrid/Twilio/Azure keys, JWTs, private keys, URL credentials, key=value secrets) in text. Runs 100% on your machine. WHEN: Before sending prompts, tickets, logs or files to an LLM or third party; to audit text for leaked credentials. Findings are paged across all documents. WHEN NOT: To get sanitized text use pii_redact_text. For person names/addresses (NER), public URLs or PDFs use pii_guard_documents (paid). Not for images (no OCR). COST: Free. Local regex/validators only; no APIFY_TOKEN. RETURNS: Paged findings across all documents, each with a masked preview; raw values are never returned. Errors: INPUT_TOO_LARGE. BEHAVIOR: No network calls; text never leaves your machine; milliseconds. Max 50 texts, 200,000 chars each, 500,000 total. PARAMETERS: texts: one array element per document; each finding carries doc_index = the element's 0-based position, and the 500,000-char cap applies to the SUM of all elements (over it -> INPUT_TOO_LARGE; split into several calls). entityTypes: filters findings after detection; names are case-insensitive, unknown names silently match nothing, and NER-only types (PERSON, LOCATION, STREET_ADDRESS) never match here. allowList: compared with the whole matched value, case-insensitively (allow "support@yourco.com", not "yourco.com"). entropyScan: only adds HIGH_ENTROPY_STRING findings; it never removes others. defaultPhoneRegion: affects only national-format numbers such as "030 1234567" (needs "DE"); "+49 ..." numbers parse with any region. limit/offset page the flat findings list across all documents, while meta.documents always summarises every document; fetch the next page with offset = nextOffset until hasMore is false. EXAMPLE: {"texts":["Mail jane@acme.com, key AKIAIOSFODNN7EXAMPLE"]} -> 2 findings: EMAIL (masked "j***@a***.com"), AWS_ACCESS_KEY; risk_level "critical".
Inputs: texts (required), limit, offset, allowList, +3 more. Returns: meta, count, items, total, +3 more
sanctions_list_sourcesList covered sanctions lists (free)ARead-onlyIdempotent
WHAT: Static list of the official sanctions lists sanctions_screen_names checks (id, name, authority, download URL), the score scale and the legal disclaimer. WHEN: To choose the lists parameter, cite sources in a report, or explain coverage before paying. WHEN NOT: To screen a name (sanctions_screen_names, paid). It does not download lists or report freshness. COST: Free; no token. RETURNS: One static object, including the disclaimer to show with screening results. BEHAVIOR: No network calls; static local catalog, instant. No rate limits. PARAMETERS: None: call with an empty object {}; the result is static and cannot be filtered. Its output feeds sanctions_screen_names: each sources[].id (OFAC_SDN, OFAC_CONS, EU, UK, UN) is a valid value for its lists parameter, and score_scale explains how its minScore threshold is applied. EXAMPLE: {} -> {"sources":[{"id":"OFAC_SDN","authority":"US Treasury OFAC",...},...]}
Inputs: no named parameters. Returns: pricing, sources, disclaimer, score_scale
sanctions_screen_namesScreen names against OFAC/EU/UK/UN sanctions (paid)ARead-onlyIdempotent
WHAT: Runs the Fairquery Apify Actor sanctions-watchlist-screener: fuzzy-match people/organisations against OFAC SDN, OFAC Consolidated, EU, UK and UN lists from the official sources (re-downloaded when the cached copy in your Apify account is older than 6 h; every row reports each list's publication date); optional country/DOB filters. WHEN: KYC/KYB onboarding, vendor/counterparty checks, bulk re-screening. Put all names in ONE call (each call is one run with its own start fee; list loading takes ~2-5 s from the cache, or 10-40 s, up to ~60 s, when lists are re-downloaded). WHEN NOT: PEP/adverse media, certified compliance decisions. For coverage info use free sanctions_list_sources. Leads that also have an email to validate: trust_screen_lead (one merged decision). COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.003 per name + $0.007 per run. 200 names in one call ~ $0.61. RETURNS: Paged "screening" rows (status potential_match | no_match, matches[] best first, lists_unavailable) or "error" rows. Tool errors: INPUT_EMPTY, APIFY_TOKEN_MISSING, APIFY_TOKEN_INVALID, APIFY_PAYMENT_REQUIRED, APIFY_ACTOR_RUN_FAILED, APIFY_TIMEOUT. Not a certified screening service. Automated fuzzy matching against public lists; false positives and misses are possible. Review every potential match manually and consult official sources/legal counsel before acting. BEHAVIOR: Results are stable for a given list snapshot. Makes network calls: runs an Apify Actor in your account; latency seconds to minutes (300 s timeout). Up to 10,000 names. PARAMETERS: names and/or queries: at least one non-empty (the schema marks both optional; neither -> INPUT_EMPTY, not billed). Both may be combined; every entry is billed once, so use names for bare strings and queries when you have country/dateOfBirth/entityType or want your own id echoed. In queries, dateOfBirth removes listed individuals born more than 1 year apart, while country never removes matches (it only sets country_match); entityType "entity" covers organisations, vessels and aircraft. lists: omit to screen all five; a list that cannot be downloaded is reported in lists_unavailable instead of failing the run. minScore: a match is returned only if its 0-100 similarity is >= minScore; 85 balances recall and noise, 90-95 for large batches, 75-80 for transliterated names; it does not change the price. maxMatchesPerName caps matches[] only; match_count still reports all matches. limit/offset only page the returned rows: every call screens and bills all names again (also when only offset changes), so set limit (max 1000) to cover all rows instead of paging. EXAMPLE: {"queries":[{"name":"Banco Nacional de Cuba","entityType":"entity"}],"minScore":90} -> status potential_match (OFAC_SDN).
Inputs: limit, lists, names, offset, +3 more. Returns: meta, count, items, total, +3 more
trust_screen_leadScreen leads: email deliverability + sanctions (paid)ARead-onlyIdempotent
WHAT: One call per batch of leads/counterparties: runs email_validate_deliverability on their emails and sanctions_screen_names on their person/company names IN PARALLEL, then merges results per lead with an overall decision: block (invalid email or sanctions potential_match), review (risky email), pass. WHEN: Onboarding customers/vendors, qualifying inbound leads, CRM hygiene where both email quality and sanctions exposure matter. WHEN NOT: Email only -> email_validate_deliverability; names only -> sanctions_screen_names (same per-item prices, no merge step). Free pre-filter first: email_check_syntax. Use this tool only when a lead needs both checks and one decision. COST: Paid, billed to YOUR Apify account via your APIFY_TOKEN: $0.00079 per lead with email + $0.003 per lead with name (= $0.00379 per full lead) + $0.007 per call for the sanctions run. 100 full leads ~ $0.39. RETURNS: Paged "lead" rows (decision pass | review | block with reasons[]; sanctions_matches holds the top 3); meta.summary counts by decision. Partial failure: the affected check shows "unavailable" and meta.errors lists codes. Tool errors: INPUT_EMPTY, APIFY_TOKEN_MISSING. BEHAVIOR: No email is sent. Runs the email and sanctions Apify Actors in parallel (2 runs per call) in your account; ~5-45 s (sanctions lists come from a cache at most 6 h old, or are downloaded), 300 s timeout. PARAMETERS: leads: each record needs email and/or name (if no lead has either -> INPUT_EMPTY, nothing billed); a lead with only an email skips sanctions (sanctions_status "not_checked") and one with only a name skips email (email_verdict "not_checked"), so a lead is billed for each check it gets (prices under COST), plus the per-call sanctions run fee when any lead has a name. Identical emails across leads are validated and billed once. ref joins sanctions results back to the lead, so keep refs unique (default = the lead's 0-based index as a string). country and entityType apply to that lead's sanctions check only: entityType filters candidates, while country only annotates matches (never removes them). minScore: sanctions similarity threshold; default 88 here (stricter than the 85 of sanctions_screen_names) to keep block decisions low-noise; each name returns at most its top 3 matches. allowFreeProviders=false turns gmail.com-type addresses into email_verdict "risky", i.e. decision "review" (never "block"). Decision precedence: any sanctions potential_match or invalid email -> block; else risky email or an incomplete check -> review; else pass. limit/offset page the merged lead rows, but every call re-runs and re-bills both checks for all leads (also when only offset changes), so set limit (max 1000) to cover all leads; meta.summary counts all leads. EXAMPLE: {"leads":[{"ref":"L1","email":"cfo@acme.com","name":"Acme Trading LLC","country":"US"}]} -> {decision:"pass",email_verdict:"valid",sanctions_status:"no_match"}
Inputs: leads (required), limit, offset, minScore, +1 more. Returns: meta, count, items, total, +3 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool occupies a clearly distinct slot: free-local vs paid-hosted PII handling, detect vs redact vs restore, syntax-only vs MX email checks, manifest audit vs exact-version query vs advisory lookup. The few apparent overlaps (pii_guard_documents restore mode vs pii_restore_text, trust_screen_lead vs its two component tools) are explicitly called out in WHEN/WHEN NOT sections with guidance on which to pick. An agent should have no trouble selecting the right tool.
All 13 names are snake_case with a stable domain_prefix_verb_noun pattern (pii_*, email_*, sanctions_*, osv_*, trust_screen_lead). The domain prefixes make grouping obvious and the verb choice (scan/redact/restore/list/guard/check/validate/screen/query/get/audit) is used meaningfully and consistently.
13 tools is a well-scoped size for a multi-domain trust server covering PII, email, sanctions, and dependency vulnerabilities, with roughly 3-5 tools per sub-domain. Every tool has a distinct role (a free local variant, a paid hosted variant, a catalogue, or a merged convenience call) rather than being filler.
The surface covers the full lifecycle in each area: PII detect/redact/restore/guard plus a detector catalogue, email syntax + deliverability, sanctions screening + source listing, and OSV query/get/audit, with trust_screen_lead tying email and sanctions together. Minor gaps remain, such as no way to check APIFY_TOKEN credit/payment status before invoking paid tools (only error codes) and no image OCR, but these are stated limitations agents can work around.
Maintenance
Related MCP Connectors
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
AgentGuard — 20-tool AI safety MCP: policy preflight, risk scoring, audit logging, rate limits.
Safety tools for AI agents: safe page reader, prompt-injection, secrets, PII and MCP server scans
Trust layer for AI agents. Privi Guard checks web pages, emails and tool results for prompt injection and outgoing text for leaked API keys and card numbers, with signed on-chain receipts (1,000 free checks a month). Privi Scan grades any MCP server for tool poisoning and rug pulls. Plus tamper-evident audit logs, agent passports, spending mandates and a live kill switch.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceRuntime safety guardrails for AI coding agents. Checks file access, validates shell commands, and scores your repo's AI safety — all via MCP.9 npm8MIT
- AlicenseAqualityDmaintenanceAgent-native "safe to ship?" security gate for AI-generated code. Uses real parsers and inter-rocedural taint analysis (JS/TS, Python, Go) to flag the classes AI coding agents get wrong — secrets, SQL injection, SS, SSRF, path traversal, command injection, weak JWT/CORS — and ranks findings by confidence. Exposes a scan tool over MCP.18 npm2MIT
- FlicenseNot gradedqualityDmaintenanceRuntime agent firewall for PII redaction, rate limits, and policy enforcement, enabling autonomous agent security via MCP integration.-
- AlicenseAqualityDmaintenanceProvides prompt injection detection, PII/secrets redaction, and an audit trail for AI agents via MCP tools.4MIT