Fairquery Agent Trust MCP

PII/機密資料遮罩、電子郵件驗證、制裁名單篩查,以及針對AI代理的OSV依賴漏洞檢查。提供免費的本機工具,另可選配由Apify支援的付費深度工具。

文件

Fairquery Agent Trust & Data Safety (MCP server)

One MCP server for AI agents that handle untrusted data and US company filings. It covers:

  • 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.
  • SEC EDGAR: resolve US companies and pull filings and XBRL facts from sec.gov. Bulk export is the paid tool.

Free tools need no token or account. Most of them run on your machine. The free EDGAR tools call sec.gov directly. Paid tools are optional. They call public Fairquery Apify Actors with your own APIFY_TOKEN, and runs are billed to your Apify account.

Tools

ToolCostWhat it does
pii_list_detectorsFree (local)Catalog of detectors, redaction styles, and pricing for every paid tool
pii_scan_textFree (local)Finds PII and secrets in text, including the Asia national-ID pack. Findings are paged and show masked values only
pii_redact_textFree (local)Redacts with placeholder, mask or hash style. Can return a placeholder map
pii_restore_textFree (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 findingsAdds NER names/addresses, URLs and PDFs, and restore mode
email_check_syntaxFree (local)Syntax, normalization, typo suggestions, disposable/role/free-provider flags
email_validate_deliverability$0.79/1,000 emailsDNS/MX, null MX, SPF/DMARC, mail provider, verdict
sanctions_list_sourcesFree (local)Lists covered, issuing authorities, disclaimer
sanctions_screen_names$3.00/1,000 names + $7.00/1,000 callsFuzzy screening against OFAC SDN/Consolidated, EU, UK and UN
osv_query_packagesFree (api.osv.dev)Vulnerable or not, plus advisory IDs, for up to 200 exact versions
osv_get_vulnerabilityFree (api.osv.dev)Full OSV advisory records
osv_audit_dependencies$0.50/1,000 packages + $1.50/1,000 vulnsManifest/lockfile audit with severity, fixes and recommended version
osv_install_verdictFree (api.osv.dev + registry.npmjs.org or pypi.org JSON)Install, pin, block or not assessed for up to 50 npm or PyPI packages, with a pin command. Not a guarantee. malicious is true only for an OSV MAL- record
trust_screen_lead$0.79/1,000 emails + $3.00/1,000 names + $7.00/1,000 callsOne call when a lead needs both an email check and sanctions screening. Each lead keeps decision pass / review / block and reasons[], plus go_nogo: go only for pass, no_go for review or block
mcp_server_precheckFree scan. A missing package is read from the public npm tarball (not installed). Optional paid audit: $0.50/1,000 packages + $1.50/1,000 vulnsScans tool names and descriptions for injection, hidden markup and cross-server shadowing. meta.verdict is ok, review or block. Tool text is not uploaded. auditDependencies: true also audits a local lockfile and adds license and publish age
competitor_digest$0.30/1,000 pages checked + $4.90/1,000 changes reported + $5.90/1,000 pages renderedWhat changed at competitor pages since the last run of a named watchlist. Runs in your Apify account. Nothing is sent to Fairquery
edgar_resolve_companyFree (sec.gov)Ticker, CIK or company-name fragment to a 10-digit SEC CIK
edgar_list_filingsFree (sec.gov)One company's filings, with form and date filters and document URLs
edgar_get_filing_indexFree (sec.gov)Documents and exhibits of one filing
edgar_get_filing_documentFree (sec.gov)Filing text, paged by character. HTML is converted to text
edgar_get_company_factsFree (sec.gov)XBRL concepts and values for one company
edgar_get_concept_across_companiesFree (sec.gov)One XBRL concept for one calendar period across filers
edgar_batch_export$1.50/1,000 companies + $1.00/1,000 filing rows + $0.20/1,000 fact rows + $2.00/1,000 excerptsBulk filings and facts for up to 50 companies via your Apify token

Every tool description has WHAT / WHEN / WHEN NOT / COST / RETURNS / BEHAVIOR / PARAMETERS / 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, REMOTE_URL_NOT_SUPPORTED, REGISTRY_NOT_FOUND, REGISTRY_FETCH_FAILED, REGISTRY_NO_LATEST, TARBALL_TOO_LARGE, TARBALL_INVALID, TARBALL_HOST_NOT_ALLOWED, OSV_FETCH_FAILED, VULN_NOT_FOUND, COMPANY_NOT_FOUND, NOT_FOUND, FILING_NOT_FOUND, INVALID_INPUT, INVALID_URL and SEC_FETCH_FAILED.

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.
  • fairquery/edgar-company-facts-filings for edgar_batch_export: $1.50 per 1,000 resolved companies, $1.00 per 1,000 filing rows, $0.20 per 1,000 fact rows and $2.00 per 1,000 text excerpts, plus $0.05 per 1,000 runs. One company with 5 filings and 12 fact values is about $0.009.
  • fairquery/competitor-change-tracker for competitor_digest: $0.30 per 1,000 pages checked, $4.90 per 1,000 changes reported and $5.90 per 1,000 pages rendered. With digestJobs left on, the tracker also calls Company Jobs Feed ($0.99 per 1,000 jobs and $0.50 per 1,000 boards). With digestTech left on, it calls Website Tech at $1.50 per 1,000 sites. The digest row itself is not a separate charge. Six plain-HTTP page checks and no reported change is about $0.002.

Prices as shown on the Apify Store on 2026-10-24 for the trust Actors, and on 2026-10-26 for the competitor tracker (the tier that started 2026-10-20). The EDGAR Actor prices are the pay-per-event rates wired into edgar_batch_export ($0.0015 per resolved company, $0.001 per filing row, $0.0002 per fact row, $0.002 per text excerpt, $0.00005 per run), stated per 1,000 to match the other tools.

When to use which tool

You want to…UseCost
Check a prompt, ticket or log for PII and secrets before it reaches an LLMpii_scan_text, then pii_redact_textFree, local
Put the original values back into the LLM's answer after pii_redact_textpii_restore_textFree, local
Also catch names and addresses, or scan PDFs or URLspii_guard_documentsPaid
Catch typos, disposable or role addresses on a signup formemail_check_syntaxFree, local
Check that an email's domain can receive mail (MX, null MX, SPF/DMARC)email_validate_deliverabilityPaid
See which sanctions lists are covered and the disclaimersanctions_list_sourcesFree, local
Screen people or companies against OFAC, EU, UK and UN sanctions listssanctions_screen_namesPaid
Get a go/no-go for a new lead that needs both an email check and a sanctions screentrust_screen_leadPaid
Find out whether exact package versions have known vulnerabilitiesosv_query_packages, then osv_get_vulnerability for detailsFree (api.osv.dev)
Decide whether to install, pin or block an npm or PyPI packageosv_install_verdictFree (api.osv.dev and the public registry JSON). Not a guarantee
Audit a whole manifest or lockfile with severity, fixed and recommended versionsosv_audit_dependenciesPaid
Pre-check an MCP server's tool descriptions before you install or enable itmcp_server_precheckFree. A package name that is not on disk is read from the public npm tarball and is not installed
Also audit that server's dependencies and record license and publish agemcp_server_precheck with auditDependencies: truePaid for the OSV audit
What changed at these competitors since I last askedcompetitor_digestPaid (your Apify token, named watchlist)
Resolve a US company's SEC CIK, then list its filings or read a filingedgar_resolve_company, then edgar_list_filings, edgar_get_filing_index or edgar_get_filing_documentFree (sec.gov)
Read one company's XBRL facts, or compare one concept across filersedgar_get_company_facts, or edgar_get_concept_across_companiesFree (sec.gov)
Export filings and facts for 5 or more companies in one calledgar_batch_exportPaid

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.

TypeDocumentWhat is checked
IN_AADHAARIndia Aadhaar12 digits, first digit 2-9, Verhoeff check. Groups of four with spaces or hyphens are allowed.
IN_PANIndia PANFive 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_GSTINIndia GSTIN15 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_RRNKorea 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_NUMBERJapan My Number (個人番号)12 digits and the check digit from the Ministry of Internal Affairs ordinance (weights from the right, mod 11).
SG_NRICSingapore NRIC / FINPrefix S, T, F, G or M, seven digits, and the checksum letter.
VN_CCCDVietnam 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_IDTaiwan national IDArea letter, gender or resident code (1, 2, 8, 9, A-D), and the mod-10 check.
CN_RESIDENT_IDChina resident ID18 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, meta.verdict of ok, 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. meta.why holds up to three of those findings in plain words. Critical or high maps to block, medium to review, and low or none to ok. not_assessed maps to review and is never ok.

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 tool reads package.json, manifest.json and server.json from the published tarball on registry.npmjs.org. It does not install the package, does not run lifecycle scripts, and strips maintainer emails. remoteUrl is refused with REMOTE_URL_NOT_SUPPORTED. No connection is opened.

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, pin, or block a package

osv_install_verdict is free. It asks OSV.dev whether the version is affected, including MAL- records, and reads the public registry document for the version list, license, deprecation and publish time. npm uses https://registry.npmjs.org/{name}. PyPI uses https://pypi.org/pypi/{name}/json. It does not open the npm or PyPI websites, does not download the package, and does not run install scripts.

{
  "name": "osv_install_verdict",
  "arguments": {
    "packages": [{ "ecosystem": "npm", "name": "lodash", "version": "4.17.20" }]
  }
}

verdict is install, pin, block or not_assessed. A MAL- id is block and malicious: true. A vulnerability with no non-vulnerable published version is block. A vulnerability with a fixed published version is pin, with pin_to and fix_command (npm i name@version or pip install name==version). A deprecated release, or one published less than 7 days ago, is named in why and can still be install when nothing else is wrong. An unknown name or version is not_assessed. That is never install. malicious is true only when OSV published a MAL- record for the version that was checked. The response says this is not a guarantee.

Competitor digest

competitor_digest is paid. It starts fairquery/competitor-change-tracker with mode "digest" using your APIFY_TOKEN. Pass a watchlist name so the baseline stays in your Apify account: fairquery-competitor-tracker for "default", or fairquery-competitor-tracker-<name> for any other name. The next call with the same watchlist compares against that baseline. This server does not send the pages or the rows to a Fairquery host.

{
  "name": "competitor_digest",
  "arguments": {
    "watchlist": "saas-competitors",
    "domains": ["linear.app", "cal.com"],
    "pageTypes": ["pricing", "changelog"]
  }
}

digestJobs and digestTech default to true. Set either to false to skip that extra Actor charge. renderJs defaults to "never" on the Actor, which avoids the page-rendered price.

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   # Streamable HTTP on http://127.0.0.1:3000/mcp (PORT, HOST env)

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   # -> 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_MISSING

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.

SEC EDGAR

Free EDGAR tools call only www.sec.gov and data.sec.gov. They send User-Agent: Fairquery info@getfairquery.com, stay at or under 5 requests per second, and do not read APIFY_TOKEN. Company names and tickers are matched against the SEC ticker map after it is downloaded. Later requests use the CIK.

edgar_get_filing_document accepts a documentUrl only when it starts with https://www.sec.gov/Archives/. edgar_get_filing_index accepts an indexUrl only when it is an EDGAR {accession}-index.htm URL on that same host. Other URLs return INVALID_URL and nothing is fetched.

For one to four companies, use the free tools. edgar_batch_export is the paid path (your Apify token, Actor fairquery/edgar-company-facts-filings) for five or more companies, or for bulk text excerpts.

Tests

npm run build        # tsc; tests import dist/
npm run smoke        # initialize + tools/list + guide/annotation checks, pre-check verdict, install-verdict and competitor-digest fixtures, Asia national-ID vectors, trust_screen_lead go/no-go mapping, mocked SEC EDGAR tools, 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). Does not call edgar_batch_export unless you add it; that call bills your Apify account.

scripts/test-edgar.mjs (part of npm run smoke) mocks SEC with a fake fetch. It does not call sec.gov.

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. A packageName that is not on disk is read from registry.npmjs.org (packument, then tarball) and is not installed. With auditDependencies: true it sends a local manifest to the OSV Actor and, unless the package is marked private or the tarball was already read, the package name to the public npm registry. osv_install_verdict calls api.osv.dev plus that npm registry or pypi.org JSON only. competitor_digest uses your Apify token and keeps state in your Apify account. Free EDGAR tools contact only www.sec.gov and data.sec.gov.

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.

trust_screen_lead is the one-call screener for a lead that needs both checks. Each lead row still has decision and reasons[], and adds go_nogo:

decisiongo_nogo
passgo
reviewno_go
blockno_go

go is not legal clearance, not permission to auto-onboard, and not permission to auto-deny without human review. The tool is not a certified KYC/AML service and not for FCRA eligibility decisions. Potential matches need human review before acting. Every response includes: "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."

License

MIT © Fairquery