巴西API数据服务
无缝查询来自巴西资源的各种数据。通过统一的界面访问邮政编码、区号、银行、节假日、税务等信息。轻松使用巴西API丰富的更新数据增强您的AI代理和应用程序。
服务介绍
BrasilAPI MCP 服务器
无缝查询来自巴西资源的各种数据。通过统一的接口访问邮政编码、区号、银行、节假日、税收等信息。轻松地使用 BrasilAPI 提供的丰富且最新的数据来增强您的 AI 代理和应用程序。
查看完整的官方 BrasilAPI 文档 这里。
工具
此服务器提供了查询 BrasilAPI 中所有可用端点的工具。在幕后,它使用这个 JS 客户端与 API 进行通信:https://github.com/WillianAgostini/brasilapi-js
检查 Smithery 中的工具页面,以测试每个工具。
开发
安装依赖项:
npm install
构建服务器:
npm run build
对于带有自动重建功能的开发:
npm run watch
调试
由于 MCP 服务器通过标准输入输出进行通信,调试可能会有些困难。我们推荐使用 MCP Inspector,它作为包脚本提供:
npm run inspector
生成更新后的构建并进行检查:
npm run build-and-inspect
Inspector 将提供一个 URL,以便您在浏览器中访问调试工具。
与 AI 应用程序集成
通过 Smithery 运行
通过 Smithery 自动运行服务器:
npx -y @smithery/cli install @mauricio-cantu/brasil-api-mcp-server
与 Claude 使用
npx -y @smithery/cli@latest install @mauricio-cantu/brasil-api-mcp-server --client claude
Cursor 及其他集成
检查 Smithery 中的服务器页面,获取如 Cursor 等其他集成选项。
使用本地副本运行服务器
下载该项目后,您可以使用 node 来运行服务器:
node /absolute/path/to/brasil-api-mcp-server/build/index.js
如果您愿意的话,在项目根目录下也有一个 Dockerfile 可用于构建和运行镜像。
服务器功能检查
您可以使用 Smithery 检查此 MCP 服务器的功能:
npx -y @smithery/cli@latest inspect @mauricio-cantu/brasil-api-mcp-server
这将显示所有可用工具、它们的参数以及如何使用这些工具。
项目结构
src/
├── apiClient/ # BrasilAPI client
├── tools/ # Tools implementations
├── types/ # Interfaces and types
├── utils/ # Utility functions
└── index.ts # MCP main file (server setup and tools listing)