Brasil API

Finance and commerce

MCP server for BrasilAPI, CEP, CNPJ, banks, FIPE, holidays, weather.

Your AI app calls the Brasil API MCP server, which does the finance and commerce work and sends the result back to the chat.

About Brasil API

Brasil API is a community MCP server from codespar, filed in our directory under finance and commerce. MCP server for BrasilAPI, CEP, CNPJ, banks, FIPE, holidays, weather.

Brasil API runs on your own machine: your AI app starts it with the command npx -y @codespar/mcp-brasil-api@0.2.2 and talks to it over standard input and output.

Brasil API is listed in the official MCP registry as io.github.codespar/mcp-brasil-api, version 0.2.2.

At a glance

Publisher
codespar (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @codespar/mcp-brasil-api
Written in
TypeScript
License
MIT
GitHub stars
278
Official MCP registry
io.github.codespar/mcp-brasil-api

How to set up Brasil API

  1. Install Node.js on the machine that runs your AI app, because Brasil API starts with npx and downloads its package on first run.
  2. Check the Brasil API README for keys or settings; the registry lists none that Brasil API requires.
  3. Add Brasil API to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Brasil API tools to confirm the connection.
  5. Run one read-only task with Brasil API first, and keep your app asking before each tool call until the results look right.

Brasil API compared with similar servers

  • Braspag by codespar has fewer GitHub stars than Brasil API (278 against 278); both are community servers, and both run locally.
  • Braintree by codespar has fewer GitHub stars than Brasil API (278 against 278); both are community servers, and both run locally.
  • Btg by codespar has fewer GitHub stars than Brasil API (278 against 278); both are community servers, and both run locally.

Before you connect Brasil API

  • Give Brasil API its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Brasil API tool call until you trust what it does with them.
  • Treat text that Brasil API fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Brasil API on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Brasil API

How marketing and sales teams put Brasil API to work, by company size. Pick the size closest to yours and start Brasil API on one use case.

Small business

  • A small business can ask Brasil API which products and customers drive margin, then plan promotions around them.
  • Owners can use Brasil API to check refunds, failed payments and churn reasons without opening three dashboards.
  • Brasil API runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Ecommerce teams can connect Brasil API to tie campaigns to orders and revenue, not just clicks.
  • Marketing and finance can use Brasil API to check spend against budget each week and move money to what's working.
  • Start Brasil API on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should keep Brasil API read-only for agents, with any money movement handled by people and existing approvals.
  • Large commerce teams can use Brasil API to answer revenue questions by channel and region with figures finance signs off on.
  • Brasil API is a community server, so have security review the code and pin a version before Brasil API touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Brasil API README

From codespar/mcp-dev-latam on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

@codespar/mcp-brasil-api

MCP server for BrasilAPI, free public data APIs for CEP, CNPJ, banks, holidays, FIPE, and more

Quick Start

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "brasil-api": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-brasil-api"]
    }
  }
}
Claude Code
claude mcp add brasil-api -- npx @codespar/mcp-brasil-api
Cursor / VS Code

Add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "brasil-api": {
      "command": "npx",
      "args": ["-y", "@codespar/mcp-brasil-api"]
    }
  }
}

Tools (24)

Tool Purpose
get_cep Look up address by CEP (Brazilian postal code)
get_cnpj Look up company information by CNPJ
get_banks List all Brazilian banks with codes and names
get_holidays List national holidays for a given year
get_fipe_brands List vehicle brands by type from FIPE table
get_fipe_price Get vehicle price from FIPE table by code
get_ddd Get state and cities for a DDD (area code)
get_isbn Look up book information by ISBN
get_ncm Look up NCM tax classification code
get_cptec_weather Get weather forecast for a city (CPTEC/INPE)
get_pix_participants List Pix participant institutions (PSPs/banks enrolled in Pix)
get_domain_info Look up .br domain registration info
get_ibge_municipalities List all municipalities for a Brazilian state (IBGE data)
get_tax_rates Get current Brazilian tax/economic rates (Selic, CDI, IPCA)
get_cptec_cities Search CPTEC/INPE cities by name for weather forecasts
get_cep_v1 Look up address by CEP using BrasilAPI v1 (single-provider, often faster than v2)
get_fipe_vehicles List vehicle models for a given FIPE brand code and vehicle type
get_fipe_tables List FIPE reference tables (months/years available for FIPE queries)
get_cptec_airport_weather Get current airport weather (METAR) by ICAO code from CPTEC/INPE
get_cptec_capitals_weather Get current weather conditions for all Brazilian state capitals
get_cptec_ocean_forecast Get ocean/wave forecast for a coastal city (CPTEC/INPE)
get_ibge_states List all Brazilian states/UFs with IBGE codes and metadata
get_corretoras List all CVM-registered Brazilian brokerages (corretoras)
get_corretora Look up a single CVM-registered brokerage by CNPJ

Authentication

No authentication required. BrasilAPI is a free public API.

Sandbox / Testing

No sandbox needed. BrasilAPI is free and open for all requests.

Get your credentials

No credentials needed. Just install and use.

Environment Variables

No environment variables required.

Roadmap

v0.2 (planned)
  • get_pix_participants, Get list of Pix participant institutions
  • get_domain_info, Get domain registration info
  • get_vehicle_info, Get vehicle info by license plate (FIPE)
  • get_ibge_municipalities, List municipalities by state (IBGE)
  • get_tax_rates, Get current tax rates (Selic, CDI, IPCA)
v0.3 (planned)
  • get_cvm_funds, Get investment fund data from CVM
  • get_election_results, Get election results by region

Want to contribute? Open a PR or request a tool.

Links

Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

License

MIT

Questions about Brasil API

What is the Brasil API MCP server?

MCP server for BrasilAPI, CEP, CNPJ, banks, FIPE, holidays, weather. Brasil API is maintained by codespar on GitHub at codespar/mcp-dev-latam, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Brasil API MCP server?

Add Brasil API to your AI app's MCP config with the command npx -y @codespar/mcp-brasil-api@0.2.2. In Claude Code, run claude mcp add --transport stdio codespar-brasil-api -- npx -y @codespar/mcp-brasil-api@0.2.2. To run Brasil API this way you need Node.js installed.

Does Brasil API need an API key?

The registry lists no required keys for Brasil API. Check the Brasil API README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Brasil API an official MCP server?

No. Brasil API is a community server maintained by codespar. Community servers can be excellent; read the code and the open issues before you give Brasil API access to company data.

What license is Brasil API under?

Brasil API is released under the MIT license, according to its GitHub repository. The license covers the code of Brasil API; the service it connects to has its own terms.