Skip to content

Implement APIBrasil MCP server for Brazilian data services#1

Draft
Copilot wants to merge 6 commits intomainfrom
copilot/add-apibrasil-mcp-client
Draft

Implement APIBrasil MCP server for Brazilian data services#1
Copilot wants to merge 6 commits intomainfrom
copilot/add-apibrasil-mcp-client

Conversation

Copy link
Contributor

Copilot AI commented Jan 15, 2026

Provides MCP server implementation for APIBrasil, enabling AI assistants to access Brazilian data services: CPF/CNPJ lookups, postal codes, vehicle information, FIPE pricing, package tracking, and WhatsApp messaging.

Implementation

Server Architecture

  • TypeScript MCP server using @modelcontextprotocol/sdk over stdio transport
  • APIBrasil REST client with bearer token + device token authentication
  • 8 tools exposing Brazilian data services via standardized MCP protocol

Available Tools

  • consulta_cpf / consulta_cnpj - Brazilian taxpayer registry lookups
  • consulta_cep - Postal code to address resolution
  • consulta_placa / consulta_fipe - Vehicle data and market pricing
  • rastreio_correios - Correios package tracking
  • whatsapp_send_text / whatsapp_send_file - WhatsApp messaging

Configuration
Environment-based credentials via APIBRASIL_BEARER_TOKEN and APIBRASIL_DEVICE_TOKEN. Claude Desktop config:

{
  "mcpServers": {
    "apibrasil": {
      "command": "node",
      "args": ["/path/to/dist/index.js"],
      "env": {
        "APIBRASIL_BEARER_TOKEN": "your_token",
        "APIBRASIL_DEVICE_TOKEN": "your_device_token"
      }
    }
  }
}

Structure

src/index.ts          # MCP server + APIBrasil client
package.json          # @modelcontextprotocol/sdk, axios
tsconfig.json         # ES2022 + Node16 modules
.env.example          # Credential template

Usage examples and contributing guidelines in USAGE.md and CONTRIBUTING.md.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • apibrasil.com.br
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • modelcontextprotocol.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

apibrasil-mcp-client


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits January 15, 2026 05:14
Co-authored-by: jhowbhz <31408451+jhowbhz@users.noreply.github.com>
Co-authored-by: jhowbhz <31408451+jhowbhz@users.noreply.github.com>
Co-authored-by: jhowbhz <31408451+jhowbhz@users.noreply.github.com>
Co-authored-by: jhowbhz <31408451+jhowbhz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add apibrasil-mcp-client integration Implement APIBrasil MCP server for Brazilian data services Jan 15, 2026
Copilot AI requested a review from jhowbhz January 15, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants