# brasil-api-mcp-server

> MCP Server

This repository provides a server to seamlessly query BrasilAPI data, including postal codes, banks, and holidays, through a unified interface for AI agents and applications. It enhances access to rich

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 7
- **Forks:** 0
- **Owner:** mauricio-cantu
- **GitHub:** https://github.com/mauricio-cantu/brasil-api-mcp-server
- **Homepage:** https://smithery.ai/server/@mauricio-cantu/brasil-api-mcp-server
- **Created:** 2025-03-19T21:11:26+00:00
- **Updated:** 2025-03-21T21:22:35+00:00
- **Source:** https://model-context-protocol.com/servers/brasil-api-query-server-for-ai

## Setup

## Setup

1.  Install dependencies:

   ```bash
npm install
   ```

2.  Build the server:

   ```bash
npm run build
   ```

3.  For development with auto-rebuild:

   ```bash
npm run watch
   ```

4. Debugging: Use the MCP Inspector:

   ```bash
npm run inspector
   ```

5. To generate an updated build and inspect:

   ```bash
npm run build-and-inspect
   ```

6. Running through Smithery:

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

7. Usage with Claude:

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

8. Running the server with a local copy:

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

At the root of the project there's also a Dockerfile to build and run the image if you'd like.

## Tools

## Available Tools

1. Query data from Brasil resources (Access information on postal codes, area codes, banks, holidays, taxes, and more).
2. Unified interface (Enhance your AI agents and applications with rich and updated data from BrasilAPI effortlessly).
3. Tools to query every endpoint available from BrasilAPI (Uses a JS client to communicate with the API).
4. MCP Inspector (Debugging tool for MCP servers).
5. Smithery integration (Run the server automatically via Smithery).
6. Inspect MCP server's capabilities (Show available tools, their parameters, and how to use them).
