---
title: "Tutorial: postal codes, holidays and rates in your AI assistant with OpenAPI | FluxOS MCP Blog"
description: "Step-by-step guide to turning three public BrasilAPI lookups into MCP tools by pasting a ready-made OpenAPI specification. No API key and no code."
url: "https://www.fluxosmcp.com/en/blog/tutorial-postal-codes-holidays-and-rates-in-your-ai-assistant-with-openapi"
lang: "en-US"
---

[Blog](https://www.fluxosmcp.com/en/blog) · Nov 25, 2026 · FluxOS MCP Team

# Tutorial: postal codes, holidays and rates in your AI assistant with OpenAPI

[Leia este artigo em português](https://www.fluxosmcp.com/blog/tutorial-cep-feriados-e-selic-no-seu-assistente-de-ia-com-openapi)

The best way to understand an MCP server is to build one. And the best way to build your first is with data that can’t break anything: **public, read-only information with no password**.

In this tutorial you will give your AI assistant three new skills: looking up a CEP (Brazilian postal code), listing the national holidays of a given year and reporting the current Selic (Brazil’s benchmark interest rate), CDI (the interbank rate) and IPCA (the official inflation index). It all comes from [BrasilAPI](https://brasilapi.com.br/), an open project that brings together Brazilian public data.

## What you need

- A team account on FluxOS MCP (the kind that builds servers).
- An AI assistant that accepts remote MCP servers.
- No BrasilAPI key: all three lookups are open.

## Step 1: create the system

In **Sistemas → Novo sistema** (Systems → New system):

- **Nome** (Name): BrasilAPI
- **Tipo de origem** (Source type): OpenAPI
- **URL base** (Base URL): `https://brasilapi.com.br/api`
- **Credencial da empresa** (Company credential): Nenhuma (None)

Click **Criar e importar** (Create and import).

## Step 2: paste the specification

In the **Origem** (Source) step, choose **Colar conteúdo** (Paste content) and paste the specification below. It describes only the three operations in this tutorial.

```yaml
openapi: 3.0.3
info:
  title: BrasilAPI (recorte para teste)
  version: "1.0"
servers:
  - url: https://brasilapi.com.br/api
paths:
  /cep/v2/{cep}:
    get:
      operationId: consultarCep
      tags: [Endereços]
      summary: Consulta o endereço de um CEP
      description: Devolve rua, bairro, cidade e estado de um CEP brasileiro.
      parameters:
        - name: cep
          in: path
          required: true
          description: CEP com 8 dígitos, só números (ex. 01001000).
          schema:
            type: string
            pattern: "^[0-9]{8}$"
      responses:
        "200":
          description: Endereço do CEP.
  /feriados/v1/{ano}:
    get:
      operationId: listarFeriados
      tags: [Calendário]
      summary: Lista os feriados nacionais de um ano
      parameters:
        - name: ano
          in: path
          required: true
          description: Ano com 4 dígitos (ex. 2026).
          schema:
            type: integer
      responses:
        "200":
          description: Lista de feriados com data, nome e dia da semana.
  /taxas/v1:
    get:
      operationId: listarTaxas
      tags: [Economia]
      summary: Lista as taxas de juros e índices oficiais
      description: Devolve Selic, CDI e IPCA.
      responses:
        "200":
          description: Lista de taxas com nome e valor.

```

Click **Ler origem** (Read source).

## Step 3: review the three tools

The screen proposes one tool per operation, grouped by _tag_: `consultar_cep`, `listar_feriados` and `listar_taxas`. All three come checked, because they are read operations.

Two important adjustments:

**Mark all three as Global.** FluxOS MCP was built to keep each client’s data separate, which is why every tool needs a client filter. Public data is the exception: it is the same for everyone. The screen will offer `path:cep` and `path:ano` as the filter; **don’t choose them**. A postal code doesn’t identify any client.

**Improve the descriptions.** This is the text the assistant reads to decide when to use the tool. Something like “Use when the person provides a CEP (Brazilian postal code) and wants to know the address” works better than the technical summary.

## Step 4: create the server

In the **Resumo** (Summary) step, choose **novo servidor** (new server), name it “Public data” and give it the address `dados-publicos`. Click **Criar 3 ferramentas** (Create 3 tools).

## Publish and hand over a key

From here on, the path is the same as for any server:

1. In **Servidores MCP** (MCP servers), open the server and click **Publicar** (Publish).
2. In **Clientes → Novo cliente** (Clients → New client), create a test client (it can be “Internal test”).
3. On the client’s **Acesso e portal** (Access and portal) tab, use **Liberar servidor** (Grant server access) and set a low cap, for example 10 calls per minute.
4. On the **Chaves** (Keys) tab, create a **Nova chave** (New key). It is shown only once: copy it right away.

The server’s **Conexão** (Connection) tab shows the MCP address and a sample configuration. The key goes in the `Authorization: Bearer` header. Make sure your assistant lets you set that header: FluxOS MCP authenticates by key and does not use OAuth.

## Test with three questions

- “What is the address for CEP 01001-000?”
- “Which national holidays fall on a Monday in 2026?”
- “What is the Selic rate today?”

Look at the second one: the API only lists the holidays. The assistant is the one that filters for Mondays. That division of labor is MCP working the way it should.

## What to notice

- **The specification is yours.** BrasilAPI has dozens of operations; here we described three. To add another, all it takes is one more block under `paths`. The importer accepts OpenAPI 3.x; it does not accept Swagger 2.0.
- **A public API has usage limits.** Treat this server as a test, not as the foundation of a product.
- **A few well-described tools work better** than many with generic descriptions.

## Next tutorial

Not every API has a specification, but almost every one has a `curl` example in its documentation. In the next one, [two cURL commands become stock quote tools](https://www.fluxosmcp.com/en/blog/tutorial-stock-quotes-in-your-ai-assistant-with-a-curl-command).
