Brdata Mcp

Created By
thomenz2 days ago
An MCP (Model Context Protocol) server for Brazilian company & public-procurement data, for agent harnesses (Claude Code, Claude Desktop, …). It covers: CNPJ company registry lookup (basic + full due-diligence), company search/discovery across ~28M active companies by filters (CNAE activity, state/city, size, MEI, name), public tenders / licitações via PNCP (decode Compras.gov.br IDs, resolve, header, line items, edital documents, keyword search), NF-e & boleto decoding, CEP lookup, and batch document validation — for KYB, due diligence, and B2G (public-sector) sales intelligence. Paid tools automatically settle the underlying x402-protected HTTP endpoints in USDC on Base using a wallet you configure; a call is charged only on success.
Overview

Tools

ToolEndpointPriceDescription
lookup_companyGET /company/{cnpj}$0.01Consolidated registry profile
lookup_company_fullGET /company/{cnpj}/full$0.10+ partners (QSA) + sanctions
screen_company_riskGET /risk/company/{cnpj}$0.03Regulatory risk & compliance screen: federal debarment (CEIS), anti-corruption (CNEP) & leniency → verdict + 0–100 score
decode_nfe_keyGET /nfe/{key}$0.005NF-e/NFC-e 44-digit access-key decoder
decode_boletoPOST /boleto/decode$0.005Boleto digitable-line decoder
validate_documentsPOST /validate/batch$0.002Batch validate CPF/CNPJ/PIS/plate/Pix (≤100)
lookup_cepGET /cep/{cep}$0.005Enriched postal-code lookup
search_companiesPOST /companies/search$0.05/pageSearch & segment active companies by CNAE/location/size/age/name
decode_tender_idGET /tender/decode/{id}$0.005Offline decode of a Compras.gov.br 17-digit tender id
resolve_tenderPOST /tender/resolve$0.02Resolve any tender reference (id/URL/control number) to PNCP + summary
get_tenderGET /tender/{cnpj}/{year}/{seq}$0.01Full tender header (PNCP)
get_tender_itemsGET /tender/{cnpj}/{year}/{seq}/items$0.03All tender items + ME/EPP-exclusive flags
get_tender_documentsGET /tender/{cnpj}/{year}/{seq}/documents$0.01Tender document URIs (no PDF download)
search_tendersPOST /tender/search$0.05Search public tenders (PNCP) by keyword
validate_cnpjGET /validate/{cnpj}freeSingle CNPJ check-digit validation

search_companies requires the Worker to have the Phase 2 database configured (Hyperdrive); otherwise it returns a 503 (and no payment is charged). MEI contact data is redacted (LGPD).

Configuration

Environment variables:

VarRequiredDefaultMeaning
BRDATA_BASE_URLnohttps://brdata.thomenz.meBase URL of a brdata Worker (defaults to the hosted production API)
EVM_PRIVATE_KEYfor paid tools0x-prefixed key of the paying wallet (holds USDC)
X402_NETWORKnobasebase (mainnet, matches the default URL) or base-sepolia (testnet)

⚠️ Security

EVM_PRIVATE_KEY controls real funds. Anything that can read this process' environment (or the MCP config file) can spend from that wallet.

  • Use a dedicated wallet with a small balance, funded only with what you're willing to auto-spend. Never a personal or treasury key.
  • On testnet (base-sepolia) use test USDC only.
  • The key is read from the environment; it is never sent anywhere except to sign x402 payment authorizations for BRDATA_BASE_URL.

Use with Claude Code / Claude Desktop

Add to your mcpServers configuration:

{
  "mcpServers": {
    "brdata": {
      "command": "npx",
      "args": ["-y", "brdata-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "0x<dedicated-wallet-key-with-USDC>"
      }
    }
  }
}

For local development against wrangler dev, point BRDATA_BASE_URL at http://localhost:8787 and use X402_NETWORK=base-sepolia with a testnet wallet.

If you run from source instead of npm, use:

{
  "mcpServers": {
    "brdata": {
      "command": "node",
      "args": ["/absolute/path/to/packages/brdata-mcp/dist/index.js"],
      "env": { "BRDATA_BASE_URL": "http://localhost:8787", "EVM_PRIVATE_KEY": "0x...", "X402_NETWORK": "base-sepolia" }
    }
  }
}

Example

"Use brdata to run full due diligence on CNPJ 00.000.000/0001-91."

The agent calls lookup_company_full, which pays $0.10 in USDC and returns the consolidated English profile with partners and sanction checks.

Build & publish

pnpm install
pnpm run build        # emits dist/
pnpm run typecheck
# publish (see checklist in the main repo README before doing this):
npm publish --access public

License

MIT

Server Config

{
  "mcpServers": {
    "brdata": {
      "command": "npx",
      "args": [
        "-y",
        "brdata-mcp"
      ],
      "env": {
        "EVM_PRIVATE_KEY": "0x<dedicated-wallet-key-with-USDC>"
      }
    }
  }
}
Project Info
Created At
2 days ago
Updated At
2 days ago
Author Name
thomenz
Star
-
Language
-
License
-
Category
Tags

Recommend Servers

View All
Contractedge Mcp

13 hours ago
Devadex

19 hours ago
Eventedge Mcp

13 hours ago