Skip to main content
Glama
by novuhq

Novu MCP 实施

这是 Novu 的模型上下文协议 (MCP) 服务器的 TypeScript 实现,允许 AI 代理与 Novu 的通知基础设施进行交互。

设置

  1. 安装依赖项:

npm install
  1. 构建项目:

npm run build
  1. 启动 MCP 服务器:

npm start

对于开发,您可以使用:

npm run dev

Related MCP server: New Relic MCP Server

配置

MCP 服务器需要在smithery.yml中配置 Novu API 密钥。您可以从 Novu 控制面板获取 API 密钥。

可用操作

MCP 服务器支持以下 Novu 操作:

活动

  • trigger_event :向特定订阅者发送通知

  • broadcast_event :向所有订阅者发送通知

  • cancel_triggered_event :取消触发的通知

通知

  • get_notifications :分页列出通知

  • get_notification_stats :获取通知统计信息

订阅者

  • get_subscribers :分页列出订阅者

  • create_subscriber :创建一个新的订阅者

  • update_subscriber :更新订阅者详细信息

  • delete_subscriber :删除订阅者

主题

  • get_topics :列出所有主题

  • create_topic :创建新主题

  • delete_topic :删除现有主题

  • add_subscribers_to_topic :向主题添加订阅者

  • remove_subscribers_from_topic :从主题中删除订阅者

示例用法

要触发通知:

{ "type": "execute", "payload": { "operation": "trigger_event", "params": { "name": "welcome-email", "to": "subscriber-id", "payload": { "name": "John Doe", "company": "Acme Inc" } } } }

要创建订阅者:

{ "type": "execute", "payload": { "operation": "create_subscriber", "params": { "subscriberId": "unique-id", "email": "john@example.com", "firstName": "John", "lastName": "Doe" } } }

发展

源代码使用 TypeScript 编写,并遵循现代开发实践。主要实现位于src/index.ts中,Novu 特定的逻辑位于src/novu-service.ts中。

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/novuhq/smithery-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server