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.
- MCP server pre-check: local scan of tool names and descriptions before you install or enable a server.
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
pii_list_detectors | Free (local) | Catalog of detectors, redaction styles, and pricing for every paid tool |
pii_scan_text | Free (local) | Finds PII and secrets in text, including the Asia national-ID pack. Findings are paged and show masked values only |
pii_redact_text | Free (local) | Redacts with placeholder, mask or hash style. Can return a placeholder map |
pii_restore_text | 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 |
pii_guard_documents | $1.50/1,000 docs + $0.20/1,000 findings | Adds NER names/addresses, URLs and PDFs, and restore mode |
email_check_syntax | Free (local) | Syntax, normalization, typo suggestions, disposable/role/free-provider flags |
email_validate_deliverability | $0.79/1,000 emails | DNS/MX, null MX, SPF/DMARC, mail provider, verdict |
sanctions_list_sources | Free (local) | Lists covered, issuing authorities, disclaimer |
sanctions_screen_names | $3.00/1,000 names + $7.00/1,000 calls | Fuzzy screening against OFAC SDN/Consolidated, EU, UK and UN |
osv_query_packages | Free (api.osv.dev) | Vulnerable or not, plus advisory IDs, for up to 200 exact versions |
osv_get_vulnerability | Free (api.osv.dev) | Full OSV advisory records |
osv_audit_dependencies | $0.50/1,000 packages + $1.50/1,000 vulns | Manifest/lockfile audit with severity, fixes and recommended version |
trust_screen_lead | $0.79/1,000 emails + $3.00/1,000 names + $7.00/1,000 calls | Email check and sanctions screening in parallel, merged into a pass/review/block decision per lead |
mcp_server_precheck | Free local scan. Optional paid audit: $0.50/1,000 packages + $1.50/1,000 vulns | Scans tool names and descriptions for injection, hidden markup and cross-server shadowing. Nothing in that scan leaves the machine. auditDependencies: true also audits a local lockfile and adds license and publish age |
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, INVALID_JSON, INVALID_PACKAGE_NAME, PATH_NOT_FOUND, PATH_NOT_ALLOWED, OSV_FETCH_FAILED and VULN_NOT_FOUND.
Paid tools use these Apify Actors:
fairquery/llm-data-guard-pii-secrets for pii_guard_documents, from $0.99 per 1,000 documents processed on Apify's Business plan and above ($1.50 on Free). The per-run start fee is $0.05 per 1,000 runs.
fairquery/email-validator-mx-disposable for email_validate_deliverability and trust_screen_lead, from $0.59 per 1,000 emails checked on Apify's Business plan and above ($0.79 on Free). The per-run start fee is $0.05 per 1,000 runs.
fairquery/sanctions-watchlist-screener for sanctions_screen_names and trust_screen_lead, from $2.10 per 1,000 names screened on Apify's Business plan and above ($3.00 on Free). The per-run start fee is $7.00 per 1,000 runs.
fairquery/osv-dependency-vulnerability-check for osv_audit_dependencies, from $0.35 per 1,000 packages checked and $1.00 per 1,000 vulnerabilities found on Apify's Business plan and above ($0.50 and $1.50 on Free). The per-run start fee is $0.05 per 1,000 runs.
Prices as shown on the Apify Store on 2026-10-24.
When to use which tool
| Check a prompt, ticket or log for PII and secrets before it reaches an LLM | pii_scan_text, then pii_redact_text | Free, local |
Put the original values back into the LLM's answer after pii_redact_text | pii_restore_text | Free, local |
| Also catch names and addresses, or scan PDFs or URLs | pii_guard_documents | Paid |
| Catch typos, disposable or role addresses on a signup form | email_check_syntax | Free, local |
| Check that an email's domain can receive mail (MX, null MX, SPF/DMARC) | email_validate_deliverability | Paid |
| See which sanctions lists are covered and the disclaimer | sanctions_list_sources | Free, local |
| Screen people or companies against OFAC, EU, UK and UN sanctions lists | sanctions_screen_names | Paid |
| Get a pass/review/block decision for a new lead (email and name together) | trust_screen_lead | Paid |
| Find out whether exact package versions have known vulnerabilities | osv_query_packages, then osv_get_vulnerability for details | Free (api.osv.dev) |
| Audit a whole manifest or lockfile with severity, fixed and recommended versions | osv_audit_dependencies | Paid |
| Pre-check an MCP server's tool descriptions before you install or enable it | mcp_server_precheck | Free, local |
| Also audit that server's dependencies and record license and publish age | mcp_server_precheck with auditDependencies: true | Paid for the OSV audit |
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.
Asia national-ID pack
pii_scan_text and pii_redact_text detect these national IDs locally. A value is reported only when the checksum (if the scheme has one) and the structural checks pass. A failed check is ignored. Mask style keeps the last four characters, the same as a US SSN, and risk_level is high.
IN_AADHAAR | India Aadhaar | 12 digits, first digit 2-9, Verhoeff check. Groups of four with spaces or hyphens are allowed. |
IN_PAN | India PAN | Five letters, four digits, one letter. The 4th character is the holder type (P, C, H, F, A, T, B, L, J, G). PAN has no checksum. |
IN_GSTIN | India GSTIN | 15 characters: state code 01-38, 97 or 99, the holder's PAN, an entity code, the letter Z, and a mod-36 check character. |
KR_RRN | Korea resident registration number (주민등록번호) | 13 digits, a real birth date, and the weighted mod-11 check digit. Numbers issued under the post-October 2020 random scheme have no check digit and are not matched. |
JP_MY_NUMBER | Japan My Number (個人番号) | 12 digits and the check digit from the Ministry of Internal Affairs ordinance (weights from the right, mod 11). |
SG_NRIC | Singapore NRIC / FIN | Prefix S, T, F, G or M, seven digits, and the checksum letter. |
VN_CCCD | Vietnam citizen ID (CCCD) | 12 digits: province code from Circular 07/2016/TT-BCA (still the prefix on cards after the 2025 mergers), century/gender digit, and a birth year that is not in the future. The scheme has no checksum, so the finding is medium confidence. |
TW_NATIONAL_ID | Taiwan national ID | Area letter, gender or resident code (1, 2, 8, 9, A-D), and the mod-10 check. |
CN_RESIDENT_ID | China resident ID | 18 characters, province code, a real birth date, and the ISO 7064 mod 11-2 check. The last character may be X. |
Pre-check an MCP server
The free call only scans what you already have. It does not install the package, start it, or send tool names and descriptions anywhere.
{
"name": "mcp_server_precheck",
"arguments": {
"tools": [
{ "name": "sum", "description": "Add two numbers." }
]
}
}
A clean description comes back with meta.risk_level of none and meta.shared_externally.tool_names_and_descriptions of false. Findings, when there are any, are rows with a rule such as PROMPT_INJECTION, SECRET_EXFILTRATION, HIDDEN_INSTRUCTION, CONCEALED_TEXT or CROSS_SERVER_REFERENCE.
You can point path at a local checkout or a .json tools/list file, or pass packageName for a package that is already installed under node_modules. If the name is not on disk, the result says so and does not download it.
The paid mode is the same scan plus a dependency audit. It needs APIFY_TOKEN and a local package.json or package-lock.json. License and publish age come from the local manifest and, when the package is not marked private, a public npm registry lookup of the package name. Tool descriptions are still not uploaded.
{
"name": "mcp_server_precheck",
"arguments": {
"path": "/absolute/path/to/the-mcp-package",
"auditDependencies": true
}
}
Without a token the local findings still return, and the dependency_audit row has error_code APIFY_TOKEN_MISSING.
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-mcp
The 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}" }
}
}
}
Gemini CLI (~/.gemini/settings.json)
{
"mcpServers": {
"fairquery-trust": {
"command": "npx",
"args": ["-y", "@fairquery/agent-trust-mcp"],
"env": { "APIFY_TOKEN": "<optional-your-apify-token>" }
}
}
}
Streamable HTTP
npx -y @fairquery/agent-trust-mcp --http
MCPB 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
npm run test:mcpb
build: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
npm run test:live
npm run test:paid
Security
See https://getfairquery.com/security/. Free tools never contact Apify or Fairquery, and the code contains no secrets. mcp_server_precheck does not send tool descriptions anywhere. With auditDependencies: true it sends a local manifest to the OSV Actor and, unless the package is marked private, the package name to the public npm registry.
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