systemprompt-mcp-notion
Version:
A specialized Model Context Protocol (MCP) server that integrates Notion into your AI workflows. This server enables seamless access to Notion through MCP, allowing AI agents to interact with pages, databases, and comments.
25 lines (24 loc) • 1.01 kB
JavaScript
import { SystemPromptService } from "../services/systemprompt-service.js";
import { mapPromptsToListPromptsResult, mapBlocksToListResourcesResult, } from "../utils/mcp-mappers.js";
import { server } from "../server.js";
export async function sendPromptChangedNotification() {
const service = SystemPromptService.getInstance();
const prompts = await service.getAllPrompts();
const notification = {
method: "notifications/prompts/list_changed",
params: mapPromptsToListPromptsResult(prompts),
};
await sendNotification(notification);
}
export async function sendResourceChangedNotification() {
const service = SystemPromptService.getInstance();
const blocks = await service.listBlocks();
const notification = {
method: "notifications/resources/list_changed",
params: mapBlocksToListResourcesResult(blocks),
};
await sendNotification(notification);
}
async function sendNotification(notification) {
await server.notification(notification);
}