article
README
🚀 AverbePorto-MCP 服务端
AverbePorto-MCP 服务端是一个 MCP(模型上下文协议)服务器,可实现与 AverbePorto 平台的集成。它简化了身份验证和文档上传服务的接入流程,还支持通过人工智能工具进行交互。
🚀 快速开始
🌐 访问 Web 系统
- 打开 https://www.averbeporto.com.br。
- 使用您的凭据登录。
- 在平台上您可以进行以下操作:
- 生成 API 凭证(在用户资料模块)。
- 发送 XML 文档。
- 查询 ANTT 协议。
- 监控和管理货物运输保险的登记。
🤖 与人工智能工具配合使用 MCP 服务器
通过 Smithery 安装
# 示例代码:如何在终端中运行安装命令
npm install @ghsix/averbeporto-mcp
在 Claude Desktop 中配置
// 配置示例:Claude Desktop 环境中的 MCP 服务器设置
const config = {
host: 'localhost',
port: 3000,
sessionId: 'your_session_id'
};
使用 Cursor 进行文档上传
// 示例代码:在 Cursor 中使用 upload 方法
await mcp.upload({
sessionId: 'your_session_id',
filePath: '/path/to/document.xml',
recipient: 'optional_recipient',
version: 'optional_version'
});
在 Roo Code 中集成
# 示例代码:Roo Code 环境中的 MCP 服务器调用
from averbeporto_mcp import MCPPackage
mcp = MCPPackage(host='localhost', port=3000)
response = mcp.retrieve_document(session_id='your_session_id', mod_doc='DI')
print(response)
在 Github Copilot 中设置凭证
// 示例代码:在 Github Copilot 中配置 API 凭证
const credentials = {
user: 'your_username',
pass: 'your_password'
};
await mcp.login(credentials);
✨ 主要特性
- 实现与 AverbePorto 平台的集成。
- 简化身份验证和文档上传服务的接入流程。
- 支持通过人工智能工具进行交互。
💻 使用示例
基础用法
# 通过 Smithery 安装 MCP 服务器
npm install @ghsix/averbeporto-mcp
高级用法
// 在 Claude Desktop 中配置 MCP 服务器
const config = {
host: 'localhost',
port: 3000,
sessionId: 'your_session_id'
};
// 使用 Cursor 进行文档上传
await mcp.upload({
sessionId: 'your_session_id',
filePath: '/path/to/document.xml',
recipient: 'optional_recipient',
version: 'optional_version'
});
# 在 Roo Code 中集成 MCP 服务器
from averbeporto_mcp import MCPPackage
mcp = MCPPackage(host='localhost', port=3000)
response = mcp.retrieve_document(session_id='your_session_id', mod_doc='DI')
print(response)
// 在 Github Copilot 中设置凭证
const credentials = {
user: 'your_username',
pass: 'your_password'
};
await mcp.login(credentials);
🔧 安全提示
⚠️ 重要提示
- 使用平台生成的 API 凭证。
- 确保凭证安全,防止泄露。
- 切勿共享
sessionId。- 始终使用安全连接。
- 及时更新 MCP 服务器版本。
微信扫一扫