# Brazil Boleto, DARF & NF-e Key Parser (x402)

> FEBRABAN boleto (post-Feb/2025), DARF/FGTS/IPTU tax slip & NF-e key parser via x402 Base USDC.

- name: io.github.brunopompeo1/br-docs-parser-x402
- version: 2.7.1
- connection class: R0 (autonomous)
- trust: 92/100 flags: duplicate-repo
- quality: 89/100 (good)
- charges per call: the server says so (`` decode_tax_utility_slip ``, `` validate_nfe_access_key ``)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/io.github.brunopompeo1%2Fbr-docs-parser-x402
- tools: https://api.protogrid.dev/v1/servers/io.github.brunopompeo1%2Fbr-docs-parser-x402/tools

**An agent can connect right now, no human step.** Remote endpoint, no authentication, reachable on the last probe.

## Connection (mcpServers)

```json
{
  "mcpServers": {
    "br-docs-parser-x402": {
      "type": "http",
      "url": "https://br-docs-parser-x402.architect-x402.workers.dev/mcp"
    }
  }
}
```


## Trust

- hygiene: 80
- liveness: 98
- freshness: 100
- provenance: 90
- drivers: +repository +namespace-matches-repo +website +reachable +uptime-96% +updated-4d-ago -duplicate-repo(13 names)
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 89/100 (good)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-06-18; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 94 (weight 30)

- pass `tools.descriptions`: every tool has a description
- warn `tools.description_length`: 3 tools have descriptions over 1,024 characters, which crowds the context
- pass `tools.schemas`: every tool has an object input schema
- pass `tools.annotations`: 3 of 3 tools declare readOnlyHint or destructiveHint
- pass `tools.directory_hints`: every tool declares readOnlyHint, destructiveHint, idempotentHint and openWorldHint
- pass `tools.token_cost`: about 1,737 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump
- pass `tools.hidden_text`: no hidden text in tool names, descriptions, schemas or annotations
- pass `tools.poisoning`: no instructions aimed at the model in tool definitions

### stability: 100 (weight 15)

