Skip to main content
Glama
alanpcf

brasil-data-mcp

by alanpcf

brasil-data-mcp

npm version license node

MCP server that exposes Brazilian public data (CNPJ, CEP, banks, holidays) as tools for Claude Desktop, Claude Code, Cursor, Windsurf, and any client compatible with the Model Context Protocol.

Powered by BrasilAPI — no keys, no auth, official data.


🇧🇷 PT — What is it?

Connect your AI client to Brazilian public data without writing a single line of code. Ask in natural language:

  • "What is the legal name for CNPJ 33.000.167/0001-01?"

  • "Which city is this ZIP code 01310-100 in?"

  • "Which bank has the code 341?"

  • "What are the national holidays for 2026?"

Claude (or another MCP client) calls the tool, returns the structured JSON, and you read the answer in Portuguese directly in the conversation.

Available tools

Tool

What it does

consultar_cnpj

Company registration data: legal name, status, address, partners, CNAE

consultar_cep

Full address from ZIP code (street, neighborhood, city, state, coordinates)

consultar_banco

Name and ISPB of a Brazilian bank by COMPE code (e.g., 341 = Itaú, 260 = Nubank)

listar_bancos

Full list of Brazilian banks registered with BACEN (~250 institutions)

consultar_feriados

National holidays for a given year (dates, name, type) — includes Carnival and Easter


Related MCP server: mcp-brasil

🇺🇸 EN — What is it?

Plug your AI client into Brazilian public data with zero code. Ask in natural language and the LLM picks the right tool, calls it, and answers you with structured data from official sources (Receita Federal, ViaCEP, BACEN).

Currently ships with consultar_cnpj. CEP, banks and holidays are landing next.


🚀 Installation

All instructions below use npx -y brasil-data-mcp, which downloads and runs the latest version without a global installation.

Claude Desktop

Edit the configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "brasil-data": {
      "command": "npx",
      "args": ["-y", "brasil-data-mcp"]
    }
  }
}

Restart Claude Desktop. Done.

Claude Code

claude mcp add brasil-data -- npx -y brasil-data-mcp

Cursor

Create or edit .cursor/mcp.json in the project root:

{
  "mcpServers": {
    "brasil-data": {
      "command": "npx",
      "args": ["-y", "brasil-data-mcp"]
    }
  }
}

🛠️ Development

git clone https://github.com/alanpcf/brasil-data-mcp.git
cd brasil-data-mcp
npm install

npm run dev      # tsx watch — hot reload em desenvolvimento
npm run lint     # tsc --noEmit
npm run build    # tsup → dist/index.js
npm test         # vitest

To point your MCP client to the local build instead of the npm package:

{
  "mcpServers": {
    "brasil-data-local": {
      "command": "node",
      "args": ["/caminho/absoluto/para/brasil-data-mcp/dist/index.js"]
    }
  }
}

🗺️ Roadmap

  • [x] Phase 1 — Skeleton + HTTP client + consultar_cnpj

  • [x] Phase 2consultar_cep, consultar_banco, listar_bancos, consultar_feriados + Vitest tests

  • [ ] Phase 3 — CI (GitHub Actions), CONTRIBUTING.md, coverage > 80%, npm publication

  • [ ] Phase 4 — FIPE, DDD, ISBN, rates (SELIC/CDI/IPCA), CVM, MCP prompts for workflows


💡 Why this project exists

Most AI tools are trained and demonstrated with American data: ZIP code, EIN, FedEx tracking. When a Brazilian dev wants to ask an LLM "give me the registration for CNPJ X", they either resort to scraping, build an HTTP integration from scratch, or give up.

brasil-data-mcp is the shortest path: a single npx and your Claude (or Cursor, or Windsurf) already speaks "Brazilian public data Portuguese". Everything is open source, MIT, no keys, no hostile rate limits — because BrasilAPI has already done the heavy lifting of unifying and caching official data.

If you are a Brazilian dev and use LLMs daily, this server is for you.


🤝 Contributing

Issues and PRs are very welcome. To add a new tool, follow the pattern in src/tools/cnpj.ts (Zod schema + description + handler) and register it in src/index.ts.

Detailed guide in CONTRIBUTING.md (coming soon).


Built with ❤️ in Brazil. Powered by BrasilAPI.

Install Server
A
license - permissive license
A
quality
A
maintenance

Maintenance

Maintainers
Response time
4wRelease cycle
3Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    MCP Server for accessing 36 Brazilian public data sources and 1 agent, enabling AI agents to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Self-hosted MCP connector for querying Brazilian legal jurisprudence via JurisprudenciaIA. Enables natural language legal research using Claude.ai, with tools for consulting, searching, and comparing jurisprudence and legal theses.
    13
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server that connects AI agents to 28 Brazilian public APIs, providing tools to query government data on economy, legislation, transparency, judiciary, elections, environment, health, and more.
    MIT

View all related MCP servers

Related MCP Connectors

  • Brazilian Open Finance MCP — 30+ banks (Itaú, Nubank, etc.) to Claude/Cursor. Read-only.

  • Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alanpcf/brasil-data-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server