logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

brazilian-data-connector-mcp

Unified gateway for accessing diverse Brazilian public data sets, encompassing postal codes, telephony codes, banking information, national holidays, and fiscal data, via a standardized API structure. Facilitates querying the complete suite of services offered by BrasilAPI.

Author

brazilian-data-connector-mcp logo

mauricio-cantu

No License

Quick Info

GitHub GitHub Stars 5
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apiapisbrasilapibrasil apiendpoints brasilapirequests mauricio

Brazilian Data Connector MCP Server

smithery badge

Seamlessly retrieve various datasets pertaining to Brazil through a consolidated interface. Gain access to geographical data (CEP), dialing prefixes, financial institution details, official observance calendars, taxation structures, and more, all accessible through a singular endpoint design. Empower your autonomous agents and applications with current and comprehensive data sourced from the BrasilAPI initiative with minimal overhead.

Refer to the comprehensive, official documentation provided by BrasilAPI here.

Available Functionality

This service exposes programmatic tools corresponding to every publicly available endpoint within the BrasilAPI catalog. Internally, communication with the remote service is managed via this JavaScript SDK: https://github.com/WillianAgostini/brasilapi-js

Consult the Tools index on Smithery to explore and validate the utility of each exposed function.

Implementation and Building

To set up project dependencies:

bash npm install

To compile the server artifacts:

bash npm run build

For active development with automatic recompilation:

bash npm run watch

Diagnostic Procedures

Debugging communication over stdio in MCP servers can be complex. We strongly advocate for utilizing the MCP Inspector, which is conveniently packaged as a script within this project:

bash npm run inspector

To generate a fresh build and immediately enter the inspection mode:

bash npm run build-and-inspect

The Inspector interface will yield a local URL for browser-based debugging utilities.

Integration with Intelligent Systems

Deployment via Smithery

Deploy the service automatically using the Smithery platform:

bash npx -y @smithery/cli install @mauricio-cantu/brasil-api-mcp-server

Usage Context for Claude

bash npx -y @smithery/cli@latest install @mauricio-cantu/brasil-api-mcp-server --client claude

Compatibility with Cursor and Other Environments

Examine the Server overview page on Smithery for alternative integration pathways, including Cursor and others.

Local Server Execution

Once the repository is cloned, the server can be launched directly using Node.js:

bash node /absolute/path/to/brasil-api-mcp-server/build/index.js

A Dockerfile is also provided at the project root for building and executing the containerized version.

Service Functionality Survey

You can audit the capabilities of this MCP service using Smithery:

bash npx -y @smithery/cli@latest inspect @mauricio-cantu/brasil-api-mcp-server

This command will detail all accessible methods, their required arguments, and usage examples.

Source Code Organization

src/ ├── apiClient/ # Client logic for BrasilAPI communication ├── tools/ # Implementations of specific query functions ├── types/ # Data structures and interface definitions ├── utils/ # Auxiliary helper functions └── index.ts # Primary MCP entry point (server initialization and tool registration)

WIKIPEDIA: XMLHttpRequest (XHR) is an API structured as a JavaScript object designed to facilitate the transmission of HTTP requests from a web browser client to a designated web server. Its methods enable client-side applications to issue server queries subsequent to page loading and receive data in return. XHR forms a foundational element of Ajax programming paradigms. Prior to its widespread adoption, user interaction with the server primarily relied on traditional mechanisms like navigational hyperlinks and form submissions, actions which typically necessitated a full page refresh.

== Origin Story == The underlying concept for XMLHttpRequest was first conceptualized in the year 2000 by the engineering team behind Microsoft Outlook. This concept was subsequently incorporated into the Internet Explorer 5 browser release (1999). However, the initial syntax did not utilize the standardized XMLHttpRequest identifier. Instead, developers invoked object constructors such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). By the time Internet Explorer 7 was released (2006), all contemporary browsers had adopted the canonical XMLHttpRequest identifier. The XMLHttpRequest identifier has since evolved into the recognized standard across all major browser engines, including Mozilla's Gecko (2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Standardization Efforts === The World Wide Web Consortium (W3C) published the initial Working Draft specification for the XMLHttpRequest object on April 5, 2006. A subsequent Level 2 specification was issued by the W3C on February 25, 2008. Level 2 introduced enhancements such as mechanisms for monitoring request progress, enabling cross-origin data fetching, and methods for processing byte streams. By the close of 2011, the Level 2 feature set was merged back into the primary specification document. In late 2012, development stewardship transferred to the WHATWG, which now maintains the specification as a continuously evolving document utilizing Web IDL.

== Operational Procedure == Executing a request via XMLHttpRequest generally requires adherence to a sequence of programming steps.

  1. Instantiate an XMLHttpRequest object by invoking its constructor:
  2. Invoke the open method to define the HTTP method, specify the target resource URI, and select either synchronous or asynchronous execution mode:
  3. For asynchronous operations, attach an event handler function responsible for reacting to changes in the request's state:
  4. Commence the transmission of the request by calling the send method:
  5. Monitor the state changes within the registered event listener. Upon successful server response, the data payload is typically accessible via the responseText attribute. When processing concludes, the object transitions to state 4, the "done" state. Beyond these fundamental stages, XHR offers numerous configuration options to govern request transmission and response handling. Custom header fields can be injected to provide servers with specific processing instructions, and data can be uploaded to the server as an argument to the send call. The received response can be parsed instantly from its raw format (e.g., JSON) into a usable JavaScript structure, or it can be processed incrementally as data streams arrive, avoiding wait times for full payload receipt. Furthermore, the operation can be terminated preemptively or configured to time out if completion is not achieved within a defined interval.

See Also

`