mcpField
F
Fastalert Mcp Server

Fastalert Mcp Server

本地服务
github.com/FastAlertNowAI 与智能体336 周前更新

关于 Fastalert Mcp Server

FastAlert 的官方 MCP 服务,让 AI Agent 通过 FastAlert API 查找通知频道并发送消息。消息可包含标题、正文、操作和图片,并可发送到一个或多个频道。

主要功能

  1. 01按名称筛选并列出频道
  2. 02向一个或多个频道发送通知
  3. 03消息支持操作和图片
  4. 04提供结构化 JSON 与文本结果

适用场景

  1. 01查找用于服务告警的频道
  2. 02向多个频道发布系统更新
  3. 03发送附带链接或图片的通知

MCP 相关

向 MCP 客户端提供 `list_channels` 和 `send_message` 工具,用于查找 FastAlert 频道及通过 FastAlert API 发送通知。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"fastalertnow": {
"command": "npx",
"args": [
"-y",
"fastalert-mcp-server"
]
}
}
}
启动命令npx -y fastalert-mcp-server

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
npmfastalert-mcp-server1.3.1

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

FastAlert MCP Server

FastAlert 的官方模型上下文协议(MCP)服务,适用于 FastAlert。此服务允许 AI Agent(例如 Claude、ChatGPT 和 Cursor)列出你的频道,并直接通过 FastAlert API 发送通知。

功能

  • 频道发现:列出所有频道,可按名称筛选。
  • 发送通知:向一个或多个频道发送富文本消息(标题、内容、操作、图片)。

快速开始

{
  "mcpServers": {
    "fastalert": {
      "command": "npx",
      "args": ["-y", "fastalert-mcp-server"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

访问 FastAlert,然后前往 Settings,即可找到你的 API 密钥。

可用工具

此 MCP 服务提供以下工具。AI 助手可以调用每个工具来执行特定操作。

1. list_channels

返回可用 FastAlert 频道列表。

输入参数:

  • name(字符串,可选):用于按名称筛选频道的搜索词。

调用示例:

{
  "name": "Service Alerts"
}

结构化 JSON 输出(默认):

{
  "status": true,
  "message": "You have fetch channels successfully",
  "data": {
    "channels": [
      {
        "uuid": "sdf12sdf-6541-5d56-s5sd-1fa513e88a81",
        "name": "Service Alerts",
        "subscriber": 1000
      }
    ]
  }
}

易读文本输出:

Here are your FastAlert channels:

Service Alerts
UUID: sdf12sdf-6541-5d56-s5sd-1fa513e88a81
Subscribers: 1000
2. send_message

向一个或多个频道发送通知消息。

输入参数:

  • channel-uuid(字符串,必填):目标频道的唯一标识符。
  • title(字符串,必填):提醒通知的标题。
  • content(字符串,必填):通知的正文内容。
  • action(字符串,可选):操作类型('call'、'email'、'website'、'image')。
  • action_value(字符串,可选):操作对应的值(例如 URL 或电话号码)。
  • image(字符串,可选):要包含的图片 URL 或标识符。

调用示例:

{
  "channel-uuid": "sdf12sdf-6541-5d56-s5sd-1fa513e88a81",
  "title": "System Update",
  "content": "A new version of the system is now live.",
  "action": "website",
  "action_value": "https://fastalert.now/updates"
}

结构化 JSON 输出(默认):

{
  "status": true,
  "message": "Message has been sent successfully"
}

易读文本输出:

Message Sent Successfully!

Your message "System Update" has been sent to Service Alerts.

Channel UUID: sdf12sdf-6541-5d56-s5sd-1fa513e88a81
Title: System Update
Content: A new version of the system is now live.

与大模型集成

在 Cursor 中配置
  1. 前往 Settings -> MCP。
  2. 点击 Add New MCP Server。
  3. 名称:FastAlert
  4. 类型:command
  5. 命令:npx -y fastalert-mcp-server
  6. 环境变量:添加 API_KEY。
在 ChatGPT 中配置
  1. 前往 Settings -> Integrations。
  2. 点击 Add MCP Server。
  3. 使用你的服务托管 URL(例如 https://mcp.fastalert.now/mcp)。
  4. 按照 OAuth 提示操作。
在 Claude 中配置
  1. 打开 claude_desktop_config.json。
  2. 添加以下条目:
{
  "mcpServers": {
    "fastalert": {
      "command": "npx",
      "args": ["-y", "fastalert-mcp-server"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

设置与开发

要求
  • Node:建议使用 18 或更高版本。
  • API_KEY:需要有效的 FastAlert API Key 才能进行身份验证。
本地安装
  1. 克隆代码库
  2. 复制示例环境文件:
    cp .env.example .env
    
  3. 在 .env 中配置环境变量。
  4. 安装依赖:
    npm install
    
  5. 构建项目:
    npm run build
    
  6. 运行 Inspector 测试:
    npm run inspector
    
  7. 在本地运行:
    npm start
    
配置(环境变量)

应在 .env 文件中配置以下环境变量:

VariableDescriptionExample
API_URLFastAlert API 端点https://api.fastalert.now/api
FRONT_URL你的前端应用 URLhttps://fastalert.now
BASE_URL此 MCP 服务的公开托管 URLhttp://localhost:3000
API_KEY你的 FastAlert API Keyyour-api-key-here
PORT(可选)运行服务的端口3000

贡献

欢迎贡献!欢迎提交 Pull Request。

许可证

此项目采用 MIT 许可证。


评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。