io.github.celfons/kya-brasil
Measured conclusion: Deep-tested. L2 outcome: tools_ok.
KYA backed by a real company: e-CNPJ-signed agent mandates, revocation-checked, signed verdicts
| Author | io.github.celfons |
|---|---|
| Access | remote |
| Publisher key required | No |
| Measured state | Deep-tested |
| L1 liveness | alive |
| L1 latency | 2532 ms |
| Last measured | 2026-10-24 |
Add to your agent
Copy this into your MCP client config:
{
"mcpServers": {
"kya-brasil": {
"url": "https://kya-br-agents.marcelfons.workers.dev/mcp",
"transport": "streamable-http"
}
}
}
Measured tools (15)
kya_registerRegister an AI agent for a Brazilian company: agent key (EVM address or Web Bot Auth Ed25519 key), CNPJ and a mandate (JSON, validated against /.well-known/kya-mandate.schema.json). Returns a one-time challenge the agent signs with its key and the company signs with its e-CNPJ (CMS/PKCS#7). Price covers the checks at issuance.
Parameters:
agent(required) — objectmandate(required) — object — Mandate JSON validated by https://kya-br-agents.marcelfons.workers.dev/.well-known/kya-mandate.schema.json. Reserved fields: actions, max_per_operation, max_per_day, currencies, counterparties, valid_from, valid_until.cnpj— string — The company's CNPJ (company agents). Leave out with principal "person".principal— string — "person": the agent acts for a natural person who signs with an e-CPF (no CNPJ; no name or CPF is ever published).
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world yes
kya_verify_paidread-onlySame as the free verification, without daily limit, plus a signed receipt of the verification itself (what was checked, when). Pay per call with x402.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_check_actionread-onlySigned verdict: is this action (action, amount, currency, counterparty, payment instrument) inside the agent's mandate and is the credential active? Evaluates the reserved mandate fields; lists the fields it did not evaluate.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.action— string — Action the agent wants to perform (e.g. pay, order, sign).amount— numbercurrency— string — BRL, USDC, ...spent_today— number — What this agent already spent today, if you track it (used for max_per_day).counterparty— string — CNPJ, domain or wallet address of the other side.payment_network— string — Payment network or rail of this operation: visa, mastercard, elo, pix, ...payment_ref_sha256— string — SHA-256 hex of the payment token reference or PAR used (never a card number); checked against mandate.payment_instruments.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_renewRe-issue the credential for 90 more days. The company signs the renewal challenge with an e-CNPJ in force (not revoked); the company must still be ATIVA at the Receita.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world yes
kya_proveFree. Send both signatures of the challenge. The e-CNPJ chain is validated against ICP-Brasil roots, the CNPJ must match, the certificate must not be revoked (CRL) and the company must be ATIVA; then the credential is issued (90 days, Ed25519-signed).
Parameters:
credential_id(required) — string — credential_id returned by kya_register.challenge_id(required) — string — challenge.id from kya_register (or kya_renew).agent_signature(required) — string — Signature of challenge.text by the agent key: EIP-191 personal_sign hex (evm) or raw Ed25519 base64url (web-bot-auth).ecnpj_signature(required) — string — CMS/PKCS#7 SignedData (detached, base64 DER) of challenge.text, signed with the company's e-CNPJ certificate.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world yes
kya_principal_matchread-onlySigned answer ($0.01) for a person's agent (principal.kind person): does the CPF you already have match the e-CPF holder behind it? On a match, a subject_ref of your own for that person (stable for you, different for every verifier). The CPF is never stored, published or revealed; 3 non-matching answers per credential stop your checks. The person sees every check.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.cpf(required) — string — The CPF you already have for this person; used for the comparison only, never stored.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_person_agentsread-onlyFree, person only: every live credential behind your e-CPF and every CPF check made against each one. Sign "KYA Brasil: my agents\nat: <ISO time>" with the e-CPF (valid 10 minutes).
Parameters:
signed_text(required) — string — "KYA Brasil: my agents\nat: <ISO time>"ecpf_signature(required) — string — CMS/PKCS#7 of signed_text with the person's e-CPF, base64 DER.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_sign_linkread-onlyFree. Link for whoever holds the company's e-CNPJ (owner, accountant): give challenge_id and the agent's signature, get the /sign URL. They see agent, company and mandate and sign in the browser (A1 .pfx) or with any ICP-Brasil signer (A3 token, cloud), or run kya-sign (npm @kya-brasil/agent-tools) with the link. The issuer never sees the certificate.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.challenge_id(required) — string — challenge.id from kya_register or kya_renew.agent_signature— string — The agent's signature of challenge.text, so the person only signs with the e-CNPJ.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_verifyread-onlyFree (50/day per IP). The agent's current credential: principal company, mandate, status (active, suspended, revoked, expired) and signature. Also by key: /v1/agents/by-key?kind=&id=.
Parameters:
agent— object — Alternative to credential_id: look up active credentials by agent key.credential_id— string — credential_id returned by kya_register.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_renew_proveFree. Second step of kya_renew: send both signatures of the renewal challenge; the credential is re-issued for 90 days if the e-CNPJ is not revoked and the company is still ATIVA.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.challenge_id(required) — string — challenge.id from kya_register (or kya_renew).agent_signature(required) — string — Signature of challenge.text by the agent key: EIP-191 personal_sign hex (evm) or raw Ed25519 base64url (web-bot-auth).ecnpj_signature(required) — string — CMS/PKCS#7 SignedData (detached, base64 DER) of challenge.text, signed with the company's e-CNPJ certificate.
Hints: read-only not declared · destructive not declared · idempotent not declared · open-world yes
kya_revokedestructiveFree. The company revokes the credential at once (e-CNPJ-signed request). Revocations are listed at /v1/revocations.
Parameters:
credential_id(required) — string — credential_id returned by kya_register.signed_text(required) — string — Exactly "KYA Brasil: revoke <credential_id>" followed by a newline and a nonce of your choice.ecnpj_signature(required) — string — CMS/PKCS#7 SignedData (detached, base64 DER) of signed_text with the company's e-CNPJ.reason— string
Hints: read-only not declared · destructive yes · idempotent not declared · open-world yes
kya_company_agentsread-onlyFree, company only. Every credential ever registered for your CNPJ, any status, whoever held the certificate (an accountant, another employee). Request signed with your e-CNPJ over "KYA Brasil: agents <cnpj>" + "at: <ISO time>".
Parameters:
cnpj(required) — string — The company's CNPJ.signed_text(required) — string — "KYA Brasil: <agents|webhook> <cnpj>", for the webhook a "url: <https url or ->" line, then "at: <ISO time>" (within 10 minutes).ecnpj_signature(required) — string — CMS/PKCS#7 SignedData of signed_text with the company's e-CNPJ, detached, base64 DER.
Hints: read-only yes · destructive not declared · idempotent not declared · open-world yes
kya_company_webhookFree, company only. Sets the https URL that receives signed events about your agents: credential issued, renewed, suspended, reinstated, revoked. Request signed with your e-CNPJ; url "-" removes it.
Parameters:
cnpj(required) — string — The company's CNPJ.signed_text(required) — string — "KYA Brasil: <agents|webhook> <cnpj>", for the webhook a "url: <https url or ->" line, then "at: <ISO time>" (within 10 minutes).ecnpj_signature(required) — string — CMS/PKCS#7 SignedData of signed_text with the company's e-CNPJ, detached, base64 DER.
Hints: read-only not declared · destructive not declared · idempotent yes · open-world yes
kya_revocationsread-onlyFree. Credentials revoked since a date (default: last 30 days), for verifiers that cache credentials.
Parameters:
since— string
Hints: read-only yes · destructive not declared · idempotent yes · open-world not declared
kya_aboutread-onlyFree. What KYA Brasil is, how the credential flow works, prices, and where the schemas and signing keys are.
Hints: read-only yes · destructive not declared · idempotent yes · open-world not declared
Measured by MCPYP probing. Untested fields are omitted, never estimated. Listing is always free; MCPYP never proxies calls or stores user tokens.