- pass `stability.changes`: 4 tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name
- pass `stability.new_links`: no tool change named a new site

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 3, about 1,737 tokens to load them all
- tool set hash: 8b30d8495da6e0307795861103251ef4
- tools last changed: 2026-11-25T14:14:18.823Z
- badge: [![protogrid quality](https://protogrid.dev/badge/io.github.brunopompeo1/br-docs-parser-x402.svg)](https://protogrid.dev/servers/io.github.brunopompeo1/br-docs-parser-x402)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Definition changes

- 2026-11-25 `br_docs_parser` removed
  - Brazilian FEBRABAN Bank Boleto (47/44), Tax/Utility Slip DARF/FGTS/IPTU (48/44), and NF-e Access Key (44) validator & decoder with post-2025 due date engine (0.008 USDC via x402 on Base).
- 2026-11-25 `validate_nfe_access_key` added
  - Validates the Mod-11 check digit, the IBGE state code and the month of a 44-digit Brazilian fiscal document access key (NF-e model 55, NFC-e model 65, CT-e model 57) and splits it into issuer state, issue month, issuer CNPJ, model, series, invoice number, emission type and numeric code. Use it to reject a mistyped or fabricated key before querying SEFAZ or importing an invoice, or to find the issuer CNPJ and invoice number from a key alone. Do not use it to check whether the invoice was authorised, cancelled or denied, because nothing is queried at SEFAZ: a valid key only proves the digits are well formed; to audit the full XML use the br-nfe-xml-auditor API instead. Read 'isValid' and 'nfeKey'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.
- 2026-11-25 `decode_tax_utility_slip` added
  - Decodes a Brazilian collection slip (guia de arrecadação) from its 48-digit line or 44-digit barcode, both starting with 8: federal and municipal taxes such as DARF, GPS, FGTS, IPTU and ISS, traffic fines, and power, water, gas and telecom bills. It identifies the segment and the collecting agency, extracts the amount in reais when one is encoded, picks Mod-10 or Mod-11 from the third digit and checks all four block digits and the general digit. Use it to confirm a tax or utility payment before sending it, or to read the amount from a code captured by OCR. Do not use it for a bank boleto, whose line starts with the bank code and has 47 digits, which belongs to decode_bank_boleto; and note that these slips do not encode a due date, so none is returned. Read 'isValid' and 'arrecadacao'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.
- 2026-11-25 `decode_bank_boleto` added
  - Decodes a Brazilian FEBRABAN bank boleto from its 47-digit digitable line or its 44-digit barcode and checks every check digit, returning the bank name, the amount in reais, the due date under the post-February-2025 factor reset, the free field and both the formatted line and the barcode. Use it before paying or booking a bill, to read amount and due date from a code typed by a person or extracted by OCR, or to convert a line into a barcode. Do not use it for a slip whose line starts with 8, such as a DARF, a utility bill or a city tax, which is a tax or utility slip and belongs to decode_tax_utility_slip, and do not expect payer, beneficiary or payment status, which are not encoded in the digits. Formatting characters such as dots and spaces are ignored. Read 'isValid' and 'boleto'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.

Full history: https://api.protogrid.dev/v1/servers/io.github.brunopompeo1%2Fbr-docs-parser-x402/changes

## Remotes

- https://br-docs-parser-x402.architect-x402.workers.dev/mcp (streamable-http, auth none, reachable true, uptime30d 0.9607843)

## Packages

_none_

## Tools (3)

- `decode_bank_boleto`: Decodes a Brazilian FEBRABAN bank boleto from its 47-digit digitable line or its 44-digit barcode and checks every check digit, returning the bank name, the amount in reais, the due date under the post-February-2025 factor reset, the free field and both the formatted line and the barcode. Use it before paying or booking a bill, to read amount and due date from a code typed by a person or extracted by OCR, or to convert a line into a barcode. Do not use it for a slip whose line starts with 8, such as a DARF, a utility bill or a city tax, which is a tax or utility slip and belongs to decode_tax_utility_slip, and do not expect payer, beneficiary or payment status, which are not encoded in the digits. Formatting characters such as dots and spaces are ignored. Read 'isValid' and 'boleto'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.
- `decode_tax_utility_slip`: Decodes a Brazilian collection slip (guia de arrecadação) from its 48-digit line or 44-digit barcode, both starting with 8: federal and municipal taxes such as DARF, GPS, FGTS, IPTU and ISS, traffic fines, and power, water, gas and telecom bills. It identifies the segment and the collecting agency, extracts the amount in reais when one is encoded, picks Mod-10 or Mod-11 from the third digit and checks all four block digits and the general digit. Use it to confirm a tax or utility payment before sending it, or to read the amount from a code captured by OCR. Do not use it for a bank boleto, whose line starts with the bank code and has 47 digits, which belongs to decode_bank_boleto; and note that these slips do not encode a due date, so none is returned. Read 'isValid' and 'arrecadacao'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.
- `validate_nfe_access_key`: Validates the Mod-11 check digit, the IBGE state code and the month of a 44-digit Brazilian fiscal document access key (NF-e model 55, NFC-e model 65, CT-e model 57) and splits it into issuer state, issue month, issuer CNPJ, model, series, invoice number, emission type and numeric code. Use it to reject a mistyped or fabricated key before querying SEFAZ or importing an invoice, or to find the issuer CNPJ and invoice number from a key alone. Do not use it to check whether the invoice was authorised, cancelled or denied, because nothing is queried at SEFAZ: a valid key only proves the digits are well formed; to audit the full XML use the br-nfe-xml-auditor API instead. Read 'isValid' and 'nfeKey'. Costs 0.008 USDC per call, paid with x402 v2 on Base (eip155:8453) or with a B2B X-API-Key; an unpaid call returns HTTP 402 with a PAYMENT-REQUIRED header instead of an exception. A missing or empty 'code' is rejected with HTTP 400 before any charge; a code that is paid for but cannot be decoded comes back as HTTP 422 with success false and 'error', so an agent loop never breaks on a thrown error. Pure computation at the edge: nothing is stored, no bank, SEFAZ or Receita system is contacted, and the same code always yields the same result.
