@smcphub/notification
v0.0.2
Published
A MCP Server for notification management assistant by SMCPHUB
Downloads
8
Maintainers
Readme
@smcphub/notification
SMCPHub Notification Service.
SMCPHub Notification is a notification management service based on the MCP protocol. It supports adding, deleting, querying notifications, and marking notifications as read.
🏠 Homepage
Install
Use the official MCP server to integrate this toolkit service:
npm i @smcphub/serverOR
yarn add @smcphub/serverMCP Server configuration
{
"mcpServers": {
"smcphub-server": {
"command": "npx",
"args": ["-y", "@smcphub/server@latest"],
"env": {
"SMCPHUB_API_KEY": "your api key",
}
}
}
}You can get your API Key from the API Key Page.
Usage
Use the official MCP Client to connect to this toolkit service:
// import the SDK
import SmcphubClient from '@smcphub/client';
// Instantiate the client
const smcphubClient = new SmcphubClient({
api_key: 'your-api-key'
});
// Connect the MCP Server
smcphubClient
.connect()
.then(tools => {
console.log(tools);
})
.catch(err => {
console.error(err);
});
// Call the tool
smcphubClient
.callTool('getEmailAccounts', {})
.then(content => {
console.log(content);
})
.catch(err => {
console.error(err);
});- You must set the
SMCPHUB_API_KEYenvironment variable for authentication.
Tool List
add_notification
- Description: 添加通知
- Parameters:
source_type: 来源类型 (string, max length 30)source_id: 来源ID (number, integer, non-negative)type: 通知类型 (string, max length 50)title: 通知标题 (string, max length 255)content: 通知内容 (string)link_url: 链接URL (string, optional, max length 500)priority: 优先级 (number, default 0)extra_data: 额外数据 (string, optional, nullable)
delete_notification
- Description: 删除通知
- Parameters:
notification_ids: 通知ID数组 (array of positive integers)
query_notifications
- Description: 分页查询通知
- Parameters:
page: 页码 (number, default 1)page_size: 每页数量 (number, default 10, max 100)user_id: 用户ID (number, optional, nullable)source_type: 来源类型 (string, optional, nullable, max length 30)is_read: 是否已读 (number, optional, nullable, 0 or 1)
Author
👤 SMCPHUB
License
Apache-2.0
