Askari巡逻MCP服务器
小型实用程序和MCP服务器包装器,用于与Askari Patrol/GuardTour API交互。 包含一个轻量级HTTP客户端和一个MCP(模型上下文处理器)服务器脚手架,用于公开工具。
特性
- Askari Patrol API的HTTP客户端实用程序
- 最小化MCP服务器脚手架,以暴露工具和工作流
- 单元测试和基本开发工具
安装
# Install dependencies
make install用法
# Run MCP Server
make server
# Run WhatsApp Client
make whatsapp发展
# Run tests
make test
# Format code
make format
# Lint code
make lint
# Automatically fix lint issues
make fix运行命令行聊天客户端
# Open first terminal(tab)
make server
# Open second terminal(tab)
make chat运行WhatsApp客户端
# Create a .env file from the .env.example
cp .env.example .env
# Populate with variables运行服务器和客户端
- 打开终端并输入以下命令
make server- 打开第二个终端/选项卡并输入以下命令
make whatsapp- 你需要将whatsapp客户端暴露在网络上
ngrok http 8001- 使用给定的ngrok隧道url配置webhook,即如果ngrok提供了
hemicranic-moneyerately-herta.ngrok-free.dev那么webhook url应该是:https://hemicranic-moneyerately-herta.ngrok-free.dev/webhook
- 前往twilio并设置webhook url
- 将您的第一条消息发送给机器人!!!!
挑战
- WhatsApp格式有限,即表格数据无法在WhatsApp中正确显示
- WhatsApp正文有1600个字符的限制,这意味着大量响应将失败
- 超过速率限制:由于自愿响应,我们倾向于对lmit进行评级,尤其是TPM(每分钟令牌数)
- 客户端发送消息时的即时响应(当客户端发出请求时,响应会即时生成)。我认为,我们需要一个任务队列来处理客户端消息